cancel
Showing results for 
Search instead for 
Did you mean: 

xsi type= "dynamic object"

former_member217283
Participant

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

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

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.

Answers (3)

Answers (3)

former_member217283
Participant
0 Kudos

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

former_member198060
Participant
0 Kudos

Hello Monica,

Could you let me know how you resolved this? I am facing the same issue. So far my XSLT is totally static, but even like that it is not working because it complains that the xsi:type namespace is not bound. In fact I have declared it via XSLT as well, adding the following to the root element:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

Unfortunately I am still getting the namespace not bound error.

Could you share your solution to this problem?

If anybody else has experience with xsd:type any help would be appreciated as well of course.

PS: Did you also make your XLST dynamic in such a way that you only have one xsl template for all your elements?

former_member217283
Participant
0 Kudos

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

iaki_vila
Active Contributor
0 Kudos

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.