on 07-07-2006 3:07 PM
Hi there,
I have a R/3 -> XI -> WebService scenario where the message from XI to webservice needs to be sent in document/wrapped mode (the message xml must be embedded in a string element) and this message needs to be digitally signed.
We are using another webservice to sign the messages, also with the message being sent in a string. To transform the XML's into string and vice-versa, we are using XSLT (/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping).
The problem is that both the signer and the final webservice understand the special characters (like '<', '>', '&', '"' etc) in one way but the XSLT generates them in another way. For example, the character '<', in both webservices, is returned as "<" but the XSL Transformation results in "<".
The problem now is that our messages are always being rejected because the signature is not being recognized as true, though we are almost 100% sure that it's being done correctly. The only possibility to the error that we found is this character mapping being done differently.
So, it's like this:
XI sends string to signer as "<"
XI receives string from signer as "<"
XI processes the message
XI sends string to webservice as "<"
XI receives string from webservice (containing error message) as "<"
Is there a way of making the XSLT to return "<" instead of "<"?
Thanks in advace,
Henrique.
Problem solved.
Best regards,
Henrique.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think, you can go for Java functions in XSLT to achieve this. This error occurs, while parsing of xml documents happens. In java function, you can explicitly check for these special charcaters and replace with as required.
This type of problem is solved with Java mapping very easily. Because while starting of the xml document, we can check for the special chars, and we can replace.But in XSLT you can try.
Just my views~
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For Java Mapping, you can refer this-
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
In Java Mapping, in the startdocument event , you need to check for the specialchars, and just repalce the value required.
But, what i am thinking is , just try with Java functions inside the XSLT mapping instead of going for Java Mapping. You can call java functions from the XSLT. So before the document starts pasring, you need to replace the special characters. I did not try in XSLT like this.
For this , you can think with this e.g
/people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
Regards,
Moorthy
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.