Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

From xml variable to string and viceversa

Piero MesticiSep 14 2018 — edited Feb 26 2020

Hi All,

I am using BPEL 12c.

I have converted bpel variable defined with complex type into a string using the following command ora:toCDATA($variableComplexBpel) ad I am able to assign it to a string variable $variableString.

The result of the transformation and assignment is (from EM console), looks like:

<tns:Message>&lt;![CDATA[<variableDelete xmlns="http://www.xxx.xxx.int/sales">

            <field1>MM0002</field1>

            <field2>DELETE</field2>

            <field3>MM</field3>

            <field4>123123123</field4>

         </variableDelete>]]&gt;

</tns:Message>

Now I need to do the viceversa, from the string, previously created convert it into the xml variable. That should look like:

[<variableDelete xmlns="http://www.xxx.xxx.int/sales">

            <field1>MM0002</field1>

            <field2>DELETE</field2>

            <field3>MM</field3>

            <field4>123123123</field4>

        </variableDelete>

In order to be used in the BPEL process.

I have tried doTranslateFrom/toNative but I get the following error:

Execution  XPath non execute The cause : impossible to build the schema 'http://xxxxxxxx/common' found in in 'common.xsd'.

What is strange is that the common.xsd is an import in the sales.xsd schema that I passed to the commands:

ora:doTranslateToNative($Variable1, 'Schemas/sales.xsd', 'variableDelete', 'STRING')

ora:doTranslateFromNative(string($Variable2stringa), 'Schemas/sales.xsd', 'variabileDelete', 'DOM').

Both schemas are valid as they are used in the bpel and are working.

Can someone lead me to achieve the needs?

regards

This post has been answered by Martien van den Akker on Sep 15 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 15 2018
Added on Sep 14 2018
4 comments
3,711 views