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

Similar Messages

  • 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

  • How to remove namespace Prefix ns0

    Hi ,
    I receive an xml from an external service.In that each element in prefixed by namespace ns0: How can I remove that name space.I trieed using
    ora:ProcessXSLT.But its not working.Its giving TypeError
    Please find below my xml and xslt files.
    XML ---
    <ProcessSalesLead xmlns:ns0="http://www.starstandards.org/STAR/ProcessSalesLead" revision="3.0" release="8.1-Lite" environment="Production" lang="en-US" xmlns="http://webservice.services.freeway.wipro.com">
    <ns0:ApplicationArea>
    <ns0:Sender>
    <ns0:Component>String</ns0:Component>
    <ns0:Task>SalesLead</ns0:Task>
    <ns0:ReferenceId>1-4CPJ</ns0:ReferenceId>
    <ns0:CreatorNameCode>XX</ns0:CreatorNameCode>
    <ns0:SenderNameCode>XX</ns0:SenderNameCode>
    </ns0:Sender>
    <ns0:CreationDateTime>2007-11-28T15:33:16+05:30</ns0:CreationDateTime>
    <ns0:Destination>
    <ns0:DestinationNameCode>XX</ns0:DestinationNameCode>
    <ns0:DealerNumber>10005</ns0:DealerNumber>
    </ns0:Destination>
    </ns0:ApplicationArea>
    <ns0:DataArea>
    <ns0:Process acknowledge="Never" confirm="Always"/>
    <ns0:SalesLead>
    <ns0:Header>
    <ns0:DocumentId>1-4CPJ</ns0:DocumentId>
    <ns0:IndividualProspect>
    <ns0:PersonName>
    <ns0:GivenName>Ray</ns0:GivenName>
    <ns0:FamilyName>Aamos</ns0:FamilyName>
    </ns0:PersonName>
    <ns0:Address>
    <ns0:AddressLine>1200 Davisville Rd</ns0:AddressLine>
    <ns0:City>York</ns0:City>
    <ns0:StateOrProvince>AL</ns0:StateOrProvince>
    <ns0:Country>US</ns0:Country>
    <ns0:PostalCode>78201</ns0:PostalCode>
    </ns0:Address>
    <ns0:Contact>
    <ns0:Telephone desc="Day Phone">2018742349</ns0:Telephone>
    <ns0:EMailAddress desc="Work">[email protected]</ns0:EMailAddress>
    <ns0:Fax desc="Work">2018745698</ns0:Fax>
    </ns0:Contact>
    <ns0:OwnedVehicle>
    <ns0:Model>Sonata</ns0:Model>
    <ns0:ModelYear>2006</ns0:ModelYear>
    <ns0:Make>Hyundai</ns0:Make>
    </ns0:OwnedVehicle>
    </ns0:IndividualProspect>
    <ns0:Provider>
    <ns0:Contact>
    <ns0:PersonName>
    <ns0:GivenName/>
    <ns0:FamilyName/>
    </ns0:PersonName>
    </ns0:Contact>
    </ns0:Provider>
    <ns0:Dealer>
    <ns0:DealerName>Metro Motors Florida</ns0:DealerName>
    <ns0:Address>
    <ns0:AddressLine>Miami</ns0:AddressLine>
    <ns0:City>Miami</ns0:City>
    <ns0:StateOrProvince>FL</ns0:StateOrProvince>
    <ns0:Country>US</ns0:Country>
    <ns0:PostalCode>33010</ns0:PostalCode>
    </ns0:Address>
    <ns0:SalesContact>
    <ns0:Telephone desc="Day Phone">3058938000</ns0:Telephone>
    </ns0:SalesContact>
    <ns0:OrganizationName>Metro Motors Florida</ns0:OrganizationName>
    </ns0:Dealer>
    <ns0:LeadComments>Existing Vehicle info</ns0:LeadComments>
    </ns0:Header>
    <ns0:Detail>
    <ns0:LeadStatus>Accepted</ns0:LeadStatus>
    <ns0:SalesVehicle>
    <ns0:Model>Camry</ns0:Model>
    <ns0:ModelYear>2007</ns0:ModelYear>
    <ns0:ModelDescription>Camry LE</ns0:ModelDescription>
    <ns0:Make>Toyota</ns0:Make>
    <ns0:VehicleNote/>
    <ns0:ExteriorColor/>
    <ns0:TransmissionType>A</ns0:TransmissionType>
    </ns0:SalesVehicle>
    </ns0:Detail>
    </ns0:SalesLead>
    </ns0:DataArea>
    </ProcessSalesLead>
    XSLT --
    <?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>
    Please help me on this.Its very urgent .
    thanks
    deepthi

    can you please copy paste your schema validation errors. i suspect there is a mismatch between your schema and xml data that you input to your schema processor. can you copy paste the definition of your schema for <ProcessSalesLead>.
    you mentioned you received this xml from external service, maybe this external service doesn't have the correct schema and generates this xml which is not compatible with your schema.
    I would suggest to validate this xml as part of your receive, please use "validateXML" partner link property in bpel.xml, so you avoid invalid documents getting into the system at first.
    <partnerLinkBindings>
    <partnerLinkBinding name="...">
    <property name="wsdlLocation">http://localhost:8888/orabpel/default/1.0/yourParnerProcess?wsdl</property>
    <property name="validateXML">true</property>
    </partnerLinkBinding>

  • How to remove namespaces in mapping when using External Definition

    Hi,
    I read in the blog (/people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi) that you are able to remove namespaces in mapping by deleting the value from XML Namespace under the Message Type. However, is it possible to do this when you are using External Definition (xsd) ? The blog only describe how to do this if you define a Data Type.

    Hi ,
    No ..it is not possible to remove the namespace once you imported into IR of external defintion.You can remove your namesapce from external definition before importing into IR.
    Sekhar

  • 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

  • XSLT mapping to remove namespace prefix

    Hi experts,
    I have one requrement where I need to remove the prefix ns0 from the xml (given below) getting generated in message mapping.
    <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns0:ExecuteRequest xmlns:ns0="http://test/">
    <ns0:_sRequestXML><inteflow>body</inteflow></ns0:_sRequestXML></ns0:ExecuteRequest></soap:Body></soap:Envelope>
    I am usimg the below xslt and it is now adding one ns0 prefix in the tag <inteflow>.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <ExecuteRequest xmlns="http://test/">
    <_sRequestXML>
    <inteflow>
    <xsl:copy-of select="//inteflow"/>
    </inteflow>
    </_sRequestXML>
    </ExecuteRequest>
    </xsl:template>
    </xsl:stylesheet>
    Result after using xslt.
    <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ExecuteRequest xmlns="http://test/"><_sRequestXML>
    <inteflow xmlns:ns0="http://decisionintellect.com/inteport/"></inteflow></_sRequestXML></ExecuteRequest></soap:Body></soap:Envelope>
    Can you please help. What is wrong in the xslt and how I can get the desired result.
    Thanks & Regards,
    Pratyus Ganguly
    <?

    Hi Pratyus
    XMLAnonymizerBean works fine when I try it with your payload. Here is the config, basically I included the namespace for everything except the ns0.
    Parameter Name
    Parameter Value
    anonymizer.acceptNamespaces
    http://www.w3.org/2001/XMLSchema xsd http://www.w3.org/2001/XMLSchema-instance xsi http://schemas.xmlsoap.org/soap/envelope/ soap
    Before
    After
    Rgds
    Eng Swee

  • 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 remove namespace from root-element

    Hi Gurus,
    I want one xml output from xslt transformation with no namespace. I managed to remove namespace from child elements by leveraging elementFormDefault ='unqualified' property of xsd. But not able remove namespace from root-element.
    Output that I want is :
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <inp1:Email_Mod_Root>
       <Email_Mod_Root_Element>
          <Email_Record1>
             <PERSON_NUMBER>123456</PERSON_NUMBER>
             <COUNTRY/>
              <EMAIL_TYPE>WORK</EMAIL_TYPE>
             <EMAIL>EMAIL3</EMAIL>
             <PRIMARY_FLAG>Y</PRIMARY_FLAG>
          </Email_Record1>
    </Email_Mod_Root_Element>
    </Email_Mod_Root>
    Output that I am getting:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <inp1:Email_Mod_Root xmlns:inp1="http://www.example.org">
       <Email_Mod_Root_Element>
          <Email_Record1>
             <PERSON_NUMBER>123456</PERSON_NUMBER>
             <COUNTRY/>
             <EMAIL_TYPE>WORK</EMAIL_TYPE>
             <EMAIL>EMAIL3</EMAIL>
             <PRIMARY_FLAG>Y</PRIMARY_FLAG>
          </Email_Record1>
    </Email_Mod_Root_Element>
    </Email_Mod_Root>
    Anyone, pls suggest.
    Thanks in advance,
    SG_SOA

    First of all :
    <inp1:Email_Mod_Root>
       <Email_Mod_Root_Element>
          <Email_Record1>
             <PERSON_NUMBER>123456</PERSON_NUMBER>
             <COUNTRY/>
              <EMAIL_TYPE>WORK</EMAIL_TYPE>
             <EMAIL>EMAIL3</EMAIL>
             <PRIMARY_FLAG>Y</PRIMARY_FLAG>
          </Email_Record1>
    </Email_Mod_Root_Element>
    </Email_Mod_Root>
    isn't valid xml (you start with inp1: prefix and you end the tag with no prefix, but let's assume you don't want any prefix/namespace at all)
    if i use :
    [code]
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:inp1="http://www.example.org" exclude-result-prefixes="inp1">
      <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="*">
        <xsl:element name="{local-name(.)}">
          <xsl:apply-templates select="@* | node()"/>
        </xsl:element>
      </xsl:template>
      <xsl:template match="@*">
        <xsl:attribute name="{local-name(.)}">
          <xsl:value-of select="."/>
        </xsl:attribute>
      </xsl:template>
    </xsl:stylesheet>
    [/code]
    i get this
    [code]
    <Email_Root_Element>
      <Email_Record>
      <EMPLID>EMPLID46</EMPLID>
      <EMAIL>EMAIL48</EMAIL>
      <E_ADDR_TYPE>E_ADDR_TYPE49</E_ADDR_TYPE>
      <COUNTRY>US</COUNTRY>
      </Email_Record>
      <Email_Record>
      <EMPLID>EMPLID47</EMPLID>
      <EMAIL>EMAIL49</EMAIL>
      <E_ADDR_TYPE>E_ADDR_TYPE50</E_ADDR_TYPE>
      <COUNTRY>US</COUNTRY>
      </Email_Record>
      <Email_Record>
      <EMPLID>EMPLID48</EMPLID>
      <EMAIL>EMAIL49</EMAIL>
      <E_ADDR_TYPE>E_ADDR_TYPE51</E_ADDR_TYPE>
      <COUNTRY>US</COUNTRY>
      </Email_Record>
    </Email_Root_Element>
    [/code]

  • 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

  • How to add namespace prefix to root tag in XSL version 1.1  SOA 11g

    Hi Experts,
       Can any one post solution for adding namespace prefix to root tag using XSL version 1.1 in SOA 11g?
    I have tried the below options and none is working.
    1. Removing prefix add in exclude-prefixes in XSL.But still seeing no prefix for root tag.
    2. Added the <xsl-element>   tag with namespace.But it is not working
    3. Added the below XSL code and it is not working.
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       xmlns:ns0="https://api.ladbrokes.com/v1/sportsbook-couchbase/Temp.xsd">
      <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
      <xsl:template match="@* | node()">
       <xsl:copy>
       <xsl:apply-templates select="@* | node()"/>
       </xsl:copy>
      </xsl:template>
      <xsl:template match="/*">
       <xsl:element name="ns0:{local-name()}">
       <xsl:copy-of select="namespace::*" />
       <xsl:apply-templates select="@* | node()" />
       </xsl:element>
      </xsl:template>
    </xsl:stylesheet>

    Try this:
    <xsl:stylesheet  version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="@*|text()|comment()|processing-instruction()">
            <xsl:copy>
                <xsl:apply-templates select="@*|node()"/>
            </xsl:copy>
        </xsl:template>
        <xsl:template match="/">
            <RootTag xmlns:ns0="https://api.ladbrokes.com/v1/sportsbook-couchbase/Temp.xsd">
                <xsl:apply-templates select="@*|node()"/>          
            </RootTag >
        </xsl:template>
        <xsl:template match="*">
            <xsl:element name="{local-name()}">
                <xsl:apply-templates select="@*|node()"/>
            </xsl:element>
        </xsl:template>
    </xsl:stylesheet>

  • How to remove namespace

    Hello,
    i have again a little problem, i don't know, how to remove a namespace. I can insert namespaces using SDO_RDF.ADD_NAMESPACES, bit i can't find something like SDO_RDF.DEL_NAMESPACES..any suggestions?

    Hi,
    Deleting a namespace will have to be done by deleting it directly from the table where it is stored, which is the rdf_namespace$ table in the mdsys schema. For example:
    connect mdsys/<mdsys password>
    delete from rdf_namespace$ where namespace_name = '............';
    Please note that the namespaces stored in this table are not used by any of Oracle's operations. This table is merely a convenience for the user, and a similar table can be created in the user's schema, which is likely to be much more convenient than storing it in the mdsys schema. Going forward that is the approach we recommend, as future versions of the product might not include the rdf_tablespace$ table in the mdsys schema (nor the associated add_namespace() API).
    Melli

  • How to insert namespace prefix when using xmltype

    Hi,
    I have registered the following XML schema into XMLDB.
    <s:schema xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:m="https://suora.tietopalvelut.com/ATJkysely/" targetNamespace="https://suora.tietopalvelut.com/ATJkysely/" elementFormDefault="qualified" xdb:schemaURL="http://www.fennia.fi/Hae121.xsd">
         <s:element name="Hae" type="m:Hae121" xdb:SQLType="Hae121"/>
         <s:complexType name="Hae121" xdb:SQLType="Hae121" xdb:maintainDOM="false">
              <s:sequence>
                   <s:element name="kayttajatunnus" type="m:Kayttajatunnus" minOccurs="0" xdb:SQLName="kayttajatunnus" xdb:SQLType="Kayttajatunnus121" xdb:SQLInline="true"/>
                   <s:element name="palvelutunnus" type="s:string" minOccurs="0" xdb:SQLName="palvelutunnus" xdb:SQLType="VARCHAR2" xdb:SQLInline="true"/>
                   <s:element name="kyselylaji" type="s:string" minOccurs="0" xdb:SQLName="kyselylaji" xdb:SQLType="VARCHAR2" xdb:SQLInline="true"/>
                   <s:element name="rekisteritunnus" type="s:string" minOccurs="0" xdb:SQLName="rekisteritunnus" xdb:SQLType="VARCHAR2" xdb:SQLInline="true"/>
                   <s:element name="laji" type="s:string" minOccurs="0" xdb:SQLName="laji" xdb:SQLType="VARCHAR2" xdb:SQLInline="true"/>
                   <s:element name="ajoneuvoluokka" type="s:string" minOccurs="0" xdb:SQLName="ajoneuvoluokka" xdb:SQLType="VARCHAR2" xdb:SQLInline="true"/>
                   <s:element name="valmistenumero" type="s:string" minOccurs="0" xdb:SQLName="valmistenumero" xdb:SQLType="VARCHAR2" xdb:SQLInline="true"/>
                   <s:element name="jarjestelmatunnus" type="s:string" minOccurs="0" xdb:SQLName="jarjestelmatunnus" xdb:SQLType="VARCHAR2" xdb:SQLInline="true"/>
              </s:sequence>
         </s:complexType>
         <s:complexType name="Kayttajatunnus" xdb:SQLType="Kayttajatunnus121" xdb:maintainDOM="false">
              <s:sequence>
                   <s:element name="username" type="s:string" minOccurs="0" xdb:SQLName="username" xdb:SQLType="VARCHAR2" xdb:SQLInline="true"/>
                   <s:element name="password" type="s:string" minOccurs="0" xdb:SQLName="password" xdb:SQLType="VARCHAR2" xdb:SQLInline="true"/>
                   <s:element name="statcode" type="s:string" minOccurs="0" xdb:SQLName="statcode" xdb:SQLType="VARCHAR2" xdb:SQLInline="true"/>
                   <s:element name="enduserid" type="s:string" minOccurs="0" xdb:SQLName="enduserid" xdb:SQLType="VARCHAR2" xdb:SQLInline="true"/>
                   <s:element name="timestamp" type="s:string" minOccurs="0" xdb:SQLName="timestamp" xdb:SQLType="VARCHAR2" xdb:SQLInline="true"/>
                   <s:element name="checksum" type="s:string" minOccurs="0" xdb:SQLName="checksum" xdb:SQLType="VARCHAR2" xdb:SQLInline="true"/>
                   <s:element name="ticket" type="s:string" minOccurs="0" xdb:SQLName="ticket" xdb:SQLType="VARCHAR2" xdb:SQLInline="true"/>
              </s:sequence>
         </s:complexType>
    </s:schema>
    In PL/SQL I populate the object types, which have been automatically generated.
    Then I create an XMLTYPE object using the following code:
    akeobject "Hae121";
    v_schema VARCHAR2 (1000) := 'http://www.fennia.fi/Hae121.xsd';
    v_schema_element VARCHAR2 (100) := 'Hae';
    --akeobject populated here
    v_xml_out := XMLTYPE (akeobject, v_schema, v_schema_element);
    DBMS_OUTPUT.put_line ('v_xml_out:' || v_xml_out.getstringval ()) shows the following:
    <Hae xmlns="https://suora.tietopalvelut.com/ATJkysely/">
    <kayttajatunnus>
    <username>kayttaja</username>
    <password>salasana</password>
    <statcode>tiltunn</statcode>
    <enduserid>loppukay</enduserid>
    <timestamp>20060822100700</timestamp>
    <checksum>E77B30394D23F83D422A63027F8F63A8</checksum>
    <ticket>nyckkeli</ticket>
    </kayttajatunnus>
    <palvelutunnus>PALVELUTUNNUS</palvelutunnus>
    <kyselylaji>41</kyselylaji>
    <rekisteritunnus>BRF-444</rekisteritunnus>
    <ajoneuvoluokka>1</ajoneuvoluokka>
    <valmistenumero>BBBB</valmistenumero>
    <jarjestelmatunnus>AAAA</jarjestelmatunnus>
    </Hae>
    There are no namespace prefixes.
    When I create a model XML file using XMLSpy, I get the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy v2007 rel. 3 sp1 (http://www.altova.com)-->
    <m:Hae xmlns:m="https://suora.tietopalvelut.com/ATJkysely/">
         <m:kayttajatunnus>
              <m:username>String</m:username>
              <m:password>String</m:password>
              <m:statcode>String</m:statcode>
              <m:enduserid>String</m:enduserid>
              <m:timestamp>String</m:timestamp>
              <m:checksum>String</m:checksum>
              <m:ticket>String</m:ticket>
         </m:kayttajatunnus>
         <m:palvelutunnus>String</m:palvelutunnus>
         <m:kyselylaji>String</m:kyselylaji>
         <m:rekisteritunnus>String</m:rekisteritunnus>
         <m:laji>String</m:laji>
         <m:ajoneuvoluokka>String</m:ajoneuvoluokka>
         <m:valmistenumero>String</m:valmistenumero>
         <m:jarjestelmatunnus>String</m:jarjestelmatunnus>
    </m:Hae>
    What am I doing wrong because there are no namespace prefixes when using XMLTYPE in PL/SQL?
    My environment is 10g 10.2.0.2.
    Thanks,
    Veli-Matti

    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

  • How to add namespace prefix to XML file?

    I have a file(XML) to proxy scenario. I 've created an asynch Inbound message and a asynch Outbound message.
    I have generated the class in Sproxy of my R/3 System.
    In the Integration directory I have 2 business system :
    -one which sent the file
    -my r/3 system
    System which send file generate XML like this:
    <?xml version="1.0" encoding="UTF-8" ?>
       <batch id="20080211001" customer="some customer" user="user" language="EN">
         <structure>
           <localization>
              <string id="customer" text="Customer" />
    etc........
    As you see, it have not any namespace prefix.
    How can I insert namespace prefix in this file with XI tools?

    Hi Pavel
    I am also facing the same issue
    my XML structure is quite complex
    <ROW EVENT="RE" SEQ="9" MORE="Y" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
      <FileDate Internal="61409" ROWID="Y">02/17/2009</FileDate>
      <FileSeq ROWID="Y">9</FileSeq>
      <Event>RE</Event>
      <Grp>3</Grp>
      <LinkFileTime>42324</LinkFileTime>
      <Mrn></Mrn>
      <ROW DESCR="RE" TABLE="PAT" EVENT="RE">
        <BusTel/>
        <BusTelHipaaConsent/>
        <Cont1Addr1/>
      <ROW DESCR="RE" TABLE="INS" EVENT="RE">
        <DictRef1/>
        <DictRef10/>
    Do i have to create the Message Interface  for Outbound Synchronous ..
    <DictRef11/>

  • How to remove namespace link from the output XML

    i have to remove 'xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions"' (namespace) from the output xml file which is generated from the BIP. I need my output XML file without that namespace link, this namespace link is coming for each element.
    Anybody know how to do that please help.
    output xml file
    <?xml version="1.0" encoding="UTF-8" ?>
    <Reports version="2.00">
    <deliveryNote xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions">
    <subjectId />
    </deliveryNote>
    <deliveredReports xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions">
    <referDate>[Delivery note->H4]</referDate>
    </deliveredReports>
    <simpleReports xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions">
    <numberOfReports>2</numberOfReports>
    <nReport>
    <reportName>Xyz</reportName>
    <reportVersion>1.0</reportVersion>
    <observations>
    <numberOfObservations>15</numberOfObservations>
    <columnObservation>
    <y>9</y>
    <rO>
    <x>14</x>
    <o>11</o>
    <o>21</o>
    <o>121</o>
    </rO>
    </columnObservation>
    </observations>
    </nReport>
    </simpleReports>
    </Reports>
    my xslt file
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions" >
    <xsl:output method="xml" encoding="UTF-8"/>
    <xsl:template match="/">
         <xsl:element name="Reports">
              <xsl:attribute name="version">2.00</xsl:attribute>
                   <deliveryNote>
                        <subjectId></subjectId>
                        </deliveryNote>
                   <deliveredReports>
                        <referDate>[Delivery note->H4]</referDate>
                   </deliveredReports>
                   <simpleReports>
                        <numberOfReports>2</numberOfReports>
                        <nReport>
                                  <reportName>Xyz</reportName>
                                  <reportVersion>1.0</reportVersion>
                                       <observations>
                                       <numberOfObservations>15</numberOfObservations>
                                       <columnObservation>
                                            <y>9</y>
                                            <rO>
                                                 <x>14</x>
                                                      <xsl:for-each select="TEST_XML/LIST_R1/R1">
                                                           <o><xsl:value-of select="xdoxslt:lpad(COL1,10,' ')"/></o>
                                                      </xsl:for-each>
                                            </rO>
                                       </columnObservation>
                                       </observations>
                             </nReport>
                        </simpleReports>
              </xsl:element>
    </xsl:template>
    </xsl:stylesheet>

    Please post the same in BI Publisher forum
    BI Publisher
    Thanks,
    Vino

  • How to add namespace prefixes to XMLType created from Object?

    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    I'm working with SOAP request creation from Schema derived Types.
    Consider the registration of the following annotated schema (I wanted Oracle to create the types for me, but with my own names):
    exec dbms_xmlschema.deleteSchema(schemaURL => 'Parameters4.xsd');
    declare
    v_xsd xmltype := xmltype('<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
               xmlns:oraxdb="http://xmlns.oracle.com/xdb"
               xmlns = "http://www.cognera.com"
               targetNamespace = "http://www.cognera.com">
      <xs:element name="Parameters" oraxdb:SQLName="Parameters" oraxdb:SQLType="Parameters">
        <xs:complexType oraxdb:SQLType="Parameters">
          <xs:sequence>
            <xs:element name="Param1" type="xs:string" oraxdb:SQLName="Param1" oraxdb:SQLType="VARCHAR2" />
            <xs:element name="NestedItems" oraxdb:SQLName="NestedItems" oraxdb:SQLType="NestedItemsType">
              <xs:complexType oraxdb:SQLType="NestedItemsType">
                <xs:sequence>
                  <xs:element name="NestedItem" type="NestedItemType" oraxdb:SQLName="NestedItem" oraxdb:SQLType="NestedItemType"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:complexType name="NestedItemType" oraxdb:SQLType="NestedItemType">
        <xs:sequence>
          <xs:element name="nParam1" type="xs:string" oraxdb:SQLName="nParam1" oraxdb:SQLType="VARCHAR2"/>
          <xs:element name="nParam2" type="xs:string" oraxdb:SQLName="nParam2" oraxdb:SQLType="VARCHAR2"/>
          <xs:element name="nParam3" type="xs:string" oraxdb:SQLName="nParam3" oraxdb:SQLType="VARCHAR2"/>
        </xs:sequence>
      </xs:complexType>
    </xs:schema>
    begin
      dbms_xmlschema.registerSchema(schemaURL => 'Parameters4.xsd', --this name is local to each ERS schema.                                
                                          schemaDoc => v_xsd,
                                          local => TRUE,
                                          genTypes => TRUE, --only want the types
                                          genbean => FALSE,
                                          genTables => TRUE, --not sure if I need this
                                          force => TRUE,
                                          owner => user);
    end;
    Types created were:
    CREATE OR REPLACE TYPE "NestedItemType" AS OBJECT ("SYS_XDBPD$" "XDB"."XDB$RAW_LIST_T","nParam1" VARCHAR2(4000 CHAR),"nParam2" VARCHAR2(4000 CHAR),"nParam3" VARCHAR2(4000 CHAR))NOT FINAL INSTANTIABLE
    CREATE OR REPLACE TYPE "NestedItemsType" AS OBJECT ("SYS_XDBPD$" "XDB"."XDB$RAW_LIST_T","NestedItem" "NestedItemType")FINAL INSTANTIABLE
    CREATE OR REPLACE TYPE "Parameters" AS OBJECT ("SYS_XDBPD$" "XDB"."XDB$RAW_LIST_T","Param1" VARCHAR2(4000 CHAR),"NestedItems" "NestedItemsType")FINAL INSTANTIABLE
    I found that in order to build these types using constructors (to avoid PLS-00306: wrong number or types of arguments in call to 'NestedItemType'), that I needed to edit these types (drop the xdb magic):
    CREATE OR REPLACE TYPE "NestedItemType" AS OBJECT ("nParam1" VARCHAR2(4000 CHAR),"nParam2" VARCHAR2(4000 CHAR),"nParam3" VARCHAR2(4000 CHAR))FINAL INSTANTIABLE
    CREATE OR REPLACE TYPE "NestedItemsType" AS OBJECT ("NestedItem" "NestedItemType")FINAL INSTANTIABLE
    CREATE OR REPLACE TYPE "Parameters" AS OBJECT ("Param1" VARCHAR2(4000 CHAR),"NestedItems" "NestedItemsType")FINAL INSTANTIABLE
    I read on the forums of a hack to get a namespace added in the output:
    CREATE OR REPLACE TYPE "Parameters" AS OBJECT ("@xmlns" VARCHAR2(4000), -- namespace attribute HACK
                                                           "Param1" VARCHAR2(4000 CHAR),"NestedItems" "NestedItemsType")FINAL INSTANTIABLE
    Putting it all together, I have:
    DECLARE
      v_Parameters    "Parameters";
      v_xml           xmltype;
      v_print_output  clob;     
    begin
      v_Parameters :=  "Parameters"('www.cognera.com',
                                    'hello',
                                  "NestedItemsType"("NestedItemType"('one',
                                                                 'two',
                                                                 'three'
      v_xml := xmltype(xmlData => v_Parameters);
      select xmlserialize(document
                          xmlquery('declare namespace soap = "http://www.w3.org/2003/05/soap-envelope";                                                             
                                    declare namespace cognera = "http://www.cognera.com";
                                    <soap:Envelope>
                                       <soap:Header/>
                                       <soap:Body>
                                       </soap:Body>
                                     </soap:Envelope>
                                   ' passing v_xml returning content) as clob
                          indent size=2
                         ) into v_print_output from dual;
      dbms_output.put_line(v_print_output);
    end;
    This outputs:
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
      <soap:Header/>
      <soap:Body>
        <Parameters xmlns="www.cognera.com">
          <Param1>hello</Param1>
          <NestedItems>
            <NestedItem>
              <nParam1>one</nParam1>
              <nParam2>two</nParam2>
              <nParam3>three</nParam3>
            </NestedItem>
          </NestedItems>
        </Parameters>
      </soap:Body>
    </soap:Envelope>
    What I really want is:
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:c="www.cognera.com">
      <soap:Header/>
      <soap:Body>
        <c:Parameters>
          <c:Param1>hello</c:Param1>
          <c:NestedItems>
            <c:NestedItem>
              <c:nParam1>one</c:nParam1>
              <c:nParam2>two</c:nParam2>
              <c:nParam3>three</c:nParam3>
            </c:NestedItem>
          </c:NestedItems>
        </c:Parameters>
      </soap:Body>
    </soap:Envelope>
    How do I do this without having to programatically add the namespace using a custom XQuery function?

    See this similar thread, it should give you some better alternatives than the "@xmlns" hack :
    Add Namespaces via XQuery to an XML Instance
    For example :
    SQL> SELECT XMLSerialize(DOCUMENT
      2           XMLTransform(
      3             xmltype(
      4               "Parameters"('hello', "NestedItemsType"("NestedItemType"('one','two','three')))
      5             )
      6           , xmlparse(content
      7  '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      8    <xsl:output encoding="UTF-8" indent="yes" method="xml"/>
      9    <xsl:param name="ns"/>
    10    <xsl:template match="/">
    11      <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    12        <soap:Header/>
    13          <soap:Body>
    14               <xsl:apply-templates select="*"/>
    15             </soap:Body>
    16         </soap:Envelope>
    17    </xsl:template>
    18    <xsl:template match="*">
    19      <xsl:element name="{local-name()}" namespace="{$ns}">
    20        <xsl:apply-templates select="@*|node()"/>
    21      </xsl:element>
    22    </xsl:template>
    23  </xsl:stylesheet>')
    24           , q'{ns="'www.cognera.com'"}'
    25           )
    26           INDENT
    27         ) AS "XSLT Output"
    28  FROM dual ;
    XSLT Output
    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
      <soap:Header/>
      <soap:Body>
        <Parameters xmlns="www.cognera.com">
          <Param1>hello</Param1>
          <NestedItems>
            <NestedItem>
              <nParam1>one</nParam1>
              <nParam2>two</nParam2>
              <nParam3>three</nParam3>
            </NestedItem>
          </NestedItems>
        </Parameters>
      </soap:Body>
    </soap:Envelope>
    You can store the stylesheet in the XDB repository or in a table and access it using a DBUriType.
    It then provides a concise way to both add the namespace and wrap the payload in the envelope.

Maybe you are looking for

  • BOBJ - BW  "Error getting hierarchies for dimension... "

    Im still whitout a solution for this problem, however we have found a difference between the queries that work and the queries that dont work. The difference is in the hierarchies type but we dont know what is the problem exactly. Does anyone know if

  • Printer has stopped printing in black, HP Printer Photosmart 5514

    My printer suddenly stopped printing in black. We have two computers networked wirelessly, and from my husband's computer there are no problems. From my computer I can print other colors, but not black. Test prints print in colors but not black. I ha

  • How to use Query Builder in Oracle10g

    Since I'm new to Oracle , thus I'm facing some problem in some portions. When I went through the Query Builder option, actually I was not able to build the query as some of the features present in it were not clear to me like the "Condition" part and

  • Automatic assingment of Cprojects to SAP PS project

    Hi all, I am using Cprojects 4.0 and is installed as add on on ECC6.0. I have created a projects in Cproject and wnat to replicate it into SAP PS. I have done all necessary customizations required for account integration and in project type and in co

  • Getting blank error messages for no apparent reason.

    Firefox randomly freezes and the top bar says "Firefox (Not Responding)". This lasts for a little bit, then a blank error message pops up. It has no text anywhere, and the only thing I can do is x out. When I do, Firefox returns to normal. However, t