axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venkat Reddy (JIRA)" <>
Subject [jira] Commented: (AXIS-1996) Axis fails processing request message with empty body
Date Mon, 23 May 2005 06:19:02 GMT
     [ ]
Venkat Reddy commented on AXIS-1996:

When you say "body is optional" and "no body element is present", i guess you mean the operation
element but not body element, since <body> element is mandatory.

Defaulting to the only operation, when body is empty, may be a refinement. Is such behavior

Are you specifying the Action by some other means, for example, <wsa:Action> header.

- Venkat

> Axis fails processing request message with empty body
> -----------------------------------------------------
>          Key: AXIS-1996
>          URL:
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2
>     Reporter: Dennis Sosnoski

> 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:
For more information on JIRA, see:

View raw message