axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24330] New: - RPCElement doesn't process a response message of wrapped style
Date Sun, 02 Nov 2003 08:51:34 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24330>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24330

RPCElement doesn't process a response message of wrapped style

           Summary: RPCElement doesn't process a response message of wrapped
                    style
           Product: Axis
           Version: current (nightly)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Serialization/Deserialization
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: iasandcb@apache-korea.org


Suppose the following WSDL is given,
<types>
...
	<xsd:element name="addGroups">
	<xsd:complexType>
	<xsd:sequence>
        <xsd:element name="group" maxOccurs="unbounded" minOccurs="1" 
nillable="true" type="xsd:string"/>
	</xsd:sequence>
	</xsd:complexType>
	</xsd:element>
	<xsd:element name="RetVal" type="xsd:boolean"/>
</types>
	<message name="addGroupsReq">
		<part name="AddGroupReq" element="xsd1:addGroups"/>
	</message>
	<message name="addGroupsRes">
		<part name="AddGroupRes" element="xsd1:RetVal"/>
	</message>
<portType name="EmployeeDBPort">
...
		<operation name="addGroups">
			<input message="tns:addGroupsReq"/>
			<output message="tns:addGroupsRes"/>
		</operation>
</portType>
<binding name="EmployeeDBBinding" type="tns:EmployeeDBPort">
	<soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
	<operation name="addGroups">
		<soap:operation 
soapAction="http://www.sun.com/JSR172UseCases/addGroups"/>
		<input>
			<soap:body use="literal"/>
		</input>
		<output>
			<soap:body use="literal"/>
		</output>
	</operation>
</binding>

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

  <service name="EmployeeDBPort" provider="java:RPC" style="wrapped" 
use="literal">
...
      <operation name="addGroups" qname="operNS:addGroups" 
xmlns:operNS="http://www.sun.com/JSR172AppendixA.xsd" 
returnQName="retNS:RetVal" 
xmlns:retNS="http://www.sun.com/JSR172AppendixA.xsd" returnType="rtns:boolean" 
xmlns:rtns="http://www.w3.org/2001/XMLSchema" >
        <parameter qname="pns:group" 
xmlns:pns="http://www.sun.com/JSR172AppendixA.xsd" type="tns:string" 
xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
      </operation>
...

In this case, a request SOAP message is OK:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <addGroups xmlns="http://www.sun.com/JSR172AppendixA.xsd">
   <group>Group1</group>
   <group>Group2</group>
   <group>Group3</group>
  </addGroups>
 </soapenv:Body>
</soapenv:Envelope>

However, the current axis returns a response message like

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <addGroupsResponse xmlns="http://www.sun.com/JSR172AppendixA.xsd">
    <RetVal>true</RetVal>
  </addGroupsResponse>
 </soapenv:Body>
</soapenv:Envelope>

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. 

(from
http://www.ws-i.org/Profiles/Basic/2003-08/BasicProfile-
1.0a.htm#refinement35113376
)

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="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <RetVal xmlns="http://www.sun.com/JSR172AppendixA.xsd">true</RetVal>
 </soapenv:Body>
</soapenv:Envelope>

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.

Mime
View raw message