axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daryoush Mehrtash" <dmehr...@bea.com>
Subject Problem with WSDL of Header arguments in RPC encoded
Date Tue, 03 May 2005 23:32:26 GMT
I am having a problem with Axis generated WSDL I have header parts in an
RPC encoded web service.  If I use Document style the WSDL appears to be
OK, but in case of RPC the wsdl:part of the header attributes violates
the rule in the WS_1 profile that requires the header elements to be
elements and not type.  

 

Background:  

 

In the Beehive WSM project we set up the web service inside the Axis by
setting up the ParameterDesc and OperationDesc and type mappings of the
web service based on JSR 181 annotations.  If I have a method that uses
a string argument in the header, for Document style I get the WSDL that
contains:

 

Type:

<element name="name_in" type="xsd:string"/>

 

 

PortType:

<wsdl:message name="sayHelloInHeaderRequest">

<wsdl:part element="impl:name_in" name="name_in"/>

<wsdl:part element="impl:sayHelloInHeader" name="parameters"/>

</wsdl:message>

 

 

Binding

 

<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

.......

 

<wsdl:operation name="sayHelloInHeader">

<wsdlsoap:operation soapAction=""/>

 

            <wsdl:input name="sayHelloInHeaderRequest">

<wsdlsoap:body parts="parameters" use="literal"/>

<wsdlsoap:header message="impl:sayHelloInHeaderRequest"
namespace="http://webparam.web" part="name_in" use="literal">

 

            </wsdlsoap:header>

</wsdl:input>

 

            <wsdl:output name="sayHelloInHeaderResponse">

<wsdlsoap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

 

Which is correct.

 

For the same set up (identical ParamDesc and OperationDesc)  if I use
RPC/Literal I get a wsdl that has:

 

PortType:

 

<wsdl:message name="sayHelloInHeaderRequest">

<wsdl:part name="name_in" type="xsd:string"/>

</wsdl:message>

 

 

 Binding:

<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>

.....

 

<wsdl:operation name="sayHelloInHeader">

<wsdlsoap:operation soapAction=""/>

            <wsdl:input name="sayHelloInHeaderRequest">

<wsdlsoap:body namespace="http://webparam.web" parts="" use="literal"/>

<wsdlsoap:header message="impl:sayHelloInHeaderRequest"
namespace="http://webparam.web" part="name_in" use="literal">

 

            </wsdlsoap:header>

</wsdl:input>

 

            <wsdl:output name="sayHelloInHeaderResponse">

<wsdlsoap:body namespace="http://webparam.web" use="literal"/>

</wsdl:output>

</wsdl:operation>

 

 

 

This causes an error when I try to compile the wsdl with sun's jarrpc
ri..  The error is because of the  ws-I basic profile.

 

R2205 A wsdl:binding in a DESCRIPTION MUST refer, in each of its
soapbind:header, soapbind:headerfault and soapbind:fault elements, only
to wsdl:part element(s) that have been defined using the element
attribute.

 

 

Any ideas why RPC generates type for the header and Document styles
generates the element?  Any way to get around it?

 

 

Thanks,


Daryoush Mehrtash


Mime
View raw message