[ 
https://issues.apache.org/jira/browse/AXIS2-4215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Doug Guzek reopened AXIS2-4215:
-------------------------------


I tried what you suggested, but still the namespace does not get included 
within the response.

See the snippet of code I added to the original post.

Also,please direct me with how to submit these type of issues to the mailing 
list. Thank you.

> How can I add a namespace definition to SOAP Envelope
> -----------------------------------------------------
>
>                 Key: AXIS2-4215
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4215
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: Windows/JBOSS/AXIS2-1.3
>            Reporter: Doug Guzek
>
> I know of no other place but here to ask this question:
> I am building a SOAP message for a response to my web service. I am able to 
> build everything except for adding NameSpace definitions to the soap:Envelope.
> How can I add the following 2 namespaces to the soap:Envelope...
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>       xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
> ....so that it looks like this?
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>       xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>       <soap:Header
>               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>               <payloadManifest
>                       
> xmlns="http://www.starstandards.org/webservices/2003/12/transport";>
>                       <manifest xmlns="" id="719409674" namespaceURI=""
>                               element="ProcessRepairOrder" />
>               </payloadManifest>
> I tried several things...one of which I thought this should work, but doesnt:
> //This loading of 2 namespaces to SOAPEnvelope does NOT seem to be working
> org.apache.axiom.soap.SOAPFactory soap11Factory =
> OMAbstractFactory.getSOAP11Factory();
> org.apache.axiom.soap.SOAPEnvelope se = soap11Factory.getDefaultEnvelope();
> OMFactory nsfactory = OMAbstractFactory.getOMFactory();
> OMNamespace hdrNs1 = 
> nsfactory.createOMNamespace("http://www.w3.org/2001/XMLSchema-instance","xsi";);
> OMNamespace hdrNs2 = 
> nsfactory.createOMNamespace("http://www.w3.org/2001/XMLSchema","xsd";);
> se.declareNamespace(hdrNs1);
> se.declareNamespace(hdrNs2);
> serviceClient.addHeadersToEnvelope(se);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to