on 07-31-2012 8:18 AM
Hi Experts,
There is requirement where input data taken as a "xml string" needs to be parsed in PI and the generated parameters are to be mapped to the parameters of RFC.
At the input side of mapping we have a single parameter containing xml string that is coming from SOAP sender and at the outboud side we want the parsed i.e. separated fields that can be passed in the RFC import parameters, so that the Purchase order can be generated in SAP.
Technically : Wants it to be a SOAP to RFC scenario
Attached is the xml data that is being passed as a string in the webservice by the client.(SOAP Sender)
Please suugest solution of the problem .
Thanks.
You basically need to do parsing the xml string using java mapping. If you are looking for a standard example for coding please look at this example. Here the xml string is declared inside the method but in your case read the inputstream and parse the desired tag elements from this.
http://www.java2s.com/Code/Java/XML/ParseanXMLstringUsingDOMandaStringReader.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anshul,
If you are receiving entire input as a string this can be also parsed and converted to target XML. You need a java mapping to this. Please check my response to this thread where I converted a string coming within XML tags into an output XML, The same technique you need to apply for entire string. Specially note the code for lines 32-37. Hope this solves your problem.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anshul,
I would tackle this with a Java mapping (parsing or CDATA parsing on XI). There should be some examples of this here on SCN.
Regards, Trevor
<Edit: Or you can just follow the other user's advice - this PI forum is a mine field for user's with a slow internet connection )
Message was edited by: Trevor Naidoo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anshul,
I think the best and easy way is the Greg way, because you can do a normal scenario.
I have seen that you have three or four different namespaces, and it's difficult to build an xsd with all the namespaces. You can delete all the namespace with an xsl or with anonimyzer module and construct and easy XSD with a free tool like http://www.freeformatter.com/xsd-generator.html
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 believe you have some strong reasons to receive all the input in one string field, instead of building the sender structure in PI normally? If you do, the best way would be to parse the xml string in a Java mapping and use it to produce the output structure. But if not, I would recommend developing the scenario as usually, which means changing your sender structure.
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.