Adding namespace qualification to elements...

<!-- -- Begin data to be encrypted ----->
<m:sayHello xmlns:m="http://www.bea.com/servers/wls/samples/examples/webservices/basic/javaclass3">
<intVal xsi:type="xsd:int">3</intVal>
<string xsi:type="xsd:string">ABCDEFG</string>
</m:sayHello>
<!----- End data to be encrypted -- -->
Above is the data that I'm encrypting.
I'd like to ***add*** xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" to BOTH the <intVal> and <string> elements. Is this possible?
The other option would be to OMIT the xsi:type and make it less strict but as I understand the value of type MUST BE an "NMTOKEN" -- so presumably can't be anything loosey-goosey?
=======================================================
So I'd like the data I'm encrypting to look like this:
=======================================================
<m:sayHello xmlns:m="http://www.bea.com/servers/wls/samples/examples/webservices/basic/javaclass3">
<intVal xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:int">3</intVal>
<string xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">ABCDEFG</string>
</m:sayHello>
=================================
Here is my web-services.xml file:
=================================
<?xml version="1.0" encoding="UTF-8" ?>
- <web-services>
- <web-service useSOAP12="false" targetNamespace="http://www.bea.com/servers/wls/samples/examples/webservices/basic/javaclass3" name="HelloWorld" style="rpc" uri="/HelloWorld">
- <security>
- <user>
<name>ivory</name>
<password>itfloats</password>
</user>
- <encryptionKey>
<name>s1as</name>
<password>changeit</password>
</encryptionKey>
- <spec:SecuritySpec xmlns:spec="http://www.openuri.org/2002/11/wsse/spec" spec:Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" spec:Id="default-spec">
<spec:UsernameTokenSpec PasswordType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText" />
<spec:BinarySecurityTokenSpec EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" />
<spec:EncryptionSpec spec:EncryptBody="true" spec:EncryptionMethod="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" spec:KeyWrappingMethod="http://www.w3.org/2001/04/xmlenc#rsa-1_5" />
</spec:SecuritySpec>
<spec:SecuritySpec xmlns:spec="http://www.openuri.org/2002/11/wsse/spec" spec:Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" spec:Id="nothingburger-spec" />
</security>
- <components>
<java-class name="jcComp0" class-name="examples.webservices.basic.javaclass3.HelloWorld" />
</components>
- <operations>
- <operation name="sayHello" method="sayHello(int,java.lang.String)" component="jcComp0" in-security-spec="default-spec" out-security-spec="nothingburger-spec">
- <params>
<param style="in" xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:int" location="body" name="intVal" class-name="int" />
<param style="in" xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string" location="body" name="string" class-name="java.lang.String" />
<return-param xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string" location="body" name="result" class-name="java.lang.String" />
</params>
</operation>
</operations>
</web-service>
</web-services>

Hi Stefan,
I am partially able to add prefix to the XML.
Here what I did for Module Configuration:
1. Added Module  AF_Modules/XMLAnonymizerBean after std module in Soap Receiver Adapter
2. Parameter Name: anonymizer.acceptNamespaces
    Parameter Value : http://xyz/mdm ns0
Below is the reponse xml with namespace prefix only in the root tag,  no prefix for child tags.
<?xml version='1.0' encoding='utf-8'?>
<ns0:getUpdateListResp xmlns:ns0='http://xyz/mdm'>
<item>46246</item>
<item>46247</item>
<item>46248</item>
</ns0:getUpdateListResp>
How do I get the namespace prefix to all the tags in the XML?
Thanks,
Laxman

Similar Messages

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

  • Adding namespace doens't work

    Hi,
    I need to add the namespace to a IDOC. It seens to, that XI doesn't add the namespace for IDOC.
    To do that I implement a java mapping like this :
    public void execute(InputStream in, OutputStream out)
              throws StreamTransformationException {
                        Document source = null; // Source message
              String sourceString = null; // Source XML message as a string
              // Create out of the InputStream the Source XML document
              try {
                   DocumentBuilderFactory factory =
                        DocumentBuilderFactory.newInstance();
                   source = factory.newDocumentBuilder().parse(in);
                   // Add namespace to document
                   Element root = source.getDocumentElement();
                   String messageNamespace = null;
                   messageNamespace = (String)param.get(StreamTransformationConstants.INTERFACE_NAMESPACE);
                   root.setAttribute("xmlns",messageNamespace);
    During runtime the result of this mapping ist the following :
    <?xml version="1.0" encoding="utf-8"?>
    <ORDERS05 xmlns="urn:sap-com:document:sap:idoc:messages">
    <IDOC xmlns="" BEGIN="1">
    <......
    Why the mappingruntime add the xmlns="" in the IDOC tag ?
    Any hints ?
    Regards,
    Gerald

    Hello Gerald,
    We'd the same problem here. Actually R3 didn't put a namespace inside the IDOC XML format.  I opened a message some months ago. Here the answer from SAP:
    +"...XML namespaces are a part of the XML syntax as attributes and elements.
    Some XML documents will use them and others not. (The same as some XML
    documents will contain attributes and others not). When XML namespaces
    are used the syntax is with these xmlns- resp. xmlns:
    In this case unfortunately there exists no BAdI or a user exit. So the
    only way I see is a modification of the standard.
    Within Include "LEDI7F04" there is a paragraph
    Idoctyp immer
        CLEAR OUT_STRING.
        IF EDIDC-IDOCTP CA '_'. " enthält mind. ein _
          CONCATENATE START_CONTROL_IDOCTYP CDATA_START_TAG EDIDC-IDOCTP
                      CDATA_END_TAG END_CONTROL_IDOCTYP
                      INTO OUT_STRING.
        ELSE.
          CONCATENATE START_CONTROL_IDOCTYP EDIDC-IDOCTP END_CONTROL_IDOCTYP
                      INTO OUT_STRING.
        ENDIF.
    This builds the "" for your scenario.
    As the coding is different for Unicode and Non-Unicode, you have to
    make such a coding modification for the Unicode case within Include
    "LEDI7F05" in the following paragraph:
    idoctyp immer
        concatenate i_string start_control_idoctyp edidc-idoctp
                               end_control_idoctyp into i_string.
      [within form "control_record_xml"]
    As there is a BAdI for the Unicode case, I recommend to use the BAdI
    instead of a modification.
    Hope that this information could help you!!
    Regards,
    Gustavo Kauffman

  • Jaxp namespaces in document elements

    I am trying to use Java to access xml items using XPath.
    I am OK with an xml document with name spaces in root element.
    But not namespaces declared in elements.
    Typically see two documents at
    http://www.w3schools.com/XML/xml_namespaces.asp
    Under
    XML Namespaces - The xmlns Attribute
    Quote "Namespaces can be declared in the elements where they are used or in the XML root element:"
    My Xpath is "/root/h:table/h:tr/h:td"
    This works OK for second document with namespaces in root element.
    But not the first document with namespaces in the elements.
    I have tried using lookupNamespaceURI but this only seems to process root element.
    It's hair pulling time!
    Any Ideas
    Thanks

    OK messy but ..
    Set the line
    XPathDemo xPathDemo = new XPathDemo("C:/opt/XpathDemo/w32.XML");to be either of the two w3schools example quoted previously.
    import java.io.File;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.Iterator;
    import javax.xml.XMLConstants;
    import javax.xml.namespace.NamespaceContext;
    import javax.xml.parsers.DocumentBuilder;  
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.xpath.XPath;
    import javax.xml.xpath.XPathConstants;
    import javax.xml.xpath.XPathExpression;
    import javax.xml.xpath.XPathExpressionException;
    import javax.xml.xpath.XPathFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    public class XPathDemo
        public class UniversalNamespaceResolver implements NamespaceContext
            // the delegate
            private Document sourceDocument;
             * This constructor stores the source document to search the namespaces in it.
             * @param document source document
            public UniversalNamespaceResolver(Document document)
                sourceDocument = document;
             * The lookup for the namespace uris is delegated to the stored document.
             * @param prefix to search for
             * @return uri
            public String getNamespaceURI(String prefix)
                String retVal;
                if (prefix.equals(XMLConstants.DEFAULT_NS_PREFIX))
                    retVal = sourceDocument.lookupNamespaceURI(null);
                else
                    retVal = sourceDocument.lookupNamespaceURI(prefix);
                return retVal;
             * This method is not needed in this context, but can be implemented in a similar way.
            public String getPrefix(String namespaceURI)
                return sourceDocument.lookupPrefix(namespaceURI);
            public Iterator getPrefixes(String namespaceURI)
                // not implemented yet
                return null;
        public XPathDemo(String fileName)
            try
                String dataFileName = "C:/opt/XpathDemo/tmp.txt";
                File f = new File(dataFileName);
                PrintWriter out = new PrintWriter(f);
                generateData(out, fileName);
                out.flush();
                out.close();
            catch (XPathExpressionException xp)
                System.out.println("Exception expression cannot be compiled : " + xp.getMessage());
            catch (NullPointerException np)
                System.out.println("expression is null : " + np.getMessage());
            catch (Exception e)
                System.out.println("General exception : " + e.getMessage());
        public void generateData(PrintWriter out, String fileName) throws ParserConfigurationException, SAXException, IOException,
            XPathExpressionException
            DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
            domFactory.setNamespaceAware(true); // never forget this!
            DocumentBuilder builder = domFactory.newDocumentBuilder();
            Document doc = builder.parse(fileName);
            XPathFactory factory = XPathFactory.newInstance();
            XPath xpath = factory.newXPath();
            xpath.setNamespaceContext(new UniversalNamespaceResolver(doc));
            System.out.println("Setting expr");
            XPathExpression expr = xpath.compile("/root/h:table/h:tr/h:td");
            if (expr != null)
                Object result = expr.evaluate(doc, XPathConstants.NODESET);
                if (result != null)
                    NodeList nodes = (NodeList) result;
                    System.out.println("Looping through " + nodes.getLength());
                    for (int i = 0; i < nodes.getLength(); i++)
                        System.out.println("i = " + i);
                        Node thisNode = nodes.item(i);
                        NodeList thisNode2 = thisNode.getChildNodes();
                        Node xx = thisNode2.item(0);
                        String val = xx.getNodeValue();
                        System.out.println("Value : '" + val + "'");
                else
                    System.out.println("Result was NULL");
            else
                System.out.println("Expr was NULL");
        public static void main(String[] args)
            XPathDemo xPathDemo = new XPathDemo("C:/opt/XpathDemo/w32.XML");
            System.out.println("Main complete!");
    }

  • [svn:fx-trunk] 8903: Tiny adjustment to the previous change in revision 8902 - this actually allows the fx : language namespace qualification to opt out of setting the id property in all scenarios .

    Revision: 8903
    Author:   [email protected]
    Date:     2009-07-29 11:17:43 -0700 (Wed, 29 Jul 2009)
    Log Message:
    Tiny adjustment to the previous change in revision 8902 - this actually allows the fx: language namespace qualification to opt out of setting the id property in all scenarios.
    QE notes: N/A
    Doc notes: N/A
    Bugs: SDK-21700
    Reviewer: Discussed with Paul
    Tests run: Checkintests, Mustella AdvancedCSS
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21700
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.jav a

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • [svn:fx-trunk] 5587: Adding @namespace to halo and haloclassic defaults. css themes.

    Revision: 5587
    Author: [email protected]
    Date: 2009-03-26 12:06:28 -0700 (Thu, 26 Mar 2009)
    Log Message:
    Adding @namespace to halo and haloclassic defaults.css themes.
    QE: Could you please check if this fixes the recent themes issues, and that -compatibility-version=3.0.0 still works as expected too?
    Dev: No
    Doc: No
    Checkintests: Pass
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/halo/defaults.css
    flex/sdk/trunk/frameworks/projects/haloclassic/defaults.css

    I just saw that we are using xmlns:mx="http://www.adobe.com/2006/mxml" in all our custom components written in mxml, including our main application.
    In our custom css, I have the default namespace set to:
    @namespace "library://ns.adobe.com/flex/mx";
    could this result in these warnings ?

  • Adding NameSpace as Attribute of Element

    Hi all,
    I have an element called Batch which has the attributes BatchID="" NoOfEntries="" and what I have to do is add another attribute but this attribute needs to be:
    xmlns="urn:x-commerceone:document:com:commerceone:CBL:CBL.sox$1.0"
    It doesnt seem to be adding this extra attribute, even if I add another simpler attribute such as Names="john" it wont add any more....
    Is there a limit to the number of attributes you can add to an element using the following code:
    elm.setAttribute("Name", "John");If there is no limit would I be able to add the above (xmlns) as an attribute as I know it has some strange characters in there?

    Hi thanks for the help but I am slightly confused on this matter now,
    Basically what I have is an element in an XML as in the following:
    <bat:Batch Name=xyz" Age="123"
    xmlns="urn:x-commerceone:document:com:commerceone:CBL:CBL.sox$1.0"
    xmlns:bat="urn:x-commerceone:document:btsox:Batch.sox$1.0"
    xmlns:sro="urn:x-commerceone:document:telcoapisox:ServiceRequestOrder.sox$1.0"
    xmlns:dsl="urn:x-commerceone:document:btsox:DSL.sox$1.0"> I guess all these are definitions of namespaces. I cannot set the element name to bat:Batch as I think the colon isnt allowed and hance the use of the NSpace. The NSpace are as above,
    I have located the element that I want to add the above definition to, this is the element elm.
    Then using elm.setAttribute("", ""); I am adding the Name and Age attributes, but am having probs adding the namespace stuff and hence using the colon bat:Batch too,
    Please could you explain a bit further on this, I am looking around in the forums but not getting anywhere fast. Basically I need to have the above attributes as my header in the XML,
    Thanks again,

  • Adding namespace qualified element nodes

    Is there a way to add namespace qualified element nodes to
    a document stored in a BDBXML container using the XmlModify class
    (BDBXML version 2.3.10, Linux)? Or, for that matter, any other
    handles?
    Particularly, is it possible to achieve this using the PHP
    extension?
    Let me give an example.
    When doing queries, you can set a namespace in the XmlQueryContext
    or in the XQuery expression itself:
    # prefix cannot be '' as of BDBXML 2.3.10
    $qc->setnamespace('a', 'http://as-guides.com/wev1');
    declare namespace a = "http://as-guides.com/wev1"; ...
    declare default element namespace "http://as-guides.com/wev1"; ...
    You can then refer to your namespace qualified elements as "a:Bla"
    etc. Or just as "Bla" if you make your namespace the default
    namespace.
    So far, so good.
    Now what if I want to add a namespace qualified element to
    my document? However I go about setting the namespace I always end
    up with either an apparently namespace qualified element which the
    namespace is not registered for or an element in the empty
    namespace.
    What I want is my element to adhere to the namespace
    "http://as-guides.com/wev1", which is set as the default
    element namespace in my document.
    Here is an example document.
    <Broadcast xmlns="http://as-guides.com/wev1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://as-guides.com/wev1 ds.xsd">
    <Start epoch="1186100400">2007-08-03T00:20:00Z</Start>
    <End epoch="1186100700">2007-08-03T00:25:00Z</End>
    <Content>
    <Title>Tagesschau</Title>
    <Genre>Nachrichten</Genre>
    </Content>
    </Broadcast>
    And here is my PHP code.
    $docname = '2007-08-02-1186100400-25758173-ard.xml_41368';
    $mgr = new xmlmanager;
    $cont = $mgr->opencontainer($argv[1]);
    $cont->addalias('tv');
    $qc = $mgr->createquerycontext();
    $qc->setnamespace('a', 'http://as-guides.com/wev1');
    $qexp = $mgr->prepare('/a:Broadcast', $qc);
    $mod = $mgr->createmodify();
    $mod->addappendstep($qexp, XmlModify_Element, 'a:now', time());
    $doc = $cont->getdocument($docname);
    $docval = new xmlvalue($doc);
    echo $docval->asString(), "\n";
    $uc = $mgr->createupdatecontext();
    $mod->execute($docval, $qc, $uc);
    Here is what gets added as last child node under "Broadcast":
    <a:now xmlns="">1189605065</a:now>
    So the namespace prefix I specified is added verbatim, without
    regard to the namespace settings in $qc (XmlQueryContext) - which
    do work fine for the query. No namespace declaration for "a"
    is added to the document. The resulting XML is invalid, as
    xmllint correctly points out.
    namespace error : Namespace prefix a on now is not defined
    So settings in XmlQueryContext do not seem to have any bearing on
    my update. XmlUpdateContext, on the other hand, does not have any
    methods defined for setting the namespace.
    Not setting the namespace in $qc (XmlQueryContext) and specifying
    it in the XQuery itself didn't work either. I left out the call to
    "setnamespace()" and changed the query to:
    declare default element namespace "http://as-guides.com/wev1";
    /Broadcast
    And I changed "a:now" to just "now". Here is what got added:
    <now xmlns="">1189607498</now>
    I didn't expect this second version to work, but I did expect the first
    one to work.
    What is the meaning of supplying XmlQueryContext to the execute()
    method?
    Is there a way to add namespace qualified elements to a document?
    If so, how can it be done?

    Thanks for your answer, George. I haven't quite understood how to make it do the trick, though.
    To change one document I did:
    dbxml> open tv.dbxml
    dbxml> setnamespace a http://as-guides.com/wev1
    Binding a -> http://as-guides.com/wev1
    dbxml> getdoc 2007-08-02-1186104300-25758380-sat1.xml_40564
    1 documents found
    dbxml> print
    <?xml version="1.0" encoding="UTF-8"?>
    <Broadcast xmlns="http://as-guides.com/wev1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://as-guides.com/wev1 ds.xsd">
    <Start epoch="1186104300">2007-08-03T01:25:00Z</Start>
    <End epoch="1186105800">2007-08-03T01:50:00Z</End>
    <VPS>03:25</VPS>
    <Content>
    <Title>Moin</Title>
    </Content>
    </Broadcast>
    dbxml> append doc(2007-08-02-1186104300-25758380-sat1.xml_40564)/a:Broadcast element "" "<a:now xmlns:a='http://as-guides.com/wev1'>NOW</a:now>"
    Appending into nodes: doc(2007-08-02-1186104300-25758380-sat1.xml_40564)/a:Broadcast an object of type: element with name: and content: <a:now xmlns:a='http://as-guides.com/wev1'>NOW</a:now>
    0 modifications made.
    No change made to my document. I used the doc() function instead of collection() as in the example you gave. Using collection() as in your example (verbatim) I get an error message:
    stdin:17: append failed, Error: XmlModify::execute: Cannot perform a modification on an XmlValue that isn't either Node or Document type
    This is in the FAQ, but I don't quite get it.
    http://www.oracle.com/technology/products/berkeley-db/faq/xml_faq.html#49
    Anyway, I can still perform modifications outside of the container and then replace the document. Or wait till 2.4.
    Thanks for your answer and the good work. Regards,
    Michael

  • Adding namespace prefix to the XMLa root element

    I am facing a problem in our application. I am assigning an XML content to a XSD variable. While assignment operation is performed the prefix of the XML root element alone is getting replaced with default namespace, though the source XML has the prefix. Please let me know if any patch or workaround is available to address this issue.
    Thanks!

    Hi All,
    we are also facing the same issue, Please provide the solution if anyone knows. We are also using the SOA Suite 11g Version.

  • XSLT : Trouble Adding Namespace

    I need to add namespace xmlns:prx="urn:sap.com:proxy:SB1:/1SAI/TAS04BED82951A661E02EC4:701:2008/06/06" to my xml document after doing a PI message mapping.
    When I run the following XSLT code in my XML editing software, it works as desired.  When I import the XSL program and use it at runtime, it is not adding the namespace.  Can anyone help?
    XSLT:
    <?xml version='1.0' encoding='utf-8'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:prx="urn:sap.com:proxy:SB1:/1SAI/TAS04BED82951A661E02EC4:701:2008/06/06">
    <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
      <xsl:template match="@* | node()">
        <xsl:copy>
          <xsl:apply-templates select="@* | node()"/>
        </xsl:copy>
      </xsl:template>
      <xsl:template match="/*">
        <xsl:copy>
          <xsl:copy-of select="document('')/xsl:stylesheet/namespace::*[not(local-name() = 'xsl')]"/>
          <xsl:apply-templates select="@* | node()"/>
        </xsl:copy>
      </xsl:template>
    </xsl:stylesheet>
    Source:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:ChartOfAccountsReplicationConfimation xmlns:ns0="http://sap.com/xi/SAPGlobal20/Global">
      <MessageHeader>
        <UUID>4C321305CA1400AAE10080000A98800D</UUID>
        <ReferenceUUID>4bff533d-2452-00f2-e100-80000a98800c</ReferenceUUID>
        <CreationDateTime>2010-07-06T13:57:30Z</CreationDateTime>
        <SenderBusinessSystemID>ERP_GTPSRM_ECC6_S1</SenderBusinessSystemID>
        <RecipientBusinessSystemID>EDG_030_BusinessSystem</RecipientBusinessSystemID>
      </MessageHeader>
      <Log>
        <BusinessDocumentProcessingResultCode>3</BusinessDocumentProcessingResultCode>
        <MaximumLogItemSeverityCode>1</MaximumLogItemSeverityCode>
        <Item>
          <Note>Processed by PI</Note>
        </Item>
      </Log>
    </ns0:ChartOfAccountsReplicationConfimation>
    Desired Target:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:ChartOfAccountsReplicationConfimation xmlns:ns0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:SB1:/1SAI/TAS04BED82951A661E02EC4:701:2008/06/06">
         <MessageHeader>
              <UUID>4C321305CA1400AAE10080000A98800D</UUID>
              <ReferenceUUID>4bff533d-2452-00f2-e100-80000a98800c</ReferenceUUID>
              <CreationDateTime>2010-07-06T13:57:30Z</CreationDateTime>
              <SenderBusinessSystemID>ERP_GTPSRM_ECC6_S1</SenderBusinessSystemID>
              <RecipientBusinessSystemID>EDG_030_BusinessSystem</RecipientBusinessSystemID>
         </MessageHeader>
         <Log>
              <BusinessDocumentProcessingResultCode>3</BusinessDocumentProcessingResultCode>
              <MaximumLogItemSeverityCode>1</MaximumLogItemSeverityCode>
              <Item>
                   <Note>Processed by PI</Note>
              </Item>
         </Log>
    </ns0:ChartOfAccountsReplicationConfimation>

    HI Stefen,
    I had one XSL question,i have seen in the blogs you have given correct answers regarding the XSLT.
    My requirement is  the source file is :
    <?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" encoding="UTF-8"/>
    <ns0:Esri_Identify
    xmlns:ns0="http://ottawa.ca/ecc/esri/ecctoesri">
       <Identify>
          <MapDescription>
             <Name/>
             <Rotation/>
          </MapDescription>
          <MapImageDisplay>
             <ImageHeight/>
             <ImageWidth/>
             <ImageDPI/>
          </MapImageDisplay>
          <SearchShape>
             <X/>
             <Y/>
          </SearchShape>
          <Tolerance/>
          <IdentifyOption/>
          <LayerIDs>
             <Int/>
          </LayerIDs>
       </Identify>
    </ns0:Esri_Identify>
    and expected is :
    <?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" encoding="UTF-8"/>
    <ns0:Esri_Identify
    xmlns:ns0="http://ottawa.ca/ecc/esri/ecctoesri">
       <Identify>
          <MapDescription>
             <Name/>
             <Rotation/>
          </MapDescription>
          <MapImageDisplay>
             <ImageHeight/>
             <ImageWidth/>
             <ImageDPI/>
          </MapImageDisplay>
         <SearchShape xmlns:q4="http://www.esri.com/schemas/ArcGIS/10.0" xsi:type="q4:PointN" xmlns="">
             <X/>
             <Y/>
          </SearchShape>
          <Tolerance/>
          <IdentifyOption/>
          <LayerIDs>
             <Int/>
          </LayerIDs>
       </Identify>
    </ns0:Esri_Identify>
    I need to pass the name space for searchshape element, can you please help me in this regard.
    Thanks,

  • JMS adapter adding namespace to PIP. Please help!

    Hi Experts,
      I have a XI scenario where 4C1 PIP is being sent to TIBCO.
      The issue is that, the output PIP has a namespace <Pip4C1InventoryReportNotification xmlns:jms1="http://www.tibco.com/namespaces/tnt/plugins/jms">
      But no where in XI this namespace has been specified. I suspect that this namespace is getting added in JMS adapter side.
      Can this namespace be easily removed in JMS adpter so that PIP element is generated as <Pip4C1InventoryReportNotification> ? If Yes, then how can we do that?
    Thanks & Regards
    Gopal

    From the namespace and the prefix, I guess that the Tibco jms libraries add that namespace. If this is true, you cannot do anything in PI and you have to check, if Tibco can work with that namespace or remove it.
    Regards
    Stefan

  • Adding Namespace in Sender File Adapter Scenario.

    Hi All
    I have a scenario where  XI has to Pick Up XML a file and process it. The structure of the file is as follows
    <?xml version="1.0" encoding="UTF-8" ?>
    <Header>
         <Seg1>
         </Seg1>
    </Header>
    This file does not contain any any namespace tag. I guess XI would not be able to pick up this file if there is no namespace in the XML file . The file expected by XI would be something like this.
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:MessageTypeName xmlns:ns0="...namespace...">
    <Header>
         <Seg1>
         </Seg1>
    </Header>
    </ns0:MessageTypeName>
    Is there a way this can be handled at the File Sender adapter side . I am aware about  adding adapter module. Is there any other way to add the missing two namespace tags at the top and bottom of the file .
    any help would be appreciated.
    regards
    Nilesh .
    Edited by: Nilesh Taunk on Apr 7, 2008 2:11 PM

    Hi Nilesh,
    Yes it is possible in File sender adapter to give the namespace. In FCC you can give inside Document Specification.
    Under Document Name, enter the name of the XML document.
    The document name is inserted in the message as the main XML tag. This is mandatory for the mapping.
    Under Document Namespace, enter the namespace of the document.
    The namespace is added to the name of the document. This is mandatory for the mapping
    I hope this will help you.
    Regards
    Aashish Sinha

  • How to hide columns that are getting added dynamically to UI Element 'Table

    In SRM 7.0 while displaying a RFx, click on "responses and awards" button.
    In the response comparision tab once the user selects response number and clicks on "compare all responses".
    Item details table is displayed with fields item number,internal number,item description,........,Price etc.
    Requirement is  to hide the price column from the table.
    The UI element type is 'Table'.
    But the catch is there is no column price visible at layout design level.
    This field is getting added dynamically at run time.
    When i right click and see the 'more field help' at the front end i get the field id as 'GRP_1_COL_3_TXTV'.
    lo_table ?= view->get_element( id = 'ITEMS_TABLE' ).
    lo_column = lo_table->get_column( id = 'GRP_1_COL_3_TXTV').
    ASSERT lo_column IS NOT INITIAL.
    lo_column->set_visible( EXPORTING value = '01' ).
    I had written the above code in the pre-exit of WDDOMODIFYVIEW.
    But i am getting dump as assertion failed.it says no column by name 'GRP_1_COL_3_TXTV'.
    Please help me inhow to hide fields or buttons getting generated dynmically.
    Regards,
    Venkat Raghavan.

    Hi Anitha,
    What i understood from your question is,you want to control the table from your inputs.I have a one question for you what do you want to show defaultly i.e when you run the application what you want to show,either no table or table with some values.
    Any how i am giving solution in this way.
    If both inputs are given proper table output is displayed
    Write your below logic in the WDDOMODIFYVIEW )
    Here i am assuming that you already have a table element in the view.
    Get the values entered in the input fields and compare those 2 values ,if the condition is satisfied then bind the values which you want to show in the table to the context node.
    but if only 1 input is given a column is empty in the output table so i want to hide this column dynamically at runtime based on my inputs
    You are telling that you know the empty column.If so get the view element reference and use the REMOVE_COLUMN to remove the column.
    data:lr_table type ref to cl_wd_table,
           lr_column type ref to L_WD_TABLE_COLUMN.
    lr_table ?= view->get_element( 'TABLE1' ).
    CALL METHOD LR_TABLE->REMOVE_COLUMN
        EXPORTING
          ID          = 'TABLE1_color'
         INDEX      =
        RECEIVING
          THE_COLUMN = lr_column.
    i want to hide some empty rows also at runtime based on inputs.
    Removing the rows is very simple.if you know the key fields data of internal table from your input fields then do in this way.
    delete itab from wa where key1= "12" and key2="abd".
    Now bind the internal table to context node.
    LO_ND_hcm->BIND_TABLE(
          NEW_ITEMS            = it_final
          SET_INITIAL_ELEMENTS = ABAP_TRUE ).

  • Error while Adding Profit Center Data element to Data Model of MDG-M

    Hello gurus,
    Can any one help me in adding profit center filed (Data element) to zztable, basically want to use the Data Element (PRCTR).
    Getting error" There is an attribute with data element assigned that refers to a check table. Besides the client, the check table can only have one key field that corresponds to the attribute.
    Regards,
    Mandapati

    Hi Mandapati,
    looks like you are assigning data element in existing attribute or you are assigning data element more than once.
    Try to create a new attribute and then assign the Data Element (PRCTR).
    Go to General Settings-> Data Modeling-> Edit Data Model.
    Select your datamodel( note that it should be MDGM data model. For MDG the MDGM data model is called MM. We can only add pre-delivered SAP ERP material master database field to an MDGM entity as an attribute)
    Select the entity types and then the attributes subdialog.
    Create a new attribute and assign a data element. The system then derives the properties, field labels for the attribute
    Regards
    Goutham Kanithi

  • Error Message upon adding media Adobe Premiere Elements 12

    . The program opens and I'm able to add media to a new project.  Once I move the clip to the timeline I get the error message "Adobe Premiere 12 Has Stopped Working".  I check the update on the video driver and it is current.  This problem happen after I have been using the program successfully to two hours.

    mattrayl
    What computer operating system is your Premiere Elements 12 running on? Have you updated 12 to 12.1 Update using an opened project's Help Menu/Update?
    If not, please do so.
    You wrote
    Once I move the clip to the timeline I get the error message
    What are the properties of the clip that you mention? If you added the clip to the project first, does the problem occur?
    The above are the initial questions that come to mind.
    Looking at this further....
    Since you wrote
    This problem happen after I have been using the program successfully to two hours.
    Let us start with how much content (including source media, effects, titles, and transitions) you have on the Timeline at this 2 hour mark when the program stops working? Is there a consistent pattern of what you are doing in the program when this happens? Are you multitasking and running Premiere Elements?
    Can you reopen this project? And, if so, how long can you work with it before the program shuts down again?
    What is your project preset and the properties of your source media for the project?
    Does the problem exist with all your projects or just this one?
    We will be watching for answers to these preliminary questions and then we will plan our troubleshooting strategy according to your details.
    Thanks.
    ATR

Maybe you are looking for

  • Some songs can't be deleted off my iphone 4.

    I have tried the manual managing of the music, but a good handful of songs are on the phone, but don't show up in the manual manage list. It's really annoying since I'd like to sync the albums these songs belong to, but if I do that I end up with dup

  • FCC conversion for receiver

    Hi All, i am doing FCC conversion in FTP receiver adapter. i need to produce text file converting below structure in given format with field seperating by comma. Messages .......Message1 ............MT_Employee ..................NODE1 ...............

  • VBAI2011 Save for Previous Version option

    Hello, Since VBAI 2011 is one of NI products, I am curious that it has an option of Save As For Previous version like Labview, or is there any way around it?.  I currenlty have running Labview 8.6 in my systems which doesn't work well with VBAI 2011.

  • SDO_Relate does not return an interior point

    When I use SDO_Relate to try to find a point contained within a polygon, I can only get any results if the point actually lies on a boundary - the interior point is not detected, even with an ANYINTERACT filter. Here's an example: create table test (

  • How do i update new country adress

    Moved from the US to Canada, and trying to update my account info, but it will not allow me change the country or region, thus get revised billing info...help