views:

89

answers:

0

I am developing a client to a webservice using apache axis 1.5

I am trying add 2 child elements to SOAP header with different namespaces for example

<soapenv:Header>
        <wsse:Security soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
            soapenv:mustUnderstand="0" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext"&gt;
            <wsse:UsernameToken>
                <wsse:Username>scott</wsse:Username>
                <wsse:Password>tiger</wsse:Password>
            </wsse:UsernameToken>

        </wsse:Security>
        <ns1:sessionID xmlns:ns1="http://core.webservices.com/session"&gt;
                58447020-AB14-11DF-B020-B5D870D6D304
             </ns1:sessionID>
    </soapenv:Header>

How do i do this in axis API which allows 1 namesapce in the SOAPHeader like

    private static final String HDR_PREFIX = "wsse";
    private static final String HDR_URI = "http://schemas.xmlsoap.org/ws/2002/07/secext";

SOAPHeaderElement headerElement = new SOAPHeaderElement(new QName(HDR_URI,"Security",HDR_PREFIX));

related questions