This discussion is archived
0 Replies Latest reply: Mar 3, 2010 11:01 PM by 843830 RSS

Namespace problem in BPEL copy operation

843830 Newbie
Currently Being Moderated
I'm a bit confused about the assign/copy operations in the BPEL standard. The problem concerns namespaces in my XML (which I am trying to assign), more particularly: the resulting XML after the assign/copy operation contains namespaces defined in the 2 WSDL-files which define the contract of the in-out of the assign. I tried 3 assign scenarios:
1) Copy from variable part to variable part:
<copy>
            <from variable="SoapMetaDataInReceive" part="milieuverslag"/>
            <to variable="XsltVmmMetaDataInvokeOut" part="milieuverslag"/>
         </copy>
2) Copy sub-tag to sub-tag:
<copy>
            <from>$SoapMetaDataInReceive.milieuverslag/IdentificatieMetaData</from>
            <to>$XsltVmmMetaDataInvokeOut.milieuverslag/IdentificatieMetaData</to>
         </copy>
3) Copy leaf-node to leaf-node: (which works but is not workable, see below)
<copy>
            <from>$SoapMetaDataInReceive.milieuverslag/MilieuVerslagMetaData/Actief</from>
            <to>$XsltVmmMetaDataInvokeOut.milieuverslag/MilieuVerslagMetaData/Actief</to>
         </copy>
The resulting XML of the 3 scenarios is as follows:
1) The first scenario infects the sub-tags MilieuVerslagMetaData, IdentificatieMetaData and AangiftenMetaData with 2 namespaces from the wsdl files:
<Milieuverslag xmlns="http://archivering.milieuverslag.schemas.milieuinfo.be" xmlns:n1="http://archivering.milieuverslag.schemas.milieuinfo.be" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <IdentificatieMetaData xmlns:arc="http://archivering.milieuverslag.schemas.milieuinfo.be" xmlns:msgns="http://esb.milieuinfo.be/wsdl/MetaDataBroker/SoapMetaDataIn" xmlns:ns0="http://esb.milieuinfo.be/wsdl/MetaDataXslt/XsltOvamMetaDataInOut">
    <RapporteringsJaar>2017</RapporteringsJaar> ...
2) The second scenario results in the same xml as the first scenario
3) The third scenario results in the desirable xml without the extra namespaces:
<Milieuverslag xmlns="http://archivering.milieuverslag.schemas.milieuinfo.be" xmlns:n1="http://archivering.milieuverslag.schemas.milieuinfo.be" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <IdentificatieMetaData>
    <RapporteringsJaar>2017</RapporteringsJaar>
    ...
  </IdentificatieMetaData>
<MilieuVerslagMetaData> ...
This last scenario is not workable since I don't want to map the 3 kazillion leaf nodes from the output-side to the input-side.

The namespace-problem probably has something to do with the XSD-import statements that are to be found in the XSD of the Milieuverslag type (which is imported in the 2 WSDL-files): the tags MilieuVerslagMetaData, IdentificatieMetaData and AangiftenMetaData are imported, not included.

My question is if someone has any idea to which documentation I should be looking (the BPEL 2.0 standard is not clear on this topic, nothing of the sort is explained in the BPEL-section of OpenESB)? Or if someone could explain why I get this behaviour, would be even nicer!

TIA