I have been struggling for a few days. I have an element in /UniversalInterchange/Body that is an ANYTYPE. I can change my XSD to have /UniversalInterchange/Body as a string if needed. However, I have an application that is embedding well formed XML string in the body of an Interchange envelope, and this XML string can have different root Elements. In the below the root element of the XML string is UniversalShipment, but there will be instances where it will be UniversalEvent, NativeOrganization, or others. This message is coming from my ERP system but the body of the Interchange needs to be extracted, and the root element of the body needs to be
verified, so I can run a mediator or and if statement in my bpel process and do different things depending on the root element of the well formed xml string embedded in the XML node /UniversalInterchange/Body.
I am struggling to use parseescapedxml, parsexml, assign activities, and xslt's correctly.
I have the schemas for all the different variations of the XML string coming from the Body, but I need to know which one to use, which is why I need to get the data first so I can pass the xml string to the proper xsd. Any suggestions?
<?xml version="1.0" encoding="utf-8"?><UniversalInterchange xmlns="http://www.ABC.com/Schemas/Universal/2011/11" version="1.1">
<Header>
<SenderID>ABC</SenderID>
<RecipientID>123</RecipientID>
</Header>
<Body>This is of Anytype in XSD. I can change it to string type if needed
<UniversalShipment xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Shipment>
.
.
.
</Shipment>
</UniversalShipment>
</Body>