[ 
http://issues.apache.org/jira/browse/AXIS-1996?page=comments#action_12312804 ] 

Davanum Srinivas commented on AXIS-1996:
----------------------------------------

Dennis,

Can you please upload a diff against latest CVS. I'll check it in.

thanks,
dims

> Axis fails processing request message with empty body
> -----------------------------------------------------
>
>          Key: AXIS-1996
>          URL: http://issues.apache.org/jira/browse/AXIS-1996
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2
>     Reporter: Dennis Sosnoski

>
> org.apache.axis.providers.java.MsgProvider.processMessage() starts by 
> checking if the operation has already been set in the message context, and if 
> not tries to determine it based on the first body element. If there is no 
> child element of the SOAP Body it then fails with a Fault response:
>         
>         if (operation == null) {
>             Vector bodyElements = reqEnv.getBodyElements();
>             if(bodyElements.size() > 0) {
>                 MessageElement element = (MessageElement) bodyElements.get(0);
>                 if (element != null) {
>                     opQName = new QName(element.getNamespaceURI(),
>                             element.getLocalName());
>                     operation = 
> serviceDesc.getOperationByElementQName(opQName);
>                 }
>             }
>         }
>         if (operation == null) {
>             throw new AxisFault(Messages.getMessage("noOperationForQName",
>                                 opQName == null ? "null" : 
> opQName.toString()));
>         }
> It should be legal to define a message-style service with only one operation, 
> in which the body is optional. To do this, the code only needs to be changed 
> so that the element == null case just gets the single operation defined. This 
> is implemented in 
> org.apache.axis.description.JavaServiceDesc.getOperationsByQName(), which 
> returns the single operation for any supplied element name, but it doesn't 
> get called unless a child element of the body is present. The 
> MsgProvider.processMessage() code should either substitute a dummy element 
> (such as one with an empty name and namespace) or use another means to look 
> up the single operation when no body element is present.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to