3 Replies Latest reply: Aug 2, 2012 3:45 PM by Tarak RSS

    Issue with Remove Namespace HTTP POST method

      I am working on an integration where cXML from the Partner will be posted to SOA and from SOA another HTTP post to end partner. its basically

      HTTP Post(partner 1)----------------->SOA--------------->HTTP Post(Partner 2).

      I have cXML its in dtd format which i have converted to Native format using file-adapter and added namespace schema. so My question is while cXML is post to SOA i have added namespace schema and consumed it to my BPEL, while it leaves out Partner2 through HTTP post again the namespace should be removed and sent to partner 2. I am stuck at this Point. need Urgent help. please. how to remove name space.
        • 1. Re: Issue with Remove Namespace HTTP POST method

          There's a proposed solution here that may be helpful for your case...
          Re: How to remove namespace in BPEL

          Please let me know how you go...


          It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts)
          • 2. Re: Issue with Remove Namespace HTTP POST method
            my case is different i have cXML which is commerce xml, its normally in dtd format, which i have converted to native using fileadapter, created namespace schema while receiving it from partner1, but now while sending to partner2 i need to remove the namespace then send through another http adapter. i went with remove namespace can you tell me the steps How do i do this in my second composite i have
            Jms consumer--------------> Assign i/p to o/p variables ---------> invoke partner2 -------------> http adapter

            Please tell me the steps of your method. remove namespace.?
            • 3. Re: Issue with Remove Namespace HTTP POST method

              Create xsl style sheet file (xml) from you jdeveloper. Path to go File->New. go to all technogloy tab and select All Items catagory and select XSL style sheet.

              Remove content in the generated xml file and copy and paste the below code

              <?xml version='1.0' encoding='UTF-8'?>
              <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xsl ns1">
              <xsl:template match="comment()|processing-instruction()|/">
              <xsl:template match="*">
              <xsl:element name="{local-name()}">
              <xsl:apply-templates select="@*|node()"/>
              <xsl:template match="@*">
              <xsl:when test="name() != 'xmlns'">
              <xsl:attribute name="{local-name()}">
              <xsl:value-of select="."/>

              In Your bpel process under assign activity give it as below

              ora:getContentAsString( ora:processXSLT( 'xsl/removeNamespaces.xsl', bpws:getVariableData('variable name','rootelement')))
              <to variable="String"/>

              String variable contains your xml message with out namespaces in string format.

              You can pass this string content to your partnerlink 2.