on 01-25-2010 4:00 PM
Hi,
we have an interface running via PI with some provider.
We send an HTTP request to the provider and an XML file returns. However this file contains no reference to any namespace and the parsing from the XML to the corresponding ABAP structure does not work.
Is there any possibility of preprocessing so we can add this necessary namespace before the parsing starts?
Thanks a lot.
Kris
When you have defined the interface in ESR, so you can remove the XML namespace in the message type, regenerate the ABAP proxy (if you use one) and then the parsing should work.
Maybe you write something more about the scenario.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The scenario in brief:
We send an HTTP-request to out provider. This works well.
In return we get an xml file back. We do not have any detailed description of this file (no xsd). I generated an xsd-file from the returned output an imported this in the repository as an external definition.
This is a sample of the returned xml file:
<?xml version="1.0"?>
<DOWNLOAD_REPLY>
<TRANSMISSION LEVEL="Order" DESCRIP="- Order date -">
<GROUP1 ACTION="">
<GROUP2 DATEORDER="1/2010">
<PAYMENT ID="6169845" REF="40000000504A13"></PAYMENT>
<PAYMENT ID="6179207" REF="400000005025EB"></PAYMENT>
</GROUP2>
</GROUP1>
</TRANSMISSION>
</DOWNLOAD_REPLY>
That is as far as we get.
We use a proxy to retrieve our data: based on the external definition, we make an interface and then the proxy.
Apparently SAP has a problem parsing this xml into the abap structures.
We think the problem could be caused by the absence of an namespace in the xml, and we would like to add that to the message, before the parsing begins. This could possibly be done in a mapping u2013 or by regenerating the proxy after removing the namespace. But I donu2019t see the how-to of these two options.
Any advice, please.
Kris
The parsing problem does not seem to occur in XI, because in the monitor I see no errors.
When I test the proxy in transaction SPROXY I only get the 'Original Response' tab and not the definite 'Response'.
I can do some mapping, but I just think there is a namespace missing in the response xml. I can add that in a mapping apparently, but I do not know how.
Can anyone get me some coding-instructions - a concrete example e.g.?
Thanks a lot.
Kris
In ESR/ Integration repository
Edit the message type (corresponding to the interface)
Look for the field XML namespace (under data type used)
Remove the value in that field
save and activate.
in application system. regenerate the proxy for the interface.
save and activate.
btw: You can create a test message in sproxy for that inbound proxy, so you can compare the structure.
Hi,
This can be achieved using simple java mapping where the necessary namespace can be added.
Regards,
Swetha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kris,
try XMLAnonymizerBean. See doc in SAP Help.
kr,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
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.