You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Dave Overbeck <do...@rcn.com> on 2005/05/03 03:34:07 UTC

wrapped vs. document

Hello,

I have the following deployment file and resulting wsdl. I can't figure 
out why the wsdl is coming out with style=document when it should be 
wrapped. Any ideas?

Thanks,
Dave

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
  <service name="ItemInq" provider="java:RPC" style="wrapped" use="literal">
    <parameter name="className" value="com.turnkey.rtl.jws.ItemInq"/>
    <parameter name="allowedMethods" value="*"/>
    <parameter name="wsdlTargetNamespace" 
value="http://jws.rtl.turnkey.com"/>
    <parameter name="wsdlServiceElement" value="ItemInqService"/>
    <parameter name="wsdlServicePort" value="ItemInqService"/>
    <parameter name="wsdlPortType" value="ItemInqService"/>
  </service>
</deployment>


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://jws.rtl.turnkey.com" 
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://jws.rtl.turnkey.com"
xmlns:intf="http://jws.rtl.turnkey.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.2RC3
Built on Feb 28, 2005 (10:15:14 EST)-->
 <wsdl:types>
  <schema elementFormDefault="qualified" 
targetNamespace="http://jws.rtl.turnkey.com" 
xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="get">
    <complexType>
     <sequence>
      <element name="in0" type="xsd:string"/>
      <element name="in1" type="xsd:string"/>
      <element name="in2" type="xsd:string"/>
      <element name="in3" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="getResponse">
    <complexType>
     <sequence>
      <element name="getReturn" type="xsd:byte"/>
     </sequence>
    </complexType>
   </element>
  </schema>
 </wsdl:types>

   <wsdl:message name="getResponse">
      <wsdl:part element="impl:getResponse" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="getRequest">
      <wsdl:part element="impl:get" name="parameters"/>
   </wsdl:message>
   <wsdl:portType name="ItemInqService">
      <wsdl:operation name="get">
         <wsdl:input message="impl:getRequest" name="getRequest"/>
         <wsdl:output message="impl:getResponse" name="getResponse"/>
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="ItemInqServiceSoapBinding" 
type="impl:ItemInqService">
      <wsdlsoap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="get">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="getRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="getResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="ItemInqService">
      <wsdl:port binding="impl:ItemInqServiceSoapBinding" 
name="ItemInqService">
         <wsdlsoap:address 
location="http://192.168.1.6:8080/axis/services/ItemInq"/>
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>



Re: wrapped vs. document

Posted by Anne Thomas Manes <at...@gmail.com>.
Because there is no such style as "wrapped" in WSDL. The only
permitted styles in WSDL are "rpc" and "document". Axis WSDD
style="wrapped" produces WSDL style="document". ("wrapped" is a
programming style rather than a service style -- it presents a
programming interface comparable to "rpc" style, but it produces
document/literal services.)

See my blog entry for further explanation:
http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html 

Anne

On 5/2/05, Dave Overbeck <do...@rcn.com> wrote:
> Hello,
> 
> I have the following deployment file and resulting wsdl. I can't figure
> out why the wsdl is coming out with style=document when it should be
> wrapped. Any ideas?
> 
> Thanks,
> Dave
> 
> <deployment xmlns="http://xml.apache.org/axis/wsdd/"
>     xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
>   <service name="ItemInq" provider="java:RPC" style="wrapped" use="literal">
>     <parameter name="className" value="com.turnkey.rtl.jws.ItemInq"/>
>     <parameter name="allowedMethods" value="*"/>
>     <parameter name="wsdlTargetNamespace"
> value="http://jws.rtl.turnkey.com"/>
>     <parameter name="wsdlServiceElement" value="ItemInqService"/>
>     <parameter name="wsdlServicePort" value="ItemInqService"/>
>     <parameter name="wsdlPortType" value="ItemInqService"/>
>   </service>
> </deployment>
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://jws.rtl.turnkey.com"
> xmlns:apachesoap="http://xml.apache.org/xml-soap"
> xmlns:impl="http://jws.rtl.turnkey.com"
> xmlns:intf="http://jws.rtl.turnkey.com"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <!--WSDL created by Apache Axis version: 1.2RC3
> Built on Feb 28, 2005 (10:15:14 EST)-->
>  <wsdl:types>
>   <schema elementFormDefault="qualified"
> targetNamespace="http://jws.rtl.turnkey.com"
> xmlns="http://www.w3.org/2001/XMLSchema">
>    <element name="get">
>     <complexType>
>      <sequence>
>       <element name="in0" type="xsd:string"/>
>       <element name="in1" type="xsd:string"/>
>       <element name="in2" type="xsd:string"/>
>       <element name="in3" type="xsd:string"/>
>      </sequence>
>     </complexType>
>    </element>
>    <element name="getResponse">
>     <complexType>
>      <sequence>
>       <element name="getReturn" type="xsd:byte"/>
>      </sequence>
>     </complexType>
>    </element>
>   </schema>
>  </wsdl:types>
> 
>    <wsdl:message name="getResponse">
>       <wsdl:part element="impl:getResponse" name="parameters"/>
>    </wsdl:message>
>    <wsdl:message name="getRequest">
>       <wsdl:part element="impl:get" name="parameters"/>
>    </wsdl:message>
>    <wsdl:portType name="ItemInqService">
>       <wsdl:operation name="get">
>          <wsdl:input message="impl:getRequest" name="getRequest"/>
>          <wsdl:output message="impl:getResponse" name="getResponse"/>
>       </wsdl:operation>
>    </wsdl:portType>
>    <wsdl:binding name="ItemInqServiceSoapBinding"
> type="impl:ItemInqService">
>       <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>       <wsdl:operation name="get">
>          <wsdlsoap:operation soapAction=""/>
>          <wsdl:input name="getRequest">
>             <wsdlsoap:body use="literal"/>
>          </wsdl:input>
>          <wsdl:output name="getResponse">
>             <wsdlsoap:body use="literal"/>
>          </wsdl:output>
>       </wsdl:operation>
>    </wsdl:binding>
>    <wsdl:service name="ItemInqService">
>       <wsdl:port binding="impl:ItemInqServiceSoapBinding"
> name="ItemInqService">
>          <wsdlsoap:address
> location="http://192.168.1.6:8080/axis/services/ItemInq"/>
>       </wsdl:port>
>    </wsdl:service>
> </wsdl:definitions>
> 
>