Skip to Content
0

xsi type= "dynamic object"

Mar 07, 2017 at 09:19 AM

96

avatar image

Hi all,

I have a integration Proxy-->PO-->SOAP. We are using a standard XSD imported as an external definition to comunicate with the third party with several operations (below)

The message structure which must be send to third party is:

Out operation "ConfigurationBatch" is (below)

I need to add the attribute "xsi:type" to a specific tag "ConfigurationUpdate"

The schema relies on the “xsi:type” feature available in XML Schema Instance namespace (http://www.w3.org/2001/XMLSchema-instance). Xsi:type is a re-define or extension mechanism. It operates based on information in the XML instance. So the actual re-define isn’t in the schema, but it is created at run-time.

is it posible create a xslt for example to do this?

Thanks

Regards

operations.jpg (73.6 kB)
xsidynamic.jpg (121.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Iñaki Vila Mar 08, 2017 at 01:12 PM
0

Hi Monica,

You can try to rename the nodes with XSLT in a way less static that did, but with XSLT you can do it without a great effort

http://stackoverflow.com/questions/7246666/how-do-i-rename-xml-tags-using-xslt

Regards.

Share
10 |10000 characters needed characters left characters exceeded
Iñaki Vila Mar 07, 2017 at 01:13 PM
0

Hi Monica,

I had the same problem (in PI 7.0), but my XSD was simpler than yours and i decided to do a XSL mapping before the first mapping and to add manually in the XSL mapping the tags and retrieve the value with an easy xsl:value-of select.

May be someone had a better way to do it.

Regards.

Share
10 |10000 characters needed characters left characters exceeded
Monica Gonzalez Mar 08, 2017 at 11:45 AM
0

Hi Iñaki,

the main problem is the dymanic structure, for this reason I have created a custom .xsd because I need offer something to SAP side (Proxy).

Now when the message mapping finished we need replace the tag name with the name with xsi: type: so:

Now we have the tag: <ConfigurationUpdateAccount>

And the receiver is wating: <ConfigurationUpdate xsi:type="Account">

Also I can have n ocurrences of tag <ConfigurationUpdateAccount>

Could I do this with a .xslt method?

Thanks

Regards

Share
10 |10000 characters needed characters left characters exceeded
Monica Gonzalez Mar 09, 2017 at 11:35 AM
0

Hi Iñaki,

thanks for your link It was very useful, after we have some problems with prefix with namespace, etc but these were resolved.

Thanks and regards

Share
10 |10000 characters needed characters left characters exceeded