axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Commented: (AXIS-1116) [doc/lit] RPCElement doesn't process a response message of wrapped style
Date Fri, 15 Oct 2004 13:07:56 GMT
The following comment has been added to this issue:

     Author: Anderson Luiz Brunozi
    Created: Fri, 15 Oct 2004 6:06 AM
Has this issue already been fixed for Axis 1.2 RC1?
If not, is it intended to be for Axis 1.2?

I need to access a Web Service from a mobile device through J2ME, and I'm required to use
the Axis server.

I'm using Sun's WTK2.1 to generate the client stubs based on the WSDL, generated by Axis.

I started with Axis 1.1, and tryed Axis 1.2 RC1 after finding this, but I'm still getting
the same error, with both doc/lit and wrapped/literal styles.

While testing on the emulator, it works fine.
But, after I loaded the MIDlet to the phone (SonyEricsson P900), it throws a SAXParseException
while processing the response from server.

As the P900 does not support JSR172, I loaded the j2me-ws.jar classes along with my MIDlet.
I did the same for the JSR172Demo MIDlet that comes with WTK2.1, including the JAR along with
the Demo MIDlet, and testing on the same device. And it works! 
That makes me think the problem is on the server side. And then, looking for some possible
solution I've found this issue.

So, is this issue what is causing the problem?


View this comment:

View the issue:

Here is an overview of the issue:
        Key: AXIS-1116
    Summary: [doc/lit] RPCElement doesn't process a response message of wrapped style
       Type: Bug

     Status: Open

    Project: Axis
             current (nightly)

   Assignee: Axis Developers Mailing List
   Reporter: Ias

    Created: Sun, 2 Nov 2003 8:51 AM
    Updated: Fri, 15 Oct 2004 6:06 AM
Environment: Operating System: All
Platform: All

Suppose the following WSDL is given,
	<xsd:element name="addGroups">
        <xsd:element name="group" maxOccurs="unbounded" minOccurs="1" 
nillable="true" type="xsd:string"/>
	<xsd:element name="RetVal" type="xsd:boolean"/>
	<message name="addGroupsReq">
		<part name="AddGroupReq" element="xsd1:addGroups"/>
	<message name="addGroupsRes">
		<part name="AddGroupRes" element="xsd1:RetVal"/>
<portType name="EmployeeDBPort">
		<operation name="addGroups">
			<input message="tns:addGroupsReq"/>
			<output message="tns:addGroupsRes"/>
<binding name="EmployeeDBBinding" type="tns:EmployeeDBPort">
	<soap:binding style="document" 
	<operation name="addGroups">
			<soap:body use="literal"/>
			<soap:body use="literal"/>

"addGroups" operation is detected as "wrapper style", and its server-
config.wsdd is

  <service name="EmployeeDBPort" provider="java:RPC" style="wrapped" 
      <operation name="addGroups" qname="operNS:addGroups" 
xmlns:retNS="" returnType="rtns:boolean" 
xmlns:rtns="" >
        <parameter qname="pns:group" 
xmlns:pns="" type="tns:string" 

In this case, a request SOAP message is OK:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="" 
  <addGroups xmlns="">

However, the current axis returns a response message like

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="" 
  <addGroupsResponse xmlns="">

This is obviously wrong since wrapped style is document style as well.
WS-I Basic Profile 1.0 also points out this situation wit more clarity:

WSDL 1.1 is not completely clear what, in document-literal style bindings, the 
child element of soap:Body is. 

R2712 A document-literal binding MUST be represented on the wire as a MESSAGE 
with a soap:Body whose child element is an instance of the global element 
declaration referenced by the corresponding wsdl:message part. 


Actually axis client and server work O.K. because they both assume "Response" 
postfix even though they communicate under wrapped style.

I found this trouble when I made my J2ME web services client, which uses 
only "doc/literal" according to JSR-172 spec. In order to improve the 
interoperability of axis based on "doc/literal", some changes to RPCElement 
are necessary. (See the attached patch.)

With the modification, axis replys to the previous request example like

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="" 
  <RetVal xmlns="">true</RetVal>

Note: the automatically generated WSDL by "service?wsdl" is still not 
compliant with the above correction. I'll look into that, and your idea and 
help are welcome.

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

View raw message