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

Similar Messages

  • Namespace Problem? Namespace prefix used but not declared.

    Hello Guru's,
    I am new to XSL templates, while genrating XML publisher report with these template, I am getting below "namespace" error:
    If I remove the "set:"/"str:" expressions from the template, it works fine. Is there anything syntactically wrong in the expression? but not getting the results
    Getting "Caused by: oracle.xdo.parser.v2.XMLParseException: Namespace prefix 'str' used but not declared." error while using this code
                             <xsl:call-template name="str:generate-string">
                                  <xsl:with-param name="text" select="' '"/>
                                  <xsl:with-param name="count" select="30"/>
                             </xsl:call-template>
    Getting "Caused by: oracle.xdo.parser.v2.XMLParseException: Namespace prefix 'set' used but not declared." error while using this code
         <xsl:template name="distinct">
              <xsl:param name="nodes" select="/.."/>
              <xsl:param name="distinct" select="/.."/>
              <xsl:choose>
                   <xsl:when test="$nodes">
                        <xsl:call-template name="distinct">
                             <xsl:with-param name="distinct" select="$distinct | $nodes[1][not(. = $distinct)]"/>
                             <xsl:with-param name="nodes" select="$nodes[position() &gt; 1]"/>
                        </xsl:call-template>
                   </xsl:when>
                   <xsl:otherwise>
                        <xsl:apply-templates select="$distinct" mode="set:distinct"/>
                   </xsl:otherwise>
              </xsl:choose>
         </xsl:template>
    I would appreciate any help in this regard.
    SA

    Declare them in the namespace :)
    <?xml version='1.0' encoding='windows-1252'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template name="distinct">
    <xsl:param name="nodes" select="/.."/>
    , </xsl:stylesheet>

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

  • BPEL SCA: XML-20129: (Error) Namespace prefix 'ui' used but not declared.

    SOASuite 11g
    Oracle Weblogic Server 10.3.3
    Oracle Solaris on SPARC (64-bit) 10
    Database: Oracle Server - Enterprise Edition 10.2.0.5
    When I start the SOA domain server, I find the following in the log file:
    <Feb 25, 2011 10:41:23 AM CET> <Error> <org.apache.commons.digester.Digester> <BEA-000000> <Parse Error at line 9 column 79: <Line 9,
    Column 79>: XML-20129: (Error) Namespace prefix 'ui' used but not declared.
    org.xml.sax.SAXParseException: <Line 9, Column 79>: XML-20129: (Error) Namespace prefix 'ui' used but not declared.
    at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:422)
    at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:342)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:226)
    at org.apache.commons.digester.Digester.parse(Digester.java:1785)
    at oracle.fabric.composite.Parser.parseComposite(Parser.java:132)
    at oracle.integration.platform.kernel.WLSFabricKernelInitializer.deployComposite(WLSFabricKernelInitializer.java:493)
    at oracle.integration.platform.kernel.WLSFabricKernelInitializer.prepareCompositeDeployments(WLSFabricKernelInitializer.java:
    239)
    at oracle.integration.platform.kernel.WLSFabricKernelInitializer.init(WLSFabricKernelInitializer.java:127)
    at javax.servlet.GenericServlet.init(GenericServlet.java:241)
    at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
    at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
    at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1976)
    at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1950)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1869)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3126)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1512)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
    at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
    at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
    at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
    at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
    at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
    at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
    at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
    at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >
    My composite.xml is:
    <composite name="JIPSYHandleRTOTaskEBF" revision="1.0" mode="active" state="on"
    xmlns="http://xmlns.oracle.com/sca/1.0"
    xmlns:ui="http://xmlns.oracle.com/soa/designer/"^M
    xmlns:xs="http://www.w3.org/2001/XMLSchema">^M
    <import location="GetTimeoutPeriod.wsdl" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/GetTimeoutPeriod/"/>
    <service ui:wsdlLocation="JIPSYHandleRTOTaskEBF.wsdl" name="client">
    </composite>
    But when it has been deployed, I see that this has been changed into:
    <composite name="JIPSYHandleRTOTaskEBF" revision="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <import location="GetTimeoutPeriod.wsdl" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/GetTimeoutPeriod/"/>
    <service ui:wsdlLocation="JIPSYHandleRTOTaskEBF.wsdl" name="client">
    </composite>
    (I exported this from MDS).
    Apparently, some namespaces are stripped.
    This appears to happen during the deploy (using ant), because the version in the generated jar file is already missing the namespaces.
    The BPEL processes appear to work fine though.
    Why is this happening and how can I prevent these errors?

    I've fiddled around with the file composite.xml and found the following workaround:
    If I change the start of the file to:
    <?xml version="1.0" encoding="UTF-8"?>
    <composite name="JIPSYUpdateWorkflowReqABCSImpl"
    xmlns="http://xmlns.oracle.com/sca/1.0"
    xmlns:ui="http://xmlns.oracle.com/soa/designer/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    revision="1.0"
    mode="active"
    state="on">
    it remains unchanged and the errors during deployment are gone.

  • Error:  Namespace prefix 'split-by-page-break' used but not declared.

    I have my machine reimaged, now when I try to preview an rtf template I get the below error. Nothing has changed in my template and I am using 1.0.0 Build 9 as before my reimage as well. This is an uregent problem that I am not able to find the solution for on my own. Please advise with any help.
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'split-by-page-break' used but not declared.
         at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:782)
         at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:564)
         ... 14 more
    Thanks

    I'm just new to XMLP and am receiving the same error.. My error is occuring when trying to use sub-templates in my master template.
    I believe I have the syntax correct:
    To import template file:
    <?import:file:h:///CN_LTR_TEMPLATES.rtf?>
    to call the sub-template:
    <?call-template: signature:?>
    Its the call-template to signature thats generating my error message.. My only thought is that its not calling my import properly..
    Anyway.. Hope this might help you a bit.. you never mentioned anything about using a sub-templates. Perhaps since you formated your computer, your template may be in a different location or gone all together (that is if you are using sub-templates).
    If i figure anything out in the mean time, i'll let you know..
    Edited by: user8682333 on Aug 16, 2009 6:51 AM

  • Namespace prefix 'xdosxlt' used but not declared

    I'm trying to remove duplicate data from my dataset (below)
    <MAIN>
    <PODATA>
    <PRJ>..
    </PRJ>
    <PRJ>..
    </PRJ>
    </PODATA>
    <PRJ>..
    </PRJ>
    <PRJ>..
    </PRJ>
    <PODATA>
    </PODATA>
    and followed code as given in below link but getting error message *"Namespace prefix 'xdosxlt' used but not declared"*
    https://blogs.oracle.com/xmlpublisher/entry/removin_duplicates
    In short:_
    Added a variable as
    <?variable:metrics;xdosxlt:distinct_values(PODATA)?>
    and in for loop referring as
    <?for-each:$metrics?><?sort:PONUMBER;'ascending';data-type='text'?>
    I cannot change the SQL as I need data on 2 group levels separately.
    Can you pls assist? I'm EBS 11i and BIP Template Builder for Word 10.1.3.4.2
    Edited by: oraclepro73 on May 8, 2012 3:19 PM

    Hi ,
    When i tried
    <?variable:metrics;xdosxlt:distinct_values(DISTRIBUTIONS_ROW)?>
    i get an error, any idea please?
    Thanks,
    Husam

  • Duplex print setup error - Namespace prefix 'section' used but not declared

    Hi All, I am getting the below error while trying to preview as PDF document. The issue seems to be caused by adding the below to form field in the rtf template (removing the below i can view the PDF document but it does not work as expected ie printing the terms and conditions to back of the page)
    <?section:force-page-count;'end-on-even-layout'?>
    Error::
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'section' used but not declared.
         at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:782)
         at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:564)
         ... 15 more
    FYI: I have been using the below link as example
    http://blogs.oracle.com/xmlpublisher/2007/10/here_are_my_terms_conditions.html
    Also reviewed the following link too apart from reading the user guide
    http://winrichman.blogspot.com/search/label/BI%20Publisher%20Last%20page%20continued
    Thanks, Maha

    Hi Maha,
    I have used the <?section:....?> command a few times, and I think it has to be enclosed within a <?for-each@section:.....?> loop. If you are still having issues, then upload your template and sample XML somewhere and I can try to take a look for you.
    Regards,
    Cj

  • Using selectSingleNode with namespace prefixes like "xmlsns:xsi"???

    I'm having a little trouble manipulating a document with the xmlparserv2 library. The XMLNode.selectSingleNode method does not seem to work when the attribute in question is part of a namespace. For example, I have a document that has a schema declaration like so:
    ****CUT****
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="..\XMLStressTestCase.xsl"?>
    <XMLTestCase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../XmlStressTestCase.xsd" Name="Engenious (Switch) Eligible Test" MaxTime="30000">
    ****CUT****
    If I create an XMLDocument (myDoc) from the file in question and try to execute the following line of code
    Node n = myDoc.selectSingleNode("@xmlns:xsi");
    I get the following error
    " Namespace prefix 'xmlns' used but not declared."
    In google I found a thread (http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=ugJD7hJ3BHA.2236%40tkmsftngp02&rnum=2&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26q%3Dxmlns%2B%252B%2BselectSingleNode%26sa%3DN%26tab%3Dwg)that points to setProperty/selectionNamespaces
    as qa possible way to resolve the problem in the MSXML implementation. It looks like the oracle XDK has the same method, but I can't seem to find any documentation on the values that are supported for that method (http://otn.oracle.com/docs/tech/xml/xdk_java/doc_library/Production9i/doc/java/javadoc/oracle/xml/parser/v2/XMLNode.html#setProperty(java.lang.String, java.lang.Object))
    Any help? Should I be declaring the namespace in my XML someplace?

    In fact it used to be possible to set a NamespacePrefixMapper that controls the namespace prefixes in the JAXB 2.0 from Glasfish like this:
    marshaller.setProperty("com.sun.xml.bind.namespacePrefixMapper", new MyNamespacePrefixMapper());
    When using the Java 6 implementation of JAXB this coded will throw an exception. Has anyone got a clue how to control the namespace prefix in Java 6?
    Thanks,
    Ager

  • Format using default namespace prefix.

    Is there any way to format XML using default namespace prefix in an expression?
    My expression is as follows:
    oraext:get-content-as-string(bpws:getVariableData('JmsMdx_InputVariable','body'))

    This seems wrong to me. I've filed Bug 2400119 to get this looked into by development.
    I'd expect any document with an appropriate qualified name to be found by your XPath expression, irrespective of whether syntactically one of the documents happened to use the default namespace syntax.

  • How are you using the Namespace Prefix?

    As the subject says...
    The top-level namespace prefix looks very useful for segregating projects into their own namespaces...is this what this is for, or does SAP have another recommended use for this prefix?
    The vendor name already makes the namespace unique to a corporate entity (if you use the domain name), so anything after that is really only of importance to the internal development environment...

    Even if your development isn't that big, using the 'name space prefix' would allow you to further segregate your codebase. 
    This also becomes important when your domain name is rather long - 15 characters.  Take away four or so more for the namespace prefix, and you're left with 20 characters for the DC name.  Add in a few separators, and you're down to 12-15 characters.
    Obviously, readability can suffer when you start to abbreviate too much, so I'm looking for best practices when it comes to the namespace prefix.
    Thanks for your comment.

  • Unknown namespace prefix Error - when using custom Aliases with RDF aliases

    I am getting unknown namespace prefix error when I use custome SEM_ALIAS with rdf SEM_ALIAS. It seems once you specify custom SEM_ALIAS, the default rdf alias is not recognized. Following are the details of queries
    I have a sem_Model "test" which has "event" as a class and "Merger" as a sub-class of event, with "acquiringorg" as a property having the domain "org". "Org" is also defined as a class with the literal attribute "hasname". I have added one instance of "merger" class with appropriate values for "acquiringorg" property. There is one instance or "Org" as well for reference in the instance above.
    the following query(return all objects having property "acquiringorg" and its .e. "hasName" attribute for the object) runs fine and returns appropriate resultset
    select x event,z acquiringorg ,l acquireeorg from table(SEM_MATCH(
    '(?x Evnt:AcquiringOrg ?y)(?k orgn:hasName ?l)',
    SEM_MODELS('test'),
    null,
    SEM_ALIASES(SEM_ALIAS('Evnt','http://www.abc.com/Event/Merger/'),
    SEM_ALIAS('orgn','http://www.abc.com/Org/')),
    null));
    However when I want to add another criteria i.e. show me events of type merger(?x rdf:type :Merger) , the query fails with the "unknown namespace prefix error" as above
    select x event,z acquiringorg ,l acquireeorg from table(SEM_MATCH(
    '(?x rdf:type :Merger)(?x Evnt:AcquiringOrg ?y)(?k orgn:hasName ?l)',
    SEM_MODELS('test'),
    null,
    SEM_ALIASES(SEM_ALIAS('Evnt','http://www.abc.com/Event/Merger/'),
    SEM_ALIAS('orgn','http://www.abc.com/Org/')),
    null));
    specifying "rdf" ALIAS explicitly also does not work
    select x event,z acquiringorg ,l acquireeorg from table(SEM_MATCH(
    '(?x rdf:type :Merger)(?x Evnt:AcquiringOrg ?y)(?k orgn:hasName ?l)',
    SEM_MODELS('test'),
    null,
    SEM_ALIASES(_SEM_ALIAS('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'),_
    SEM_ALIAS('Evnt','http://www.abc.com/Event/Merger/'),
    SEM_ALIAS('orgn','http://www.abc.com/Org/')),
    null));
    I am unable to figure out why default namespace i.e. rdf is returning this error
    Stuck at this point badly!!Any pointers would be useful!!

    Full error details are as below
    ORA-29532: Java call terminated by uncaught Java exception: oracle.spatial.rdf.server.ParseException: Unknown namespace prefix ''
    ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 153
    ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 842
    ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 235
    ORA-06512: at line 1
    29532. 00000 - "Java call terminated by uncaught Java exception: %s"
    *Cause:    A Java exception or error was signaled and could not be
    resolved by the Java code.
    *Action:   Modify Java code, if this behavior is not intended.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • 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

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

  • 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

  • Content Delta RSA5

    Hi Friends, Can any one please give the idea on Content delta which is available in the RSA5(Post Process of Data Sources and hierarchy)? Thanks  & Regards, Shareen Guduru.

  • How to go about .....

    Device drivers writing need some links and tutorials for writing device drivers for x86 amd64 platform geeks havin info......... plz reply

  • Intranet Clients try to access SUP Point Over http instead of https

    Hi My internet clients on DMZ Network trying to access my SUP Server over http instead of https. So the clients are not downloading any updates, here is my ContentTransferManager log on a DMZ Client Persisted locations for CTM job {31F9D2B4-1289-4EB3

  • Can't enable Tap-To-Click with ALPS touchpad

    Hello, I installed Archlinux on my vaio and I am trying to get the ALPS touchpad to work. I've tried the xorg.conf solution but tap-to-click doesn't work. So I tried using the HAL policy. This almost works, but I have to open gsynaptics tool and enab

  • Applets and JApplets

    Hello again world. The following program simply displays a scrolling banner in a browser window: import  java.awt.*; import  java.applet.*; import  javax.swing.*; // this will be clear later public  class  Banner  extends  Applet  implements  Runnabl