Hi All
I am using Axis 1.1(Java).
I have the following soap body
<soapenv:Body><ns1:encryptRequest
xmlns:ns1="urn:wsc.td.com/mdm/wsdl/2011/08/23"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><clearTextBlock><ns1:fieldName>MDM.CreditCardNumber</ns1:fieldName><clearTextValue
ns1:id="_102">11111</clearTextValue><clearTextValue
ns1:id="_101">12345</clearTextValue><clearTextValue
ns1:id="_103">56789</clearTextValue></clearTextBlock></ns1:encryptRequest>
</soapenv:Body>

I am adding the following soap header to the soap envelope with the soap
body.
<soapenv:Header><UsernameToken
xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";><Username>tmdmsc</Username><Password>testmdm1</Password></UsernameToken>
</soapenv:Header>

After adding the SOAP Header to the SOAP envelope the namespace prefix(ns1)
is being removed in the final SOAP Request.The final SOAP request looks like
this.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<soapenv:Header><Security
xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";><UsernameToken><Username>tmdmsc</Username><Password>testmdm1</Password></UsernameToken></Security>
</soapenv:Header>
<soapenv:Body><encryptRequest xmlns:ns1="urn:wsc.td.com/mdm/wsdl/2011/08/23"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><clearTextBlock><fieldName>MDM.CreditCardNumber</fieldName><clearTextValue
ns1:id="_102">11111</clearTextValue><clearTextValue
ns1:id="_101">12345</clearTextValue><clearTextValue
ns1:id="_103">56789</clearTextValue></clearTextBlock></encryptRequest>
</soapenv:Body>
</soapenv:Envelope>

You can see that the prefix ns1 is being removed from the tag name
<encryptRequest> and other tags.

I am using addHeader(SOAPHeaderElement hdr) method of SOAPEnvelope.
Can anyone help me with this problem?


-- 
View this message in context: 
http://old.nabble.com/Axis-1.1%3A-Problem-with-SOAPEnvelope.addHeader%28SOAPHeaderElement-hdr%29-tp32839045p32839045.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to