You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ax...@ws.apache.org on 2004/10/22 16:03:26 UTC

[jira] Commented: (AXIS-1572) SOAPAction have to be specified with value or empty. JavaDoc said it's optional.

The following comment has been added to this issue:

     Author: Sébastien Tardif
    Created: Fri, 22 Oct 2004 7:02 AM
       Body:
Here the patch. I used it myself and work well. It's very simple as you can see!

retrieving revision 1.178
diff -r1.178 AxisServlet.java
925c925,926
<             AxisFault af = new AxisFault("Client.NoSOAPAction",
---
>             return null;
>            /* AxisFault af = new AxisFault("Client.NoSOAPAction",
932a934
>             */
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1572?page=comments#action_54483

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1572

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1572
    Summary: SOAPAction have to be specified with value or empty. JavaDoc said it's optional.
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
   Versions:
             1.2 Beta

   Assignee: 
   Reporter: Sébastien Tardif

    Created: Thu, 23 Sep 2004 1:41 PM
    Updated: Fri, 22 Oct 2004 7:02 AM
Environment: 1.2 Beta current

Description:
SOAPAction have to be specified with value or empty. JavaDoc said it's optional.

The javadoc is:
http://ws.apache.org/~dims/axisdiff/newdocs/org/apache/axis/transport/http/AxisServlet.html#getSoapAction(javax.servlet.http.HttpServletRequest)

extract:

Extract the SOAPAction header. if SOAPAction is null then we'll we be forced to scan the body for it. if SOAPAction is "" then use the URL 

But the code is like this:
private String getSoapAction(HttpServletRequest req)
        throws AxisFault
    {
        String soapAction =req.getHeader(HTTPConstants.HEADER_SOAP_ACTION);

        if(isDebug) log.debug("HEADER_SOAP_ACTION:" + soapAction);

        /**
         * Technically, if we don't find this header, we should probably fault.
         * It's required in the SOAP HTTP binding.
         */
        if (soapAction == null) {
            AxisFault af = new AxisFault("Client.NoSOAPAction",
                                         Messages.getMessage("noHeader00",
                                                              "SOAPAction"),
                                         null, null);

            exceptionLog.error(Messages.getMessage("genFault00"), af);

            throw af;
        }
        // the SOAP 1.1 spec & WS-I 1.0 says:
        // soapaction    = "SOAPAction" ":" [ <"> URI-reference <"> ]
        // some implementations leave off the quotes
        // we strip them if they are present
        if (soapAction.startsWith("\"") && soapAction.endsWith("\"")
                && soapAction.length()>=2) {
            int end = soapAction.length() - 1;
            soapAction = soapAction.substring(1, end);
        }

Also XMLSpy latest version generate SOAP without SOAPAction header.

JWSDP webservice framework work without any problem.

I believe in production it doesn't make much sence to crash... we want the customer having less problem as possible. Maybe in a debugging mode Axis could show warning. I really don't understand why we want to throw an exception when we know how to continue...


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira