Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8662387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:43:35+00:00 2026-06-12T16:43:35+00:00

<soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/> <soapenv:Body> <tns:send xmlns:tns=http://www.test.com/Service/v3> <NS2:Message release=006 version=010 xmlns:NS2=http://www.ncpdp.org/schema/SCRIPT> <NS2:Body> <NS2:New> <NS2:Pharmacy> <NS2:Identification> <NS2:ID>

  • 0
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
     <soapenv:Body>
      <tns:send xmlns:tns="http://www.test.com/Service/v3">
         <NS2:Message release="006" version="010" xmlns:NS2="http://www.ncpdp.org/schema/SCRIPT">

            <NS2:Body>
               <NS2:New>
                  <NS2:Pharmacy>
                     <NS2:Identification>
                        <NS2:ID>
                           <NS2:IDValue>01017</NS2:IDValue>
                           <NS2:IDQualifier>94</NS2:IDQualifier>
                           <NS2:IDRegion>SCA</NS2:IDRegion>
                            <NS2:IDState>CA</NS2:IDState>
                        </NS2:ID>
                             </NS2:Identification>
                             </NS2:Pharmacy>
                    </NS2:New>
            </NS2:Body>
         </NS2:Message>
      </tns:send>
   </soapenv:Body>
</soapenv:Envelope>

I have this xml which is on schema version 3.0 http://www.test.com/Service/v3 . I need to downgrade it to version 1 http://www.test.com/Service/v1. To do that i am using a XSL to transform it.

        <?xml version="1.0" encoding="ISO-8859-1"?>
        <xsl:stylesheet version="2.0" 
            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
            xmlns:booga="http://schemas.xmlsoap.org/wsdl/"
            xmlns:tns="http://www.test.com/Service/v3"
            xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
            xmlns:src="http://www.ncpdp.org/schema/SCRIPT"
        > 


        <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

        <xsl:strip-space elements="*"/>


        <xsl:template match="node()|@*">
          <xsl:copy>
           <xsl:apply-templates select="node()|@*"/>

           </xsl:copy>

         </xsl:template>

         <xsl:template match="tns:*">
            <!-- Output a new element in the new namespace -->
            <xsl:element name="tns:{local-name()}" namespace="http://www.test.com/Service/v1">
              <!-- Copy all child attributes and nodes 
             <xsl:apply-templates select="node()|@*"/> -->
            <xsl:apply-templates  />
            </xsl:element>
          </xsl:template>

        </xsl:stylesheet>

but i get a result like this

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
     <soapenv:Body>
      <tns:send xmlns:tns="http://www.test.com/Service/v3">
         <NS2:Message release="006" version="010" xmlns:NS2="http://www.ncpdp.org/schema/SCRIPT" xmlns:tns="http://www.test.com/Service/v3">

            <NS2:Body>
               <NS2:New>
                  <NS2:Pharmacy>
                     <NS2:Identification>
                        <NS2:ID>
                           <NS2:IDValue>01017</NS2:IDValue>
                           <NS2:IDQualifier>94</NS2:IDQualifier>
                           <NS2:IDRegion>SCA</NS2:IDRegion>
                            <NS2:IDState>CA</NS2:IDState>
                        </NS2:ID>
                         </NS2:Identification>
                         </NS2:Pharmacy>
                    </NS2:New>
            </NS2:Body>
         </NS2:Message>
      </tns:send>
   </soapenv:Body>
</soapenv:Envelope>

In my output XML i get this

<NS2:Message release="006" version="010" xmlns:NS2="http://www.ncpdp.org/schema/SCRIPT"   xmlns:tns="http://eps.pdxinc.com/webservice/Rxservice/v3"> 

Why was this added to the NS2:Message?

xmlns:tns="http://eps.pdxinc.com/webservice/Rxservice/v3 

It was not there in the input xml.

There is something which I am missing. I would really appreciate if someone could point out the issue.

What I am looking to create in the output is the following:

<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <tns:send xmlns:tns="http://www.test.com/Service/v1">
            <NS2:Message release="006" version="010" xmlns:NS2="http://www.ncpdp.org/schema/SCRIPT" >

                <NS2:Body>
                    <NS2:New>
                        <NS2:Pharmacy>
                            <NS2:Identification>
                                <NS2:ID>
                                    <NS2:IDValue>01017</NS2:IDValue>
                                    <NS2:IDQualifier>94</NS2:IDQualifier>
                                    <NS2:IDRegion>SCA</NS2:IDRegion>
                                    <NS2:IDState>CA</NS2:IDState>
                                </NS2:ID>
                            </NS2:Identification>
                        </NS2:Pharmacy>
                    </NS2:New>
                </NS2:Body>
            </NS2:Message>
        </tns:send>
    </soapenv:Body>
</soapenv:Envelope>

The XSL document I am applying is adding an extra namespace xmlns:tns="http://www.test.com/Service/v3 in the NS2:Message.

Orginally the tag was :

<NS2:Message release="006" version="010" xmlns:NS2="http://www.ncpdp.org/schema/SCRIPT">

After i applied XSL it changed to :

<NS2:Message release="006" version="010" xmlns:NS2="http://www.ncpdp.org/schema/SCRIPT" xmlns:tns="http://www.test.com/Service/v3>

I don’t know where this namespace is getting added.

All I wanted was to transform xmlns:tns="http://www.test.com/Service/v3 to xmlns:tns="http://www.test.com/Service/v3 in tns:send tag.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:43:36+00:00Added an answer on June 12, 2026 at 4:43 pm

    Try this…

    XML Input

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
        <soapenv:Body>
            <tns:send xmlns:tns="http://www.test.com/Service/v3">
                <NS2:Message release="006" version="010" xmlns:NS2="http://www.ncpdp.org/schema/SCRIPT">
    
                    <NS2:Body>
                        <NS2:New>
                            <NS2:Pharmacy>
                                <NS2:Identification>
                                    <NS2:ID>
                                        <NS2:IDValue>01017</NS2:IDValue>
                                        <NS2:IDQualifier>94</NS2:IDQualifier>
                                        <NS2:IDRegion>SCA</NS2:IDRegion>
                                        <NS2:IDState>CA</NS2:IDState>
                                    </NS2:ID>
                                </NS2:Identification>
                            </NS2:Pharmacy>
                        </NS2:New>
                    </NS2:Body>
                </NS2:Message>
            </tns:send>
        </soapenv:Body>
    </soapenv:Envelope>
    

    XSLT 1.0 (or 2.0 if you change the version)

    (Edit: Changed “tns” prefix to “djh” to illustrate how the prefix doesn’t matter.)

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:djh="http://www.test.com/Service/v3"
        xmlns:NS2="http://www.ncpdp.org/schema/SCRIPT"
        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
        <xsl:output indent="yes"/>
        <xsl:strip-space elements="*"/>
    
        <xsl:template match="@*|comment()|processing-instruction()">
            <xsl:copy>
                <xsl:apply-templates select="@*|node()"/>
            </xsl:copy>
        </xsl:template>
    
        <xsl:template match="djh:*">
            <xsl:element name="{name()}" namespace="http://www.test.com/Service/v1">
                <xsl:apply-templates select="@*|node()"/>
            </xsl:element>  
        </xsl:template>
    
        <xsl:template match="*">
            <xsl:element name="{name()}">
                <xsl:apply-templates select="@*|node()"/>
            </xsl:element>      
        </xsl:template>
    
    </xsl:stylesheet>
    

    XML Output

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Body>
          <tns:send xmlns:tns="http://www.test.com/Service/v1">
             <NS2:Message xmlns:NS2="http://www.ncpdp.org/schema/SCRIPT" release="006" version="010">
                <NS2:Body>
                   <NS2:New>
                      <NS2:Pharmacy>
                         <NS2:Identification>
                            <NS2:ID>
                               <NS2:IDValue>01017</NS2:IDValue>
                               <NS2:IDQualifier>94</NS2:IDQualifier>
                               <NS2:IDRegion>SCA</NS2:IDRegion>
                               <NS2:IDState>CA</NS2:IDState>
                            </NS2:ID>
                         </NS2:Identification>
                      </NS2:Pharmacy>
                   </NS2:New>
                </NS2:Body>
             </NS2:Message>
          </tns:send>
       </soapenv:Body>
    </soapenv:Envelope>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns=urn:enterprise.soap.sforce.com> <soapenv:Body> <upsertResponse> <result> <created>true</created> <id>0011</id> <success>true</success> </result> <result> <created>false</created> <id>0012</id> <success>true</success>
I have a SOAP request of this form: <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:myqname=http://example.com/hello xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance> <soapenv:Header/> <soapenv:Body>
My Soap wsdl is: <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:tem=http://tempuri.org/> <soapenv:Header/> <soapenv:Body> <tem:AddTagDetails> <!--Optional:--> <tem:objtag> <tem:FKPersonID></tem:FKPersonID> <tem:FKConferenceID></tem:FKConferenceID>
<soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:t1=http://mynamespace/A xmlns:top=http://mynamespace/B xmlns:max=http://mynamespace/C><soapenv:Body> <t1:Creditcard> <top:AutoPayenroll> <top:CustomerId> <max:CustName>Taylor</max:CustName> <max:CustID>1234</max:CustID> </top:CustomerId> </top:AutoPayenroll> </t1:CreditCard></soapenv:Body></soapenv:Envelope> Need
Sample XML: <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 xmlns:env=http://schemas.xmlsoap.org/soap/envelope/ xmlns:dp=http://www.datapower.com/schemas/management> soapenv:Body> <recordClaim xmlns=http://webservices.zurich.com/zsoa/fig/claimmanagement/lossnotification-v1_0> <requestHeader> <ns1:userId <ns2:systemDateTime
I have this message <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server</faultcode> <faultstring>LOGIN-ERR:Incorrect password - user could
I have xml 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:Body> <supplyCrew xmlns=http://site.ddf.com> <login> <login>XXXX</login>
I have the following xml code: <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/> <soapenv:Body> <cms:RelatedConfigurationItemList xmlns:cms=some namespace> <ConfigurationItem> <name>data</name>
<?xml version=1.0 encoding=UTF-8?> <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/><env:Header xmlns:env=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance/><soapenv:Body><v9:ProcessShipmentReply xmlns:v9=http://fedex.com/ws/ship/v9><v9:HighestSeverity xmlns:env=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance>SUCCESS</v9:HighestSeverity><v9:Notifications xmlns:env=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance><v9:Severity>SUCCESS</v9:Severity><v9:Source>ship</v9:Source><v9:Code>0000</v9:Code><v9:Message>Success</v9:Message><v9:LocalizedMessage>Success</v9:LocalizedMessage></v9:Notifications><v9:Version> <v9:ServiceId>ship</v9:ServiceId> <v9:Major>9</v9:Major>
I need to create SOAP request like this: <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:stor=http://storage.xdoc.xx/> <soapenv:Header/> <soapenv:Body> <stor:createDocument>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.