Remove ns1: namespace prefix in HTTP adapter

Dear Experts,
I'm facing the following issue, using the plain HTTP receiver adapter:
when I'm sending out my XML message, the "usual" ns1: namespace prefixes are added to the message.
It goes out like this:
<?xml version="1.0" encoding="UTF-8"?>
<ns1:INQUIRY xmlns:ns1="urn:namespace.com:retail">
<SESSION_ID>0000157338</SESSION_ID>
<POSITION>
<item>
</ns1:INQUIRY>
And it should be like this:
<?xml version="1.0" encoding="UTF-8"?>
<INQUIRY xmlns:ns1="urn:namespace.com:retail">
<SESSION_ID>0000157338</SESSION_ID>
<POSITION>
<item>
</INQUIRY>
In previous forum-threads, there are several proposed solutions:
1. using the XMLAnonymizerBean
It doesn't work here, because in plain HTTP I cannot call up any module processor (it doesn't go through the AE)
2. using XSLT to remove the complete namespace
It is not good, because I have to keep the namesapce, but without the ns1 prefixes
So, the question to you is: how to delete only(!) the ns1 prefixes, keeping the original namespace in the message.
Any comments are welcome!
Best regards,
Andras Kovacs

Dear Stefan,
thank you for the helpful response!
Some thougths about the proposed solutions:
- Create external wsdl/xsd without prefix: I tried thois point with Sytlus-Studio, but here I can only delete/remove the whole namespace. If I leave the namespace in the message, the prefix will be added again as well.
- Java mapping: the general question here, how to remove something from the payload? Should we use string manipulation (like Alessandro mentions it in his blog: /people/alessandro.guarneri/blog/2006/10/13/get-rid-of-recordset-node ) or should we use here SAX ? Is there any "standard" solution for this?
- Use SOAP adapter instead of plain HTTP: it worked quite well and I could remove the prefix with the XMLAnonymizer Bean!
Here you mentioned that it can called up in "no SOAP mode". Do you mean here check in the "don't use SOAP envelope" checkbox or is it something more?
Thank you in advance for the useful responses!
Best regards,
Andras

Similar Messages

  • How to remove namespace prefix

    hi,
    i have a problem in receiver SOAP adapter because of namespace prefix.
    so i have to remove the namespace prefix from the paylaod. but namespace should be there...
    what are the possibilities to remove the namespace prefix alone from the payload?
    Thanks & Regards,
    Krish

    hi,
    you have to simply add one module in your communication channel
    that is XMLAnonymizerBean
    you can refer below for help:
    Remove namespace prefix or change XML encoding with the XMLAnonymizerBean
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
    hope it helps.
    regards,
    ujjwal kumar

  • Removing namespace prefixes

    I am familiar with the XmlOptions.setUseDefaultNamespace() to remove the namespace prefixes on the XML generated by my XMLBean. However, how do I specify which namespace prefix should be removed (if my XMLBean contains multiple namespace prefixes)? The docs for XmlOptions specify:
    "If this option is set, the saver will try to use the default namespace for the most commonly used URI. If it is not set the saver will always created named prefixes."
    Doing some testing, I have found that sometimes the correct namespace is being set as the default namespace. If my original document is:
    <ns1:a ...>
    <ns1:b ...>foo</b>
    <ns2:c ...>bar</c>
    </a>
    if I use the xmlText(XmlOptions) method then I sometimes get back:
    <a ...>
    <b ...>foo</b>
    <ns2:c ...>bar</c>
    </a>
    and sometimes get:
    <ns1:a ...>
    <ns1:b ...>foo</b>
    <c ...>bar</c>
    </a>
    Any thoughts?

    Hello,
    I'm using xmlbeans in my project. I'm constructing xml using the xmlbeans
    generated sources from the XML Schema files. The server to which I'm
    sending the request doesn't recognize the namespace URI's or the prefixes.
    so, once the XML document is constructed, I'm trying to strip of the
    namespace URI's and prefixes using the below code and couldn't get it to
    work.
    Map m=
    new HashMap();
    m.put(
    http://www.abc.com/schemas/myproj/avail/2008/01, "");
    m.put(
    http://www.abc.com/schemas/myproj/common/2008/01,"";);
    opts.setLoadSubstituteNamespaces(m);
    opts.setUseDefaultNamespace();
    SampleRQDocument propAvailRQDoc = SampleRQDocument.Factory.*newInstance*
    (opts);
    The schemas are defined under 3 different namespaces.
    How can I remove the Namespace URI's and Prefixes after I construct the XML
    document?
    Next thing, when the server sends the response, the response doesn't include
    any Namespace URI or the prefixes. How can I embed the URI's and Prefixes in
    the response document after I receive it so, I can use XML Beans
    to bind the XML to the generated sources.
    I searched on google but couldn't find a suitable solution.
    Any help in this regard is greatly appreciated.
    Thanks,
    Sridhar.

  • How to add an element with a namespace prefix (Part 2)

    Hi all,
    I previously asked a question about adding an attribute with a namespace prefix to an element that already exists and that declares the namespace prefix here:
    https://forums.oracle.com/thread/2610142
    I received an answer that works, but now I am stumped again when I have to add an element where the element name has the namespace prefix.
    For example, let's say I already have this element:
    <A xmlns="namespace" xmlns:def="myns_namespace"/>
    And I want to add this element:
    <def:B/>
    To produce this:
    <A xmlns="namespace" xmlns:def="myns_namespace">
         <def:B/>
    </A>
    and NOT this:
    <A xmlns="namespace" xmlns:def="myns_namespace">
         <def:B  xmlns:def="myns_namespace"/>
    </A>
    This does not work:
    SELECT
    xmlserialize(document
        appendChildXML(
         xmltype('<A xmlns="namespace" xmlns:def="myns_namespace"/>')
        , '/A'
        , xmlelement("def:D")
        , 'xmlns="namespace" xmlns:def="myns_namespace"'
      indent)
    FROM dual;
    Because of this error:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00234: namespace prefix "def" is not declared
    Error at line 1
    31011. 00000 -  "XML parsing failed"
    *Cause:    XML parser returned an error while trying to parse the document.
    *Action:   Check if the document to be parsed is valid.
    Is there any way to do this without the child element having the duplicate namespace declaration?
    My oracle version is:
    Oracle Database 11g Release 11.1.0.7.0 - 64bit Production

    Hi,
    This one's tricky, so tricky that I think it's not possible using Oracle built-in XML DML functions.
    Even XQuery Update cannot do it (for now) because, likewise, the prefix is always redeclared at child level.
    The only thing I can think of is XSLT (or maybe DOM manipulation) :
    SQL> select xmlserialize(document
      2           xmltransform(
      3             xmltype('<A xmlns="namespace" xmlns:def="myns_namespace"/>')
      4           , xmltype(
      5  '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      6     xmlns:def="myns_namespace"
      7     xmlns:ns0="namespace">
      8    <xsl:template match="ns0:A">
      9      <xsl:copy>
    10        <xsl:element name="def:B"/>
    11      </xsl:copy>
    12    </xsl:template>
    13  </xsl:stylesheet>')
    14         )
    15        indent
    16      )
    17  from dual;
    XMLSERIALIZE(DOCUMENTXMLTRANSF
    <A xmlns="namespace" xmlns:def="myns_namespace">
      <def:B/>
    </A>

  • Remove namespace alias for HTTP receiver adapter

    hello all,
    I have a scenario, IDOC->XML (HTTPS). Standard output of PI has ns0: as prefix for each xml tag (ns0 alias for namespace)
    I want to remove the namespace alias while preserving the namespace in the output. So removing namespace reference in external definition is not a option.
    Is there any way to use XMLAnonymizerBean for HTTP receiver adapter? What are other alternatives (java mapping)?
    Thanks,
    sachin

    Thanks stefan, prateek.
    Prateek: I checked this blog earlier. It talks about inbound processing. My scenario is outbound HTTP and I am not sure how I can use specific adapter service as mentioned in blog in outbound case as other scenarios are using standards adapter_plain service.
    Stefan: I will try this approach.
    regards,
    sachin

  • Namespace prefix problem in http adapter response

    Hi All;
    I use http adapter to call a third party service. I  post a XML request and it responses me as XML again..
    But when I call the proxy, it gives mapping error in response. because it expects namespace prefix in the first tag of the response xml.
    How can I get this xml back without any namespace?
    My response xml likefollowing  
    <?xml version="1.0" encoding="UTF-8" ?>
        <OrderLines>
           <item>
               <DocumentNo>99000140</DocumentNoitem>
        </item> 
    </OrderLines>
    but the adapter expects as
    <?xml version="1.0" encoding="UTF-8" ?>
        <ns0:OrderLines xmlns:ns0="http://company.com">
           <item>
               <DocumentNo>99000140</DocumentNoitem>
        </item> 
    </ns0:OrderLines>

    You can use the XMLAnonymizer module with your adapter (if you are using SOAP adapter for the call as HTTP adapter does not support modules) to remove the namespaces. Kindly check the following blogs for modules:
    Gabriel Sagaya Selvam - Standard Adapter Framework modules in PI 7.1 u2013Part 1
    /people/gabrielsagayaselvam.panneerselvam/blog/2009/12/07/standard-adapter-framework-modules-afmodules-in-pi-71-150part-1
    Gabriel Sagaya Selvam - Standard Adapter Framework modules in PI 7.1 u2013Part 2
    /people/gabrielsagayaselvam.panneerselvam/blog/2009/12/07/standard-adapter-framework-modules-afmodules-in-pi-71-150part-2
    Regards,
    Gökhan

  • How to remove namespace prefix from target payload when using HTTP in PI7.0

    Hi,
    i have a requirement to remove namespace prefix from target payload when receiver receives the payload by an HTTP request.
    i am not able to use XML Anonymizer Bean as in HTTP channel its not possiile.
    Target structure after mapping now is:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns3:Order xmlns:ns3="urn:xxx-com:pi:project">
    fields
    </ns3:Order>
    i need the target structure after mapping should look like:
    <?xml version="1.0" encoding="UTF-8"?>
    <Order xmlns:="urn:xxx-com:pi:project">
    fields
    <Order>
    i removed namespace from source and target Message Type of message mapping but still getting "ns3" prefix. My requirement is to just have this ns3 removed.
    Please reply if anyone has solved this problem before.
    Thanks

    Hi ,
    >>>i removed namespace from source and target Message Type of message mapping but still getting "ns3" prefix. My requirement is to just have this ns3 removed.
    Which process you've used for removing namespace...java/xslt mapping. In case of java mapping plese remove ns3 while creating the target element. Please go through the below blog it may help you.
    Quick Tips: Dealing with Namespaces in XI/PI
    Regards,
    Priyanka

  • Remove Namespace Prefix from SOAP response

    Hi
    I have a File-XI-SOAP scenario. I pass data from the file to SOAP. If the data is good, I receive a Response and If the data is bad I get an fault message called AccountUtilsException. But I am not able to read this message properly.
    The message we receive from the webservice is
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Request Message Mapping --> <edu.purdue.account.AccountUtils.AccountUtilsException xsi:type='ns1:AccountUtilsException' xmlns:ns1='urn://www.purdue.edu/apps/account/ns'><message xsi:type='soapenc:string' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'>lastName is a required field</message><type xsi:type='xsd:int'>5</type></edu.purdue.account.AccountUtils.AccountUtilsException>
    In sxmb_moni when we try to read this message I get the error Reference to undeclared namespace prefix: 'xsi'.
    I tried removing the xsi prefix using anonymizer.acceptNamespaces = urn://www.purdue.edu/apps/account/ns ns1.
    I tried this too urn://www.purdue.edu/apps/account/ns ''.
    the AF_MODULES/AnonymizerBean is second in my processing sequence immediately following the XISOAPAdapterBean.
    The problem still persists. Any suggestions? The webservice people are not willing to remove the xsi:
    Thanks,
    Jahnavi

    The XMLAnonymizerBean does not consider namespace prefixes in attributes. So you should allow also those prefixes and namespaces which are used here.
    Without the XMLAnonymizerBean the xsi namespace declaration should be available as well, if not it is a bug. Check if you have applied the latest patch and open an OSS ticket, if this is the case.
    Regards
    Stefan

  • Remove namespace prefix with the XMLAnonymizerBean is possible at SOAP Adap

    Hello,
    I am wondering is it possible Remove namespace prefix with the XMLAnonymizerBean at SOAP Receiver Adaptor?
    Thanks

    Hi Rajiv,
    Pl. go through this blog:
    /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
    Also if you want to use this at sender side, SOAP adapter will not support. Please check stefans reply in this thread:
    XMLAnonymizerBean doesnt work
    Regards,
    ---Satish

  • Namespace prefix for Security elements being removed from SOAP Header

    Hello, I'm seeing a strange problem when accessing a web service using two different Netbeans projects.
    If I use a Netbeans Java Application, add the Web Client Reference , add the web client code, all works fine and the wsse:Security element looks like this:
    <S:Header>
    <ns4:Security xmlns:ns2="IAMP" xmlns:ns3="urn:realops.com:amp:workflow" xmlns:ns4="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <ns4:UsernameToken>
    <ns4:Username>admin</ns4:Username>
    <ns4:Password>admin123</ns4:Password>
    </ns4:UsernameToken>
    </ns4:Security>
    However if I do a similar sort of thing but access the web service via a Web Application, the namespace prefix is removed from all child elements wsse:Security like so:
    <S:Header>
    <ns4:Security xmlns:ns2="IAMP" xmlns:ns3="urn:realops.com:amp:workflow" xmlns:ns4="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <UsernameToken>
    <Username>admin</Username>
    <Password>admin123</Password>
    </UsernameToken>
    </ns4:Security>
    Which causes an authentication exception.
    The question is, why, when the wsdl are exactly the same for both projects , is the namespace prefix removed from the web app?
    Thanks in advance,
    jsz.

    Hello, I'm seeing a strange problem when accessing a web service using two different Netbeans projects.
    If I use a Netbeans Java Application, add the Web Client Reference , add the web client code, all works fine and the wsse:Security element looks like this:
    <S:Header>
    <ns4:Security xmlns:ns2="IAMP" xmlns:ns3="urn:realops.com:amp:workflow" xmlns:ns4="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <ns4:UsernameToken>
    <ns4:Username>admin</ns4:Username>
    <ns4:Password>admin123</ns4:Password>
    </ns4:UsernameToken>
    </ns4:Security>
    However if I do a similar sort of thing but access the web service via a Web Application, the namespace prefix is removed from all child elements wsse:Security like so:
    <S:Header>
    <ns4:Security xmlns:ns2="IAMP" xmlns:ns3="urn:realops.com:amp:workflow" xmlns:ns4="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <UsernameToken>
    <Username>admin</Username>
    <Password>admin123</Password>
    </UsernameToken>
    </ns4:Security>
    Which causes an authentication exception.
    The question is, why, when the wsdl are exactly the same for both projects , is the namespace prefix removed from the web app?
    Thanks in advance,
    jsz.

  • How to build the "Path Prefix" HTTP Adapter at run time

    Hi All,
    I have a scenario wherein I have to call the HTTP Url of a thiird party system from R/3 via PI.
    The third party url looks liike this:
    http://gis/ias/cgi-bin/siscgi.exe?request=batch&command=<requests><request><name>sis_neighbouring_knos_for_sambandh_service</name><buffer>20</buffer><same_premise_kno>123</same_premise_kno><l
    eft_kno>331</left_kno><gis_id>4019589</gis_id><priority>same_premise_kno,left_kno,right_kno,gis_id</priority></request></requests>&user_name=sambandh.sias&pa
    ssword=sambandhsias
    I have successfully created a HTTP Recevier comm channel and provided the following in the "Path Prefix"
    /ias/cgi-bin/siscgi.exe?request=batch&command=<requests><request><name>sis_neighbouring_knos_for_sambandh_service</name><buffer>20</buffer><same_premise_kno>123</same_premise_kno><l
    eft_kno>331</left_kno><gis_id>4019589</gis_id><priority>same_premise_kno,left_kno,right_kno,gis_id</priority></request></requests>&user_name=sambandh.sias&pa
    ssword=sambandhsias
    But If I need to pass the values inside the xml tags specified above e.g. "name" at run time, How do I do that?
    I have explored the "Apply URL Parameters" option in the HTTP Comm channel but it has fixed names for the HTTP URL parameter.
    Please let me know how is this possible hopefully without a UDF
    thanks,
    Piyush

    Hi Piyush,
    Have you checked the option of ASMA of the adapter?
    http://help.sap.com/saphelp_nw04/helpdata/en/43/64dbb0af9f30b4e10000000a11466f/content.htm
    Also see Note 1101338 - Dynamic configuration of HTTP adapter
    Regards
    Suraj

  • Using HTTP adapter with no namespaces

    Hi,
    Is there anyway to use HTTP adapter when the provider does not accept the namespaces. The HTTP binding wizard requires a targetnamespace to be defined in the request and response xsds that we have to use.
    Thanks & Regards
    Siva

    Bernd we are trying to do the same thing only with the soap adapter.  I'm convinced that no one really knows how to do it.  We can't even find an SAP CONSULTANT that has done it .. at any cost!
    If you hear anything good .. please let me know - my email is [email protected]
    I think the nightmare is coming in because when SAP bought the j2ee ( application server ) they never really have integrated it so it's very confusing if the settings need to be done on the ABAP side or the J2EE side via visual administrator.  In addition most Basis guys are only experienced in the ABAP side and not the J2EE.

  • Plain HTTP Adapter (XML return without namespace)

    Hello Experts,
    I'm very new at XI.
    I'm using XI 7.0 SP9.
    I wanna make interface with public website using plain HTTP adapter.
    The receiver url is
    http://openapi.naver.com/search?key=cdb64b1f218b55acbb73105b3b6f68a9&query=news&target=rank
    It returns XML like
    <?xml version="1.0" encoding="UTF-8" ?>
    <result>
    <item>
        <R1>
            <K>CHOICE</K>
            <S>new</S>
            <V>0</V>
        </R1>
      </item>
    </result>
    How I can specify namespace and root document type ?
    I learned that I can specify namespace and root document type in JDBC communication channel.
    In plain HTTP, Is there any possibility to specify namespace like JDBC?

    Ji,
    look at this it will help u.
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    /people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
    /people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom
    Sreeram Reddy

  • Removal of namespace in xslt - Urgent pls

    All,
    version: 11.1.1.3.
    My incoming xml doc comes like this (sample one) into BPEL with namespace ns1
    +*<?xml version="1.0" encoding="UTF-8" ?>*+
    +*<ns1:OrderRequestHeader>*+
    +*<ns1:ShipTo>*+
    +*<ns1:Name xml:lang="en-US">P1- Atlanta</ns1:Name>*+
    +*</ns1:ShipTo>*+
    +*</ns1:OrderRequestHeader>*+
    To remove such namespace I used the template as below
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="*">
    <!-- remove element prefix (if any) -->
    <xsl:element name="{local-name()}">
    <!-- process attributes -->
    <xsl:for-each select="@*">
    <!-- remove attribute prefix (if any) -->
    <xsl:attribute name="{local-name()}">
    <xsl:value-of select="."/>
    </xsl:attribute>
    </xsl:for-each>
    <xsl:apply-templates/>
    </xsl:element>
    </xsl:template>
    </xsl:stylesheet>
    This template(googled it) remove all the namespace from element and also the attribute (*<ns1:Name xml:lang="en-US">P1- Atlanta</ns1:Name>*) i.e xml got removed from xml:lang. But I dont want to remove the namespace from attributes. Hence I removed the section below the commented line <!-- remove attribute prefix (if any) -->. This time the output just showed only the element without the attribute like this
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns1:OrderRequestHeader>
    <ns1:ShipTo>P1- Atlanta</ns1:Name>
    </ns1:ShipTo>
    </ns1:OrderRequestHeader>
    But I want the output to be with attribute with xml namespace. How do I achieve that? I tried many combination in the template, but couldnt get thru. Any help is highly appreciated.
    Thanks,
    Sen

    All,
    Am I not cleared with my queries? Its very urgent for me, ur help is much appreciated.
    Thanks,
    sen

  • XML Namespace Prefix Lost

    I am working on a RFC to JMS scenario and am having trouble getting the XML in the required format.  I have loaded the XML file provided in my mapping.  However the result was not what I had anticipated.
    <br>
    This is the XML provided and what I want to produce:
    <br>
    <
    ?xml version="1.0" encoding="UTF-8" ?>  <br>
    <MyNS3:Maint_Struc <br>
       xmlns:MyNS1="http://www.MyTest.com/My_Namespace/Part1"   <br>
       xmlns:MyNS2="http://www.MyTest.com/My_Namespace/Part2"   <br>
       xmlns:MyNS5="http://www.MyTest.com/My_Namespace/Part5"   <br>
       xmlns:MyNS3="http://www.MyTest.com/My_Namespace/Part3"   <br>
       xmlns:MyNS4="http://www.MyTest.com/My_Namespace/Part4"   <br>
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"        <br>
       xsi:schemaLocation="www.MyTest.com/My_Namespace/Part3 file:/C:/MyStructure.xsd">
    <br>
       <
       MyNS2:SubStruc_1>   <br>
         <
         MyNS2:Fld_1_1_A>Value001<
         /MyNS2:Fld_1_1_A>  <br>
         <
         MyNS2:Fld_1_1_B>Value002<
         /MyNS2:Fld_1_1_B> <br>
       <
       /MyNS2:SubStruc_1> <br>
    <br>
       <
       MyNS3:SubStruc_2>  <br>
          <
          MyNS1:SubStruc_2_1>  <br>
            <
            MyNS1:Fld_2_1_A>Value003<
            /MyNS1:Fld_2_1_A>   <br>
            <
         MyNS1:Fld_2_1_B>Value004<
    /MyNS1:Fld_2_1_B>  <br>
          <
    /MyNS1:SubStruc_2_1>  <br>
          <
    MyNS4:Fld_2_A>Value005<
    /MyNS4:Fld_2_A>  <br>
          <
    MyNS4:Fld_2_B>Value006<
    /MyNS4:Fld_2_B>  <br>
       <
    /MyNS3:SubStruc_2>  <br>
    <br>
       <
    MyNS3:SubStruc_3>  <br>
          <
    MyNS5:SubStruc_3_1>  <br>
             <
    MyNS5:Fld_3_1_A>Value007<
    /MyNS5:Fld_3_1_A>  <br>
             <
    MyNS5:Fld_3_1_B>Value008<
    /MyNS5:Fld_3_1_B>  <br>
          <
    /MyNS5:SubStruc_3_1> <br>
          <
    MyNS3:Fld_3_A>Value009<
    /MyNS3:Fld_3_A>  <br>
          <
    MyNS5:Fld_3_B>Value010<
    /MyNS5:Fld_3_B>  <br>
          <
    MyNS2:Fld_3_C>Value011<
    /MyNS2:Fld_3_C>  <br>
       <
    /MyNS3:SubStruc_3>  <br>
    <
    /MyNS3:Maint_Struc>  <br>
    <br>
    However I am getting the following when mapped: <br>
    <
    ?xml version="1.0" encoding="UTF-8"?> <br>
    <
    ns0:Maint_Struc   <br>
       xmlns:MyNS4="http://www.MyTest.com/My_Namespace/Part4"  <br>
       xmlns:MyNS5="http://www.MyTest.com/My_Namespace/Part5"  <br>
       xmlns:MyNS2="http://www.MyTest.com/My_Namespace/Part2"  <br>
       xmlns:MyNS1="http://www.MyTest.com/My_Namespace/Part1"  <br>
       xmlns:ns0="http://www.MyTest.com/My_Namespace/Part3"  <br>
       xmlns:ns1="http://www.w3.org/2001/XMLSchema-instance"  <br>
       ns1:schemaLocation="www.MyTest.com/My_Namespace/Part3 file:/C:/MyStructure.xsd"> <br>
       <
    ns2:SubStruc_1 xmlns:ns2="http://www.MyTest.com/My_Namespace/Part2">  <br>
          <
    ns2:Fld_1_1_A>Value001<
    /ns2:Fld_1_1_A>  <br>
          <
    ns2:Fld_1_1_B>Value002<
    /ns2:Fld_1_1_B>  <br>
       <
    /ns2:SubStruc_1>  <br>
    <br>
       <
    ns0:SubStruc_2>  <br>
          <
    ns3:SubStruc_2_1 xmlns:ns3="http://www.MyTest.com/My_Namespace/Part1">  <br>
             <
    ns3:Fld_2_1_A>Value003<
    /ns3:Fld_2_1_A>  <br>
             <
    ns3:Fld_2_1_B>Value004<
    /ns3:Fld_2_1_B>  <br>
          <
    /ns3:SubStruc_2_1>  <br>
          <
    ns4:Fld_2_A xmlns:ns4="http://www.MyTest.com/My_Namespace/Part4">Value005<
    /ns4:Fld_2_A>  <br>
          <
    ns4:Fld_2_B xmlns:ns4="http://www.MyTest.com/My_Namespace/Part4">Value006<
    /ns4:Fld_2_B>  <br>
       <
    /ns0:SubStruc_2>  <br>
    <br>
       <
    ns0:SubStruc_3> <br>
          <
    ns5:SubStruc_3_1 xmlns:ns5="http://www.MyTest.com/My_Namespace/Part5"> <br>
             <
    ns5:Fld_3_1_A>Value007<
    /ns5:Fld_3_1_A>  <br>
             <
    ns5:Fld_3_1_B>Value008<
    /ns5:Fld_3_1_B> <br>
          <
    /ns5:SubStruc_3_1>  <br>
          <
    ns0:Fld_3_A>Value009<
    /ns0:Fld_3_A>  <br>
          <
    ns5:Fld_3_B xmlns:ns5="http://www.MyTest.com/My_Namespace/Part5">Value010<
    /ns5:Fld_3_B>  <br>
          <
    ns2:Fld_3_C xmlns:ns2="http://www.MyTest.com/My_Namespace/Part2">Value011<
    /ns2:Fld_3_C>  <br>
       <
    /ns0:SubStruc_3>  <br>
    <
    /ns0:Maint_Struc>  <br>
      <br>
    Things that are wrong with the mapped XML:  <br>
    - the namespace "http://www.MyTest.com/My_Namespace/Part3" was prefixed with MyNS3 but XI reassigned it to ns0
      <br>- original prefixes are not used in the element tags  <br>
      <br>
    Appreciate if anyone can help.  <br>
    Thanks.

    Thank you for all your valuable suggestions.  Does any know why XI/PI does not acknowledge/use the namespace prefix that is defined in the XML?  Is there no other way around this short-coming apart from using XSLT mapping? 
    <br>
    I did try using the anonymizer (as suggested by Manjusha).  With the anonymizer I am able to change the namespace prefix in the element tags to the way I want it.  However the namespace definition is still showing in the element tag.
    <br>
       <MyNS2:SubStruc_1 xmlns:MyNS2="http://www.MyTest.com/My_Namespace/Part2">  <br>
          <MyNS2:Fld_1_1_A>Value001</MyNS2:Fld_1_1_A>  <br>
          <MyNS2:Fld_1_1_B>Value002</MyNS2:Fld_1_1_B>  <br>
       </MyNS2:SubStruc_1>  <br>
      <br>
    This is almost perfect only if I am able to remove the definition xmlns:MyNS2="http://www.MyTest.com/My_Namespace/Part2" from the element tag.  Suggestion any one?
    Thanks All.

Maybe you are looking for

  • GIF to JPEG

    I made a GIF for a website and it doesn't seem to be able to be turned into a JPEG. I tried turning it into a PSD file first and that didn't work. What am I missing about GIFs? Thank you, Tracy

  • Logged into temporary profile how do i get back to my regular profile?

    WHen I log into my desktop PC it takes for ever to get to the start page. It says it is preparing windows. After finally getting past this page it does one of two things. 1. It goes to a all blue screen, When it does this I have to shut my computer o

  • X wont start unless root

    So I got everything installed the way I want it but I did it as the root user. Now when I try to start X with the new user account I created, it will not work. I even copied all of the files from /root/ to /home/userid/ including the hidden files. It

  • ERROR IN IMPORTING LICENSE

    DEAR ALL, WHILE IMPORTING LICENSE FILE IN SAP B1 , I AM GETTING AN ERROR 'CANNOT VERIFY THE DIGITAL SIGNATURE OF LICENSE FILE' WHAT SHOULD I DO? THANKS AGRANSHU SHUKLA

  • Pricing : Frieght calculation - differentiate Header and Item level

    Dear friends, I have a requirement wherein I have to find the sum of the gross weight of all line items at header level and round off the value to the next 500 gms.This value will be shown at the Header Conditions tab in the condition record ZFRD. Th