on 05-14-2013 10:39 AM
Hi,
I am receiving Dynamic data in response.
i.e every time i am receiving soap response from target. It is different.
So i cannot make my response Data Types based on any Structure.
How to handle such thing.
Regards
PS
Hi,
most easy with xslt. You can address field independent from path with double slash //
<target_field1><xsl:value-of select="//source_field1" /></target_field1>
So you dont need a exact source structure. A dummy (one field) is enough.
/Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could do the following:
1. Create a message type with one single string field.
2. Pass the XML payload as part of a CDATA tag from the backend system to PI.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<Envelope>
<Header>
</Header>
<Body><stringField><![CDATA[<name1>abc</name1><address>xyz</address>]]></stringField>
</Body>
</Envelope>
3. Extract the content of the CDATA tag on PI with an XSLT-Mapping
This allows to pass any kind of data which is transformed to the target structure of the CDATA content.
BR
Harald
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is are target, which adapter do you use, how should the target structure look like, could you just send the response without any mapping?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SOAP to SOAP Axis
SOAP Sender <-> SAP PI <-> Successfactor ( SOAP AXIS ADAPTER )
Resonse I am receiving from Successfactor is Not fixed.
eg of responses .
Response 1
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<queryResponse>
<sfobject>
<id>USR-3</id>
<type>User</type>
<name>Alex</name>
<salary>56000</salary>
</sfobject>
</queryResponse>
</S:Body>
</S:Envelope>
Response No 2:
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<queryResponse>
<sfobject>
<id>USR-3</id>
<type>User</type>
<PhotoUploaded>Y</PhotoUploaded>
<Status>A</Status>
<Resident>Y</Resident>
</sfobject>
</queryResponse>
</S:Body>
</S:Envelope>
So response from Successfactor is dynamic , It besically depends on Sender Request Query. What ever i will demand in request Select Query . In response Successfactor will return the Structure. So u see it is dynamic in nature . Bcz Select Query can change every time in request.
Hi Prabhat,
You can create a dummy data type with one field for your response strucure and use Java mapping to pass the input payload to the output payload. You no need to worry regarding your dummy data type because your entire xml payload will come as input stream to the java mapping and you can pass the same to your output stream.
Let me know if you need the java mapping.
Regards,
Stephen Rouvier
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<queryResponse xmlns="urn:sfobject.sfapi.successfactors.com" xmlns:ns2="urn:fault.sfapi.successfactors.com">
<result>
<sfobject>
<id>USR-3</id>
<type>User</type>
<name>Alex</name>
<salary>56000</salary>
</sfobject>
<sfobject>
<id>USR-4</id>
<type>User</type>
<name>Jacob</name>
<salary>98000</salary>
</sfobject>
<numResults>200</numResults>
<hasMore>true</hasMore>
<querySessionId>123085f7-540d-4b17-b6ec-9174986e02e1</querySessionId>
/result>
</queryResponse>
</S:Body>
</S:Envelope>
Above is my Response . I need to pass exectly Same to Target System.
So now my question is : What should be XLST for same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prabhat,
May i know why you are going for XSLT mapping?
Because, If you want to pass the same XML to Target you can map the same to the corresponding fields at the receiver side.to do this simple message mapping is enough.
if you want to use XSLT mapping
go through the below link
Hi krishna ,
My Structure is not fixed.
I can have any stucture of data from the system ( dynamically data).
So i cannot create a Data type.
above i have given a sample xml . My reqt is what ever comes from source i need to pass it as it is to target system .
Actual Scenario :-
and this all is happeneing in Response. - Synchronous scenario
Source <- > Request / Response <-> Target
Means I am receiving a response from target system which is dynamic in nature can be anything so i just need it to pass this response data as it is to Sender system.
Hi Prabhat,
My reqt is what ever comes from source i need to pass it as it is to target system .
as per my knowledge,we should create request and response data structures and do the mapping.
if you Dont create the response data type, how the system knows that to which fields, the data should reach at the target side..you have to define the mapping for response as well.
You will get the response message till pi, but in pi it will fail, since it Dont have the corresponding data structure.you can check the same in PI pipeline steps.
suppose if you want to send a file as it is to the target system, that, we can do without defining ESR.
you should ask third party system folks to give the data structure.
Correct me if im wrong..
Regards
Bhargava krishna
Hi,
I think you need to agree with the Third party guys on the what kind of responses you can expect unless and until response mapping will fail.If you want to pass the dynamic data in response to ECC i guess definitely it will fail for synchronous scenarios in generall we need to have proper request and response strucutures.
Regards
Praveen Reddy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prabhat,
you can use DOM parser (java mapping) to extract the data elements in the response XML structure.DOM can reach any specific element without reading the entire XML structure. It would be better if you could post the XML you are receiving and the data element you need to extract at the target side.
Regards
Anupam
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 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.