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 bu...@apache.org on 2003/10/30 15:31:12 UTC
DO NOT REPLY [Bug 24251] New: -
Wrong detection on wrapped style
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=24251>.
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=24251
Wrong detection on wrapped style
Summary: Wrong detection on wrapped style
Product: Axis
Version: current (nightly)
Platform: All
OS/Version: All
Status: NEW
Severity: Critical
Priority: Other
Component: WSDL processing
AssignedTo: axis-dev@ws.apache.org
ReportedBy: iasandcb@apache-korea.org
Suppose we have the following WSDL,
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.sun.com/JSR172UseCases"
xmlns:xsd1="http://www.sun.com/JSR172AppendixA.xsd"
targetNamespace="http://www.sun.com/JSR172UseCases" name="JSR172AppendixA">
<types>
<xsd:schema elementFormDefault="qualified"
targetNamespace="http://www.sun.com/JSR172AppendixA.xsd" xmlns:SOAP-
ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsd1="http://www.sun.com/JSR172AppendixA.xsd">
<xsd:element name="getEmployeeCount" type="xsd:int"/>
<xsd:element name="EmpCount" type="xsd:int"/>
</xsd:schema>
</types>
<message name="getEmployeeCountReq">
<part name="EmpCountReq" element="xsd1:getEmployeeCount"/>
</message>
<message name="getEmployeeCountRes">
<part name="EmpCountRes" element="xsd1:EmpCount"/>
</message>
<portType name="EmployeeDBPort">
<operation name="getEmployeeCount">
<input message="tns:getEmployeeCountReq"/>
<output message="tns:getEmployeeCountRes"/>
</operation>
</portType>
<binding name="EmployeeDBBinding" type="tns:EmployeeDBPort">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getEmployeeCount">
<soap:operation
soapAction="http://www.sun.com/JSR172UseCases/getEmployeeCount"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="EmployeeDatabase">
<port name="EmployeeDBPort" binding="tns:EmployeeDBBinding">
<soap:address
location="http://localhost:8080/axis/services/EmployeeDatabase"/>
</port>
</service>
</definitions>
the operation "getEmployeeCount" is not wrapped style based on JAX-RPC spec
1.1 (maintenance review 2). (the main reason is that getEmployeeeCount element
is not of a complext type with the xsd:sequence compositor.)
However, the generated wsdd is
<service name="EmployeeDBPort" provider="java:RPC" style="wrapped"
use="literal">
<parameter name="wsdlTargetNamespace"
value="http://www.sun.com/JSR172UseCases"/>
<parameter name="wsdlServiceElement" value="EmployeeDatabase"/>
<parameter name="wsdlServicePort" value="EmployeeDBPort"/>
<parameter name="className"
value="ias.ed.service2.EmployeeDBBindingImpl"/>
<parameter name="wsdlPortType" value="EmployeeDBPort"/>
<operation name="getEmployeeCount" qname="operNS:getEmployeeCount"
xmlns:operNS="http://www.sun.com/JSR172AppendixA.xsd"
returnQName="retNS:EmpCount"
xmlns:retNS="http://www.sun.com/JSR172AppendixA.xsd" returnType="rtns:int"
xmlns:rtns="http://www.w3.org/2001/XMLSchema" >
<parameter qname="pns:getEmployeeCount"
xmlns:pns="http://www.sun.com/JSR172AppendixA.xsd" type="tns:int"
xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
</operation>
<parameter name="allowedMethods" value="getEmployeeCount"/>
</service>
Above all, we need a more fine-grained style concept from service to operation.
For example,
<service name="EmployeeDBPort" provider="java:RPC" style="wrapped"
use="literal">
<operation style="document" ...
In other words, operation description can override its style over that of a
service description to which it belongs. In reality, one WSDL can define
either wrapped style operation or (cannot-be-wrapped) documment style
operation at the same time.
Currently, detecting wrapped style depends on SymbolTable.isWrapped()
basically. I'd like to propose the following redesign.
1. Parameters has a new field, wrapped and its getter-setter as well.
2. Detection logic of wrapped style controls not only SymbolTable but also
Parameters.
3. JavaDeployWriter and JavaStubWriter refer to both and judges wrapped style.
I think this redesign seems declined to the client side. Is there anything
needed for the server side?
I hope to get as much feedback as possible before starting to carry out the
implementation.