on 03-07-2017 9:19 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.