on 07-10-2008 8:40 AM
hello
I recieve XML file (not devided to elements, but XML file)'
and I would like to map it to a RFC that has various object.
I there a way to do it?
if it involve a java code, does any one has a written code example?
THX
Kfir
Hi Kfir,
<<<<not devided to elements, but XML file>>>
<<<RFC that has various object>>>>
Can you please elaborate your question? Also if possible can you provide the source structure?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for the reply
my source XML response will be looking something like this (it will be reponsed in a long string):
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<SOAP-ENV:Header>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<status>
<retCode>00</retCode>
<retCodeDesc>OK</retCodeDesc>
<rRobjectId>09002347802d2981</rRobjectId>
<rFileSize>7</rFileSize>
<rTotalPages>1</rTotalPages>
</status>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
my RFC is:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:sap-com:document:sap:rfc:functions" targetNamespace="urn:sap-com:document:sap:rfc:functions">
<xsd:element name="ZRFC_SET_DOCUMENT.Response">
<xsd:complexType>
<xsd:all>
<xsd:element name="RETCODE" type="xsd:string" minOccurs="0" />
<xsd:element name="RETCODEDESC" type="xsd:string" minOccurs="0" />
<xsd:element name="RFILESIZE" type="xsd:string" minOccurs="0" />
<xsd:element name="RROJECTID" type="xsd:string" minOccurs="0" />
<xsd:element name="RTOTALPAGES" type="xsd:string" minOccurs="0" />
</xsd:all>
</xsd:complexType>
</xsd:element>
</xsd:schema>
I have a WSDL (forgot to mention that the scenario is sync RFC2WS).
in the request I am mapping each object, but in the response I have a long string, which is an XML file, and I would like to map specefic attributes from the string to a specific parameter in the RFC.
if that what you meant, I will appreciate if you have an example or more details to know how to do it.
Thanks
Kfir
Hi Kfir !
I think that you need to define a Message Type like this:
Name of the Message Type : status
( very important: remember to let the field XML Namespace blank - this field is below of the field when you set the data type used to define the message type)
Structure:
<status>
<retCode>
<retCodeDesc>
<rRobjectId>
<rFileSize>
<rTotalPages>
So, you can use it in the Output Message field of the Message Interface Inbound Syncronous that is being used to call the WebService.
Doing that, you can use this Message Type in the Message Mapping that will map the return of the WS to the return of the RFC.
Did you understand how to do what I explained ?
You said that the response of the WS will be in a string, but the string(according to your example XML), is a XML content, so, if you design a message type adequate to the XML content in the string, this string will be recognized inside XI like a XML message and you will get to map it.
Thank you for your attention,
Wilson
Edited by: Wilson Santos on Jul 14, 2008 4:58 PM
User | Count |
---|---|
86 | |
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.