[ http://issues.apache.org/jira/browse/AXIS2-1103?page=all ]

Deepal Jayasinghe reassigned AXIS2-1103:
----------------------------------------

    Assignee: Deepal Jayasinghe

> Generated client code doesn't handle SOAPAction correctly
> ---------------------------------------------------------
>
>                 Key: AXIS2-1103
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1103
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: M2
>         Environment: Windows XP, Java 1.5.0_08
>            Reporter: Todd Doolittle
>         Assigned To: Deepal Jayasinghe
>
> I'm using the nightly build from 08/31/2006.  I am creating a client using 
> wsdl2java.  The WSDL specified a soapAction="" for the operation "Getinfo".  
> However the http header "SOAPAction" is being set to "urn:Getinfo". 
> In the generated stub, the method Getinfo() specifically sets the action="" 
> in the options for both the messageContext and the operationContext which 
> would appear to be correct accorind to the WSDL.  However when the message is 
> received by the server it contains the header SOAPAction: "urn:Getinfo".
>  I added code to the Getinfo method in the stub to print the action for 
> options in both the messageContext and operationConext just before the 
> operationContext.execute() call and right after the 
> operationContext.execute() call.  Just before the call both the 
> messageContext and the operationContext's action is set to "" in their 
> respective options.  However, right after the operationContext.execute() call 
> the messageContext's action is set to "urn:Getinfo" in it's options (the 
> opertionContext's action in it's options is still set to "").
> I am working around this by calling  
> _messageContext.getAxisOperation().setSoapAction("") just before the 
> operationContext.execute() call.  But I don't believe I should have to do 
> this.
> Note, in the release 1.0 version of Axis 2, it appears to work correctly 
> (i.e. the SOAPAction header is "" when the WSDL specifies the soapAction="").
> Here is the WSDL that was used to generate the client code.  I was using ADB 
> databinding if it matters.
> <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>       name="POC" targetNamespace="http://tempuri.org/";
>       xmlns:fjs="http://tempuri.org/";
>       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
>       xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>       <wsdl:types>
>               <xsd:schema elementFormDefault="qualified"
>                       targetNamespace="http://tempuri.org/";
>                       xmlns:s1="http://tempuri.org/";>
>                       <xsd:element name="lookup">
>                               <xsd:complexType>
>                                       <xsd:sequence>
>                                               <xsd:element 
> maxOccurs="unbounded" minOccurs="0"
>                                                       name="upc" 
> nillable="true" type="xsd:string" />
>                                       </xsd:sequence>
>                                       <xsd:attribute name="count" 
> type="xsd:int"
>                                               use="required" />
>                               </xsd:complexType>
>                       </xsd:element>
>                       <xsd:element name="GetinfoResponse">
>                               <xsd:complexType>
>                                       <xsd:sequence>
>                                               <xsd:element name="item" 
> nillable="true">
>                                                       <xsd:complexType>
>                                                               <xsd:sequence>
>                                                                       
> <xsd:element maxOccurs="unbounded"
>                                                                               
> minOccurs="0" name="item" nillable="true">
>                                                                               
> <xsd:complexType>
>                                                                               
>         <xsd:sequence>
>                                                                               
>                 <xsd:element name="ksn"
>                                                                               
>                         nillable="true" type="xsd:int" />
>                                                                               
>                 <xsd:element name="upc"
>                                                                               
>                         nillable="true" type="xsd:string" />
>                                                                               
>                 <xsd:element
>                                                                               
>                         name="maintdt" nillable="true" type="xsd:date" />
>                                                                               
>                 <xsd:element name="dpt"
>                                                                               
>                         nillable="true" type="xsd:int" />
>                                                                               
>         </xsd:sequence>
>                                                                               
>         <xsd:attribute name="count"
>                                                                               
>                 type="xsd:int" use="required" />
>                                                                               
> </xsd:complexType>
>                                                                       
> </xsd:element>
>                                                               </xsd:sequence>
>                                                       </xsd:complexType>
>                                               </xsd:element>
>                                       </xsd:sequence>
>                               </xsd:complexType>
>                       </xsd:element>
>               </xsd:schema>
>       </wsdl:types>
>       <wsdl:message name="GetinfoIn">
>               <wsdl:part element="fjs:lookup" name="parameters" />
>       </wsdl:message>
>       <wsdl:message name="GetinfoOut">
>               <wsdl:part element="fjs:GetinfoResponse" name="parameters" />
>       </wsdl:message>
>       <wsdl:portType name="POCPortType">
>               <wsdl:operation name="Getinfo">
>                       <wsdl:input message="fjs:GetinfoIn" name="lookup" />
>                       <wsdl:output message="fjs:GetinfoOut"
>                               name="GetinfoResponse" />
>               </wsdl:operation>
>       </wsdl:portType>
>       <wsdl:binding name="POCBinding" type="fjs:POCPortType">
>               <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; 
> />
>               <wsdl:operation name="Getinfo">
>                       <soap:operation soapAction="" style="document" />
>                       <wsdl:input name="lookup">
>                               <soap:body use="literal" />
>                       </wsdl:input>
>                       <wsdl:output name="GetinfoResponse">
>                               <soap:body use="literal" />
>                       </wsdl:output>
>               </wsdl:operation>
>       </wsdl:binding>
>       <wsdl:service name="POC">
>               <wsdl:port binding="fjs:POCBinding" name="POCPortType">
>                       <soap:address location="http://localhost:8090/POC/POC"; 
> />
>               </wsdl:port>
>       </wsdl:service>
> </wsdl:definitions>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to