on 10-23-2007 9:47 AM
Dear Experts,
I'm facing the following issue, using the plain HTTP receiver adapter:
when I'm sending out my XML message, the "usual" ns1: namespace prefixes are added to the message.
It goes out like this:
<?xml version="1.0" encoding="UTF-8"?>
<ns1:INQUIRY xmlns:ns1="urn:namespace.com:retail">
<SESSION_ID>0000157338</SESSION_ID>
<POSITION>
<item>
...
</ns1:INQUIRY>
And it should be like this:
<?xml version="1.0" encoding="UTF-8"?>
<INQUIRY xmlns:ns1="urn:namespace.com:retail">
<SESSION_ID>0000157338</SESSION_ID>
<POSITION>
<item>
...
</INQUIRY>
In previous forum-threads, there are several proposed solutions:
1. using the XMLAnonymizerBean
It doesn't work here, because in plain HTTP I cannot call up any module processor (it doesn't go through the AE)
2. using XSLT to remove the complete namespace
It is not good, because I have to keep the namesapce, but without the ns1 prefixes
So, the question to you is: how to delete only(!) the ns1 prefixes, keeping the original namespace in the message.
Any comments are welcome!
Best regards,
Andras Kovacs
Dear Stefan,
thank you for the helpful response!
Some thougths about the proposed solutions:
- Create external wsdl/xsd without prefix: I tried thois point with Sytlus-Studio, but here I can only delete/remove the whole namespace. If I leave the namespace in the message, the prefix will be added again as well.
- Java mapping: the general question here, how to remove something from the payload? Should we use string manipulation (like Alessandro mentions it in his blog: /people/alessandro.guarneri/blog/2006/10/13/get-rid-of-recordset-node ) or should we use here SAX ? Is there any "standard" solution for this?
- Use SOAP adapter instead of plain HTTP: it worked quite well and I could remove the prefix with the XMLAnonymizer Bean!
Here you mentioned that it can called up in "no SOAP mode". Do you mean here check in the "don't use SOAP envelope" checkbox or is it something more?
Thank you in advance for the useful responses!
Best regards,
Andras
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<i>Should we use string manipulation or should we use here SAX ?</i>
DOM parsing would be sufficient enough.
<i>Is there any "standard" solution for this?</i>
No as far as i know.
<i>
"no SOAP mode". Do you mean here check in the "don't use SOAP envelope" checkbox or is it something more?</i>
Yes u have to check this checkbox. Also u have to include "nosoap=true" in the URL.See this under Conversion Parameters
http://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/frameset.htm
Regards,
Prateek
> - Use SOAP adapter instead of plain HTTP: it worked
> quite well and I could remove the prefix with the
> XMLAnonymizer Bean!
> Here you mentioned that it can called up in "no SOAP
> mode". Do you mean here check in the "don't use SOAP
> envelope" checkbox or is it something more?
Yes, that is right. I was not aware how this check box is called.
Regards
Stefan
- You can use the SOAP adapter in so called "no SOAP mode" than you can use the XMLAnonymizerBean.
- You can create the wsdl with an external tool (like XMLSpy) and upload the WSDL as external definition, so you can create a message type without namespace prefix.
- You can use XSLT or Java mapping to strip the prefix.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.