User Guide > Publishing Resources > Publishing Resources to a Web Service > Moving the Namespace Declaration From Elements to the Soap Header
 
Moving the Namespace Declaration From Elements to the Soap Header
In a published SOAP web service, to move the namespace declaration out of each element and define the namespace in the SOAP header you can use a Studio configuration parameter.
To toggle the location of the namespace declaration
1. From Studio, select Administration > Configuration from the Studio Modeler toolbar to open the Configuration window.
2. Locate the Declare Namespace in SOAP Envelope Element configuration parameter.
3. Set the value to true for the namespace to be declared once in the header or set it to false to have the namespace defined in each element.
4. Click OK to save changes and close the window.
For Example
When the value of the configuration parameter is false, each element would have something like this:
 
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<ns1:TestSQLScriptCustomevalueOutput xmlns:ns1="http://tempuri.org/">custom</ns1:TestSQLScriptCustomevalueOutput>
</soap-env:Header>
And if the value of the configuration parameter is changed to true, then it is declared once as a namespace in the SOAP header
 
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tempuri.org/">
<soap-env:Header>
<ns1:TestSQLScriptCustomevalueOutput>custom</ns1:TestSQLScriptCustomevalueOutput>
</soap-env:Header>