Mapping Question p3: .. etc.. namespace prefixes

Does anyone know why xi uses namespace prefixes like p3: p2: etc..?  I am trying to map based on an rfc as the target and a message from a wsdl as the source.  I can not test the map because it expects the test file ( from our partner ) to have all these P3:'s in it and it doesn't.  Here is a snippet of what is happening at translation ....
<p3:Execute2 xmlns:p3="http://www.some/namespace/">
<p3:transaction-limit type="Amount"><p3:value>99999999999</p3:value></p3:transaction-limit><p3:transaction-limit type="Number"><p3:value> 9999</p3:value></p3:transaction-limit></p3:daily-transaction-limits><p3:single-transaction-limits></p3:single-transaction-limits><p3:monthly-transaction-limits></p3:monthly-transaction-limits></p3:authorization-control><p3:request-type>Activate</p3:request-type>
Message was edited by: Andrew Alpaugh

Hi Andrew,
the question is a little bit unclear to me. When I get you right, you have a WSDL that describes a message you get from a partner. You use this WSDL to define a Message Mapping. The Message Mapping does not work as expected. The fragment you have posted is probably what the Message Mapping seems to expect (according to the test panel). But the message you get from your partner looks different (it does not have all these prefixes).
I suppose that the schema contained in the WSDL (more precisely in the types-section) states that all elements have to be namespace-qualified (this could e.g. be done by having an elementFormDefault="qualified" in the schema). Thus, if the elements are unqualified in the message you get from your partner it simply means that the partner does not stick to the WSDL.
If this does not help you, I would have to see the WSDL and an example message that failed to work.
Note, however that there are different ways to express namespaces. If the document sent by your partner looks as follows:
<Execute2 xmlns="http://www.some/namespace/">
<transaction-limit type="Amount">...
it is logically equivalent to the one you posted, and the Message Mapping will treat them identical.
Greetings
          Stephan

Similar Messages

  • Java Mapping to override namespace prefix (startPrefixMapping)

    Does anyone have an example of using a Java Map to override the default XI namespace prefix. The method startPrefixMapping looks like it might do the job but I can't find any example of how this works.

    You can use the Anonymizer Module Processor.
    In your adapter, go to the "Modules" tab, than insert a new entry <b>before</b> the default adapter module processor. Enter module name <b>localejbs/AF_Modules/XMLAnonymizerBean</b> and <b>Local Enterprise Bean</b> type. In the parameters tab, enter parameter <b>anonymizer.acceptNamespaces</b> and parameter value <b>'<namespace>' <prefix></b>. You can enter more than one namespace, like in <b>'<namespace1>' <prefix1> '<namespace2>' <prefix2></b>.
    Note that your namespace must be inside apostrophes by default. If instead you want to use quotes to define the namespace, you must use another parameter before the one above: parameter name <b>anonymizer.quote</b> and in the value enter a single quote <b>"</b>.
    To define an empty prefix (meaning, that namespace is the default namespace) use '' (two apostrophes) instead of <prefix> (or "" (two quotes), if you have used anonymizer.quote).
    Check SAP Note 880173 for more information.
    Regards,
    Henrique.

  • Namespace prefix: Using Anonymizer

    Hi guys,
    I'm having some difficulties using XMLAnonymizer for placing some namespace prefix's in my message.
    After sending the message, I can check on RWB that the module Anonymizer is loaded, but results in the following:
    2007-06-21 16:55:45 Success MP: processing local module localejbs/AF_Modules/XMLAnonymizerBean
    2007-06-21 16:55:45 Warning Anonimizer: message is empty or has no payload
    2007-06-21 16:55:45 Success MP: leaving
    Well, why do I have message empty? to what message is he referring to?
    Why do I need Anonymizer? Well, the thing is, some namespace prefixes are not being place on the sent message. Without this prefixes the actual mapping fails and no fields are mapped....
    Can you give me a hand?

    Hi Stefan,
    Thanks for your reply! It works, well, the anonymizer gets the message, but now I've another question....
    2007-06-22 11:04:41 Success New JMS message with JMS message ID ID:f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f1f8404040404040 received. The XI message ID for this message is fe826d20-20a7-11dc-8363-00145e1855ec
    2007-06-22 11:04:41 Success JMS message converted to XI message format successfully
    2007-06-22 11:04:41 Success Anonimizer: anonymizing XML ...
    2007-06-22 11:04:42 Success Anonimizer: successfully anonymized
    2007-06-22 11:04:42 Success Application attempting to send an XI message asynchronously using connection AFW.
    2007-06-22 11:04:42 Success Trying to put the message into the send queue.
    2007-06-22 11:04:42 Success Message successfully put into the queue.
    I've checked my message but a strange thing happened, maybe I've misunderstood the anonymizer function....
    The original message was:
    So the namespaces introduced were deleted. But What I thought it was going to happen was that the Anonymizer would introduce the prefix ns0 and ns1 on the tags that had the namespace declaration.... Is this possible with the anonymizer?
    Problem solved.... it was a wrong namespace :S
    Thanks for the help Anonymizer does wonders and saves   a hell lot of time
    Message was edited by:
            Gonçalo Mouro Vaz

  • 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

  • ABAP development namespace prefix and XI naming

    Hi,
    while going to establish company wide SAP XI naming conventions the question arised, if there should be any relationship between naming for XI design and configuration objects and the so called "reserved development namespace prefix" known from ABAP programming. Is it, e.g. advisable to use the reserved ABAP namespace prefix as part of XI repository namespaces?
    Any experiences?
    Thanks and best regards,
    Barbara

    Hi Barbara,
    Setting up XI naming conventions for a company needs a holistic approach looking what is already out there for java, abap, xml etc. so there is no easy answer to any question regarding naming conventions, only ideas. You have to look at how these ideas fit into your existing conventions, so let me give you my idea on that:
    if your company has its own reserved ABAP namespace like /COMP/, you should definitely use that in Proxy Generation as prefix. However a usage in XI namespaces depends on what the Abap NS looks like. SAPs suggestion is to use a namespace like http://company.com/xi/... and i think, it is a very good suggestion, so i would definitely use something similar. Normally i would use the URL similar to the companies website e.g. if the website is http://www.company.com, i would just delete the www out of it. Now you might have a company with a very long name and even website URL and namespaces are restricted to 60 characters so you possibly run into length issues and decide to use an abbreviation, in that case i would definitely use an existing abap namespace as abbreviation if the namespace is somehow descriptive.
    Regards
    Christine

  • 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

  • Problem with namespace prefix

    Dear all,
    I'm using code generated by NW Developer Studio  2004s for use inside Portal components acting as a web service consumer. The problem is that the code generated includes a namespace prefix for each element in the body of the message, but ECC (ERP 6.0) doesn't like the namespace prefixes (the namespace was not recognised by the ECC mapping tool.)and throws back a DeliveryException.
    The SOAP message created by the generated NWDS code is:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wn3="http://www.w3.org/1999/XMLSchema" xmlns:wn2="http://www.w3.org/2000/10/XMLSchema" xmlns:wn1="http://www.w3.org/2001/XMLSchema" xmlns:wn0="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wn4="urn:sap-com:document:sap:rfc:functions" xmlns:tns="urn:sap-com:document:sap:rfc:functions">
    - <SOAP-ENV:Body>
    - <wn4:Z_APPOINTMENT_GET_JCO_ORG>
      <wn4:DATE_FROM>2007.01.01</wn4:DATE_FROM>
      <wn4:DATE_TO>2008-02-02</wn4:DATE_TO>
      <wn4:USERID>EGREO</wn4:USERID>
      </wn4:Z_APPOINTMENT_GET_JCO_ORG>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
    I've had a very good look around the generated code - the serializers for creating the soap request - but could not find what exactly might be changed to leave off the prefixes.
    I am using portal server 2004s
    Many thanks for any advice/help
    Reza

    I find out how should I do that.
    /Reza

  • XML Namespace Prefix required

    Hello,
    our partner uses Biztalk to receive our SOAP calls. They tell us that each attribute and element needs to have the namespace prefix otherwise Biztalk cannot read it.
    We are sending:
    SAP XI Output
    <?xml version="1.0" encoding="utf-8" ?>
    <ns11:Receive_SAP xmlns:ns11="http://zzz.com/it/mmpur/sem/xi">
      <part>
       <xform id="SWI:PLG:Order Header - SAP">
        <model>A</model>
       </xform>
      </part>
    </ns11:Receive_SAP>
    They want:
    Biztalk Requirement:
    <?xml version="1.0" encoding="utf-8" ?>
    <ns11:Receive_SAP xmlns:ns11="http://zzz.com/it/mmpur/sem/xi">
      <ns11:part>
       <ns11:xform id="SWI:PLG:Order Header - SAP">
        <ns11:model>A</ns11:model>
       </ns11:xform>
      </ns11:part>
    </ns11:Receive_SAP>
    Can that be done with the XI 3.0 Graphical mapping or do I have to use JAVA Mapping or XSLT?
    Did anyone come accros this before with Biztalk Server and it there an option to avoid it on the Biztalk Server side?
    Thanks
    Stefan

    Hi Stefan,
    Where did you obtain the schema (XSD) from? 
    Most likely, the elements you are using are local elements and do not belong to the target namespace, but to an unnamed global namespace.  This is a typical characteristic of schema's defined by SAP.
    The short answer/solution is probably putting elementFormDefault="true" in the header of your target schema. That should do the trick.
    Kind regards, Guy Crets

  • 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

  • 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 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>

  • 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.

  • Changing / Setting Namespace Prefix in SAX

    I am using sax to parse a document and I was wondering how I could change an existing namespace prefix or add one to the front of every element. I am using an XML standard called PIDX which requires each element to look like this "<pidx:ELEMENTNAME>". I know this should not be required but the standard requires it. I am familiar with using the startElement and endElment methods but I am not sure how to set a prefix. Any help or examples would be appreciated.

    I recognize all of the words in the item you posted, but when I tried to parse the whole message, I got nothing.
    If you are using SAX to parse a document, it is just telling you what it sees by calling the various SAX methods like startElement, etc. If the XML document should have namespaces for all elements and it doesn't, it is not the fault of SAX, but of the program that created the XML data. So, you cannot set a prefix in SAX. You can be told by SAX that it saw a prefix, and by not seeing a call, you can tell that there was no prefix.
    How is the XML data generated? That is where you should first be concerned.
    In this case, SAX is just the messenger telling you what is in the XML data.
    Dave Patterson

  • Ld namespace prefix in data service files

    Mike,
    Strange question. As you know typically when importing a schema the import will look something like this:
    import schema namespace ns="http://www.test.com/test/1/" at "ld:schemas/SomeSchemaFile_1_0.xsd";
    The namespace prefix in the URI "ld", I know you need that because it tells the data service that the file is local to the data service project. My question is it possible to import schema files in an external project outside the data space project? Also where is the ld prefix defined?
    The only way I was able to import a schema file was using an absolute path from my hard drive...this would not be a good thing to do.
    Mike

    It would be embarrassing for me to tell you it is possible, and then three minutes later you post saying that you tried it and it isn't. So try it first and then let us all know.Yes, it would be embarrassing! Of coarse I tried, but according to the xquery spec when defining schema import they must be absolute paths, so I wasn't sure if there was an ODSI implementation specific mechanism for declaring other types of paths...like the ld namespace prefix, but a custom one.
    >
    import schema namespace ns="http://www.test.com/test/1/" at "ld:schemas/SomeSchemaFile_1_0.xsd";
    Also where is the ld prefix defined?I believe the string following the "at" in an import statement in xquery is "implementation dependent" (you can check the spec). The 'protocol' ld is just something ODSI uses to indicate that schema will be self-contained in the dataspace. I'm guessing that the protocols http and file will also work - you can try that to answer the first part of your question. I believe if you have an update function, you'll find you that datagraph.xsd is accessed via http.
    - MikeI haven't tried but I am willing to bet the http path will work because that is an acceptable path based on the xquery spec. I am thinking to get what I want to happen, I could write a small ant task to copy the schemas from the external project to the data space when building. As always thanks for the quick reply!
    Mike

  • Namespace prefix in SOAP Elements causes problems in XI

    Hi guys,
    I'm using code generated by NW Developer Studio for use inside Portal components acting as a web service consumer. The problem is that the code generated includes a namespace prefix for each element in the body of the message, but XI doesn't like the namespace prefixes and throws back a DeliveryException.
    The SOAP message created by the generated NWDS code is:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wn3="http://www.w3.org/1999/XMLSchema" xmlns:wn2="http://www.w3.org/2000/10/XMLSchema" xmlns:wn1="http://www.w3.org/2001/XMLSchema" xmlns:wn0="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wn4="http://allieddomecq.com/poc" xmlns:tns="http://allieddomecq.com/poc">
         <SOAP-ENV:Body>
              <wn4:PortalSOAP_MT_Request>
                   <wn4:CustomerIdentifier>0001000064</wn4:CustomerIdentifier>
                   <wn4:SalesOrganization>ES50</wn4:SalesOrganization>
                   <wn4:SystemIdentifier>R3D</wn4:SystemIdentifier>
              </wn4:PortalSOAP_MT_Request>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    The problem is the "wn4" prefixes on the CustomerIdentifier, SalesOrganization, and SystemIdentifier tags. When we send the soap request from XML Spy without the prefixes, the response comes back OK with the expected data.
    I've had a very good look around the generated code - the serializers for creating the soap request - but could not find what exactly might be changed to leave off the prefixes.
    Alternatively, is there something I could ask our XI consultant to do, to make his component accept the request with the redundant prefixes in the tags?
    Many thanks for any advice/help,
    Laura

    Hi Laura,
    you have to realize that the two documents
    <ns:CustomerRecord xmlns:ns="http://company.com">
    <ns:CustomerNumber> </ns:CustomerNumber>
    <ns:CustomerDetails> </ns:CustomerDetails>
    </ns:CustomerRecord>
    and
    <ns:CustomerRecord xmlns:ns="http://company.com">
    <CustomerNumber> </CustomerNumber>
    <CustomerDetails> </CustomerDetails>
    </ns:CustomerRecord>
    from an XMl point of view have totally fifferent structure. Thus, a mapping which is able to deal with the first structure will fail for the second and vice versa.
    Surely, both structures somehow can carry the same information, but they do this with different languages (Maybe you can compare this to the fact, that you may deliver the same information in English or in German language).
    When you model the structure in Integration Repository using datatypes and message types (what I think you did), you will always get a structure that looks like the second one. This is just a convention (like the convention that all information in this forum should be presented in English). When defining a message mapping for this structure it also relies on this fact and thus will not understand the other kind of document.
    External Definitions are more flexible. They are also able to understand structures that are modelled the other way. This greater flexibility is due to the fact that External Definitions were designed to understand structures that come from an external world where different conventionts might be used.
    To come to a conclusion: If the structure you have to deal with has been defined externally then it is not intended that you model it inside the Integration Builder using datatypes and message types. In this case the external source should provide a description of the message as XSD, WSDL, or DTD. You upload this as External Definition, and everything works fine.
    If you have designed the structure yourself, you can model it with datatypes and message types. But then you will always get a structure which looks like the second one. In this case you should make sure that all other participants in the game also stick to that structure. Then everything will be fine, too.
    Greetings Stephan

Maybe you are looking for