Grab the WSDL file and edit it just to generate your stub. These
changes won't change the message on the wire.

Anne

On 8/23/06, ezwise <[EMAIL PROTECTED]> wrote:

Alas, the web service is published from a proprietary system and the WSDL is
generated dynamically on request.  I don't have the ability to modify the
WSDL information.

Is there another way to approach this problem?


--Ezra



Anne Thomas Manes wrote:
>
> WSDL looks okay, but can I ask you to make a few small edits and try
> it again? Please change the name of the header part to something other
> than "parameters", add the "parts" attribute to the <soap:body>
> definition, and move the <soap:header> definitions so that they follow
> their associated <soap:body> definitions. e.g., change this:
>
>    <wsdl:message name="ARAuthenticate">
>        <wsdl:part element="s0:AuthenticationInfo" name="parameters" />
>    </wsdl:message>
>
>   <wsdl:operation name="OpCreate">
>     <soap:operation soapAction="urn:testws/OpCreate" style="document" />
>       <wsdl:input>
>         <soap:header message="s0:ARAuthenticate" part="parameters"
> use="literal" />
>         <soap:body use="literal" />
>       </wsdl:input>
>
> to this:
>
>    <wsdl:message name="ARAuthenticate">
>        <wsdl:part element="s0:AuthenticationInfo" name="header" />
>    </wsdl:message>
>
>  <wsdl:operation name="OpCreate">
>     <soap:operation soapAction="urn:testws/OpCreate" style="document" />
>       <wsdl:input>
>         <soap:body use="literal" parts="parameters"/>
>         <soap:header message="s0:ARAuthenticate" part="header"
> use="literal" />
>       </wsdl:input>
>
> Tell me if that fixes it.
> If so, please file a JIRA.
>
> Anne
>
> On 8/23/06, ezwise <[EMAIL PROTECTED]> wrote:
>>
>> Here is my WSDL:
>>
>> ********* start of WSDL *********
>>
>>   <?xml version="1.0" encoding="UTF-8" ?>
>> - <wsdl:definitions targetNamespace="urn:testws" xmlns:s0="urn:testws"
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
>> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>> - <wsdl:types>
>> - <xsd:schema elementFormDefault="qualified"
>> targetNamespace="urn:testws">
>>   <xsd:element name="OpGet" type="s0:GetInputMap" />
>> - <xsd:complexType name="GetInputMap">
>> - <xsd:sequence>
>>   <xsd:element name="Request_ID" type="xsd:string" />
>>   </xsd:sequence>
>>   </xsd:complexType>
>>   <xsd:element name="OpGetResponse" type="s0:GetOutputMap" />
>> - <xsd:complexType name="GetOutputMap">
>> - <xsd:sequence>
>>   <xsd:element name="Assigned_To" type="xsd:string" />
>>   <xsd:element name="Create_Date" type="xsd:dateTime" />
>>   <xsd:element name="Last_Modified_By" type="xsd:string" />
>>   <xsd:element name="Modified_Date" type="xsd:dateTime" />
>>   <xsd:element name="Request_ID" type="xsd:string" />
>>   <xsd:element name="Short_Description" type="xsd:string" />
>>   <xsd:element name="Status" type="s0:StatusType" />
>>   <xsd:element name="Status_History" type="xsd:string" />
>>   <xsd:element name="Submitter" type="xsd:string" />
>>   </xsd:sequence>
>>   </xsd:complexType>
>> - <xsd:simpleType name="StatusType">
>> - <xsd:restriction base="xsd:string">
>>   <xsd:enumeration value="New" />
>>   <xsd:enumeration value="Assigned" />
>>   <xsd:enumeration value="Fixed" />
>>   <xsd:enumeration value="Rejected" />
>>   <xsd:enumeration value="Closed" />
>>   </xsd:restriction>
>>   </xsd:simpleType>
>>   <xsd:element name="OpCreate" type="s0:CreateInputMap" />
>> - <xsd:complexType name="CreateInputMap">
>> - <xsd:sequence>
>>   <xsd:element name="Assigned_To" type="xsd:string" />
>>   <xsd:element name="Short_Description" type="xsd:string" />
>>   <xsd:element name="Status" type="s0:StatusType" />
>>   <xsd:element name="Submitter" type="xsd:string" />
>>   </xsd:sequence>
>>   </xsd:complexType>
>>   <xsd:element name="OpCreateResponse" type="s0:CreateOutputMap" />
>> - <xsd:complexType name="CreateOutputMap">
>> - <xsd:sequence>
>>   <xsd:element name="Request_ID" type="xsd:string" />
>>   </xsd:sequence>
>>   </xsd:complexType>
>>   <xsd:element name="OpGetList" type="s0:GetListInputMap" />
>> - <xsd:complexType name="GetListInputMap">
>> - <xsd:sequence>
>>   <xsd:element name="Qualification" type="xsd:string" />
>>   </xsd:sequence>
>>   </xsd:complexType>
>>   <xsd:element name="OpGetListResponse" type="s0:GetListOutputMap" />
>> - <xsd:complexType name="GetListOutputMap">
>> - <xsd:sequence>
>> - <xsd:element maxOccurs="unbounded" name="getListValues">
>> - <xsd:complexType>
>> - <xsd:sequence>
>>   <xsd:element name="Assigned_To" type="xsd:string" />
>>   <xsd:element name="Create_Date" type="xsd:dateTime" />
>>   <xsd:element name="Last_Modified_By" type="xsd:string" />
>>   <xsd:element name="Modified_Date" type="xsd:dateTime" />
>>   <xsd:element name="Request_ID" type="xsd:string" />
>>   <xsd:element name="Short_Description" type="xsd:string" />
>>   <xsd:element name="Status" type="s0:StatusType" />
>>   <xsd:element name="Status_History" type="xsd:string" />
>>   <xsd:element name="Submitter" type="xsd:string" />
>>   </xsd:sequence>
>>   </xsd:complexType>
>>   </xsd:element>
>>   </xsd:sequence>
>>   </xsd:complexType>
>>   <xsd:element name="OpSet" type="s0:SetInputMap" />
>> - <xsd:complexType name="SetInputMap">
>> - <xsd:sequence>
>>   <xsd:element name="Assigned_To" type="xsd:string" />
>>   <xsd:element name="Short_Description" type="xsd:string" />
>>   <xsd:element name="Status" type="s0:StatusType" />
>>   <xsd:element name="Submitter" type="xsd:string" />
>>   <xsd:element name="Request_ID" type="xsd:string" />
>>   </xsd:sequence>
>>   </xsd:complexType>
>>   <xsd:element name="OpSetResponse" type="s0:SetOutputMap" />
>> - <xsd:complexType name="SetOutputMap">
>>   <xsd:sequence />
>>   </xsd:complexType>
>>   <xsd:element name="AuthenticationInfo" type="s0:AuthenticationInfo" />
>> - <xsd:complexType name="AuthenticationInfo">
>> - <xsd:sequence>
>>   <xsd:element name="userName" type="xsd:string" />
>>   <xsd:element name="password" type="xsd:string" />
>>   <xsd:element minOccurs="0" name="authentication" type="xsd:string" />
>>   <xsd:element minOccurs="0" name="locale" type="xsd:string" />
>>   <xsd:element minOccurs="0" name="timeZone" type="xsd:string" />
>>   </xsd:sequence>
>>   </xsd:complexType>
>>   </xsd:schema>
>>   </wsdl:types>
>> - <wsdl:message name="OpCreateSoapIn">
>>   <wsdl:part element="s0:OpCreate" name="parameters" />
>>   </wsdl:message>
>> - <wsdl:message name="OpGetSoapOut">
>>   <wsdl:part element="s0:OpGetResponse" name="parameters" />
>>   </wsdl:message>
>> - <wsdl:message name="ARAuthenticate">
>>   <wsdl:part element="s0:AuthenticationInfo" name="parameters" />
>>   </wsdl:message>
>> - <wsdl:message name="OpGetListSoapOut">
>>   <wsdl:part element="s0:OpGetListResponse" name="parameters" />
>>   </wsdl:message>
>> - <wsdl:message name="OpGetListSoapIn">
>>   <wsdl:part element="s0:OpGetList" name="parameters" />
>>   </wsdl:message>
>> - <wsdl:message name="OpSetSoapIn">
>>   <wsdl:part element="s0:OpSet" name="parameters" />
>>   </wsdl:message>
>> - <wsdl:message name="OpCreateSoapOut">
>>   <wsdl:part element="s0:OpCreateResponse" name="parameters" />
>>   </wsdl:message>
>> - <wsdl:message name="OpSetSoapOut">
>>   <wsdl:part element="s0:OpSetResponse" name="parameters" />
>>   </wsdl:message>
>> - <wsdl:message name="OpGetSoapIn">
>>   <wsdl:part element="s0:OpGet" name="parameters" />
>>   </wsdl:message>
>> - <wsdl:portType name="testwsPortType">
>> - <wsdl:operation name="OpGet">
>>   <wsdl:input message="s0:OpGetSoapIn" />
>>   <wsdl:output message="s0:OpGetSoapOut" />
>>   </wsdl:operation>
>> - <wsdl:operation name="OpCreate">
>>   <wsdl:input message="s0:OpCreateSoapIn" />
>>   <wsdl:output message="s0:OpCreateSoapOut" />
>>   </wsdl:operation>
>> - <wsdl:operation name="OpGetList">
>>   <wsdl:input message="s0:OpGetListSoapIn" />
>>   <wsdl:output message="s0:OpGetListSoapOut" />
>>   </wsdl:operation>
>> - <wsdl:operation name="OpSet">
>>   <wsdl:input message="s0:OpSetSoapIn" />
>>   <wsdl:output message="s0:OpSetSoapOut" />
>>   </wsdl:operation>
>>   </wsdl:portType>
>> - <wsdl:binding name="testwsSoapBinding" type="s0:testwsPortType">
>>   <soap:binding style="document"
>> transport="http://schemas.xmlsoap.org/soap/http"; />
>> - <wsdl:operation name="OpGet">
>>   <soap:operation soapAction="urn:testws/OpGet" style="document" />
>> - <wsdl:input>
>>   <soap:header message="s0:ARAuthenticate" part="parameters"
>> use="literal"
>> />
>>   <soap:body use="literal" />
>>   </wsdl:input>
>> - <wsdl:output>
>>   <soap:body use="literal" />
>>   </wsdl:output>
>>   </wsdl:operation>
>> - <wsdl:operation name="OpCreate">
>>   <soap:operation soapAction="urn:testws/OpCreate" style="document" />
>> - <wsdl:input>
>>   <soap:header message="s0:ARAuthenticate" part="parameters"
>> use="literal"
>> />
>>   <soap:body use="literal" />
>>   </wsdl:input>
>> - <wsdl:output>
>>   <soap:body use="literal" />
>>   </wsdl:output>
>>   </wsdl:operation>
>> - <wsdl:operation name="OpGetList">
>>   <soap:operation soapAction="urn:testws/OpGetList" style="document" />
>> - <wsdl:input>
>>   <soap:header message="s0:ARAuthenticate" part="parameters"
>> use="literal"
>> />
>>   <soap:body use="literal" />
>>   </wsdl:input>
>> - <wsdl:output>
>>   <soap:body use="literal" />
>>   </wsdl:output>
>>   </wsdl:operation>
>> - <wsdl:operation name="OpSet">
>>   <soap:operation soapAction="urn:testws/OpSet" style="document" />
>> - <wsdl:input>
>>   <soap:header message="s0:ARAuthenticate" part="parameters"
>> use="literal"
>> />
>>   <soap:body use="literal" />
>>   </wsdl:input>
>> - <wsdl:output>
>>   <soap:body use="literal" />
>>   </wsdl:output>
>>   </wsdl:operation>
>>   </wsdl:binding>
>> - <wsdl:service name="testwsService">
>> - <wsdl:port binding="s0:testwsSoapBinding" name="testwsSoap">
>>   <soap:address
>> location="http://yoda/arsys/services/ARService?server=YODA&webService=testws";
>> />
>>   </wsdl:port>
>>   </wsdl:service>
>>   </wsdl:definitions>
>>
>> ********** end of WSDL *************
>>
>>
>> Let me know if I can send along anything else!
>>
>>
>> --Ezra
>>
>>
>>
>>
>>
>> Anne Thomas Manes wrote:
>> >
>> > Me-thinks there might be something wrong with your WSDL. Axis should
>> > always send payload parameters in the body, not the header.
>> >
>> > Please post the WSDL.
>> >
>> > Anne
>> >
>> > On 8/23/06, ezwise <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Q: Is there a way to have the stub classes generated (using WSDL2Java)
>> >> with
>> >> the second to last "param" argument set to 'false' instead of 'true'??
>> >>
>> >> After running WSDL2Java for a given web service to generate the client
>> >> java
>> >> classes, I was unable to successfully invoke the web service.  After
>> some
>> >> investigation I found that the SOAP request contained the web service
>> >> parameters in its header, while the web service is checking for
>> >> parameters
>> >> in the SOAP request body.
>> >>
>> >> I modified the second to last argument of the parameter declarations
>> of
>> >> the
>> >> stub class generated by WSDL2Java, which was 'true':
>> >>
>> >>         param = new org.apache.axis.description.ParameterDesc(new
>> >> javax.xml.namespace.QName("urn:testws", "OpSet"),
>> >> org.apache.axis.description.ParameterDesc.IN, new
>> >> javax.xml.namespace.QName("urn:testws", "SetInputMap"),
>> >> testws.SetInputMap.class, true, false);
>> >>
>> >> and changed it to 'false':
>> >>
>> >>         param = new org.apache.axis.description.ParameterDesc(new
>> >> javax.xml.namespace.QName("urn:testws", "OpSet"),
>> >> org.apache.axis.description.ParameterDesc.IN, new
>> >> javax.xml.namespace.QName("urn:testws", "SetInputMap"),
>> >> testws.SetInputMap.class, false, false);
>> >>
>> >>
>> >> After making the change and compiling the classes everything works as
>> >> expected!
>> >>
>> >> Now, I just need to make this happen automatically.  Is there an Axis
>> >> class
>> >> that generates these stubs that I could change to modify this default
>> >> WSDL2Java behavior?
>> >>
>> >> Yes, I'm a newbie – so please handle w/ care.  Any assistance will be
>> >> greatly appreciated.
>> >>
>> >>
>> >> Regards,
>> >> Ezra
>> >> --
>> >> View this message in context:
>> >>
>> 
http://www.nabble.com/-Axis-1.2--Sending-SOAP-request-parameters-in-BODY-instead-of-HEADER-tf2154309.html#a5950916
>> >> Sent from the Axis - User forum at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> 
http://www.nabble.com/-Axis-1.2--Sending-SOAP-request-parameters-in-BODY-instead-of-HEADER-tf2154309.html#a5951232
>> Sent from the Axis - User forum at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

--
View this message in context: 
http://www.nabble.com/-Axis-1.2--Sending-SOAP-request-parameters-in-BODY-instead-of-HEADER-tf2154309.html#a5951871
Sent from the Axis - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to