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 Raghu Upadhyayula <ru...@responsys.com> on 2011/04/27 20:54:01 UTC

[Axis2] How to add SOAP Header to the response (output) message ...

Hi,

I’m using Axis2 1.4 version.  I want to add a SOAP Header to one of my APIs response.  And this is what I changed in have WSDL for the SOAP Header.


        <operation name="login">
            <soap:operation soapAction=""/>
            <input name="loginRequest">
                <soap:body use="literal"/>
            </input>
            <output name="loginResponse">
                <soap:body use="literal"/>
                <soap:header use="literal" message="tns:AcctHeader" part="AccountHeader"/>
            </output>
            <fault name="AcctFault">
               <soap:fault name="AcctFault" use="literal"/>
            </fault>
        </operation>


But when I generate the server side stubs using WSDL2Java (I’m using adb databinding), the LoginResponse object doesn’t have any method to set the AccountHeader object???

Any pointers on how to do this using ADB databinding???

Thanks
Raghu

Re: [Axis2] How to add SOAP Header to the response (output) message ...

Posted by fire fox <fy...@gmail.com>.
Working with custom SOAP headers : http://wso2.org/library/3156


On Thu, Apr 28, 2011 at 12:24 AM, Raghu Upadhyayula <
rupadhyayula@responsys.com> wrote:

>  Hi,
>
>
>
> I’m using Axis2 1.4 version.  I want to add a SOAP Header to one of my APIs
> response.  And this is what I changed in have WSDL for the SOAP Header.
>
>
>
>
>
>         <operation name=*"login"*>
>
>             <soap:operation soapAction=*""*/>
>
>             <input name=*"loginRequest"*>
>
>                 <soap:body use=*"literal"*/>
>
>             </input>
>
>             <output name=*"loginResponse"*>
>
>                 <soap:body use=*"literal"*/>
>
> *                **<**soap:header** use="literal" message="tns:AcctHeader"
> part="AccountHeader"/>*
>
>             </output>
>
>             <fault name=*"AcctFault"*>
>
>                <soap:fault name=*"AcctFault"* use=*"literal"*/>
>
>             </fault>
>
>         </operation>
>
>
>
>
>
> But when I generate the server side stubs using WSDL2Java (I’m using adb
> databinding), the LoginResponse object doesn’t have any method to set the
> AccountHeader object???
>
>
>
> Any pointers on how to do this using ADB databinding???
>
>
>
> Thanks
>
> Raghu
>