on 05-08-2007 5:25 AM
Hi
Workflow of my scenario is -->
<b>SAP R/3 -- Sender RFC Adapter -- XI -- Rec. SOAP Adapter -- Web Service</b>
In case we are sending correct information to WebService, we are getting results back to SAP R/3. But in case of an Application Error in Web Service ( like wrong data value ), it is returning following payload as response -->
<i><?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Call Adapter
-->
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">vessptd01</ns1:hostname></i>
So I created the XSD file for this payload & map it with my <i><RFC>.Exception</i> structure, folliwing is my Exception message mapping text preview -->
<i>/ns1:Z_MAPINFO.Exception/Name=const([value=UNKNOWN ADDRESS]) /ns1:Z_MAPINFO.Exception/Text=/ns0:hostname= /ns1:Z_MAPINFO.Exception/Message=const([value=0]) /ns1:Z_MAPINFO.Exception/Message/ID=const([value=I]) /ns1:Z_MAPINFO.Exception/Message/Number=const([value=11]) /ns1:Z_MAPINFO.Exception/Attributes=const([value=1]) /ns1:Z_MAPINFO.Exception/Attributes/V1=/ns0:hostname=</i>
Now when I executed the scenario, I can see in SXMB_MONI ( with Application Error as status ) that following RFC XML is going to SAP R/3 server -->
<i><?xml version="1.0" encoding="UTF-8" ?>
- <ns1:Z_MAPINFO.Exception xmlns:ns1="urn:sap-com:document:sap:rfc:functions">
<Name>UNKNOWN ADDRESS</Name>
<Text>vessptd01</Text>
- <Message>
<ID>I</ID>
<Number>11</Number>
</Message>
- <Attributes>
<V1>vessptd01</V1>
</Attributes>
</ns1:Z_MAPINFO.Exception></i>
But still SAP R/3 is giving Short DUMP with the message as
<b>Message type " " is unknown.</b>
although ABAPers are trying to catch exception fields. Also one thing I noticed that when I imported the <RFC>.Exception structure in XI, I see field names like
"<i>Name, Text, Message, ID, Number, Attributes, V1, V2, V3, V4</i> ".
But in SAP R/3 RFC when ABAPers define Exception for RFC, they see following fields -->
<i>MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.</i>
Now I am not sure what is going wrong. Can you pls. suggest.
- Lalit -
Lalit,
I believe whatever the response you are getting from Webservice is working good. During mapping to RFC, you are getting an error, Try to check the structure of the RFC or just define the data type and pass it to RFC instead of importing the RFC.
It is totally related to Invalid structure only, or try to load the RFC import structure into XML spy and check whether it is valid one or not.
Regards,
B.Anandh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Scenario is working fine & ABAPers are actually handling the message & displaying a Info Box to the user saying " Invalid Address ".
- Lalit -
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Lalit,
Its complaing about the response message mapping. Check your response mapping. It is having some issues. I think if you resolve that then your scenario should work perfect.
Also you are saying that it is a wrong data, If it is yes that then how are you going to handle in production? I think you should not have wrong data in prodcution. So exclude that scenario if it is wrong data. Also check with few test cases. If it is same for the corect data then you should check your response mapping.
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Satish
Our scenario is actually getting the Latitude & Longitude of given location from Web-Service, so when the address details are correct. SAP R/3 is getting populated with correct response i.e Latitude & Longitude.
But in case when User is entering Wrong Address ( which does not exist ), we are getting following payload as response from Web-Service -->
<i><?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Call Adapter
-->
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">vessptd01</ns1:hostname></i>
In which it is just returning the Host Name of server in which it is installed.
I actually pasted the Text-Preview of my Exception Message Mapping also, do you see any error in that.
I have no issues with Request & response Message Mapping.
- lalit -
Hi Satish
I was using the Fault Message Type only.
I resolved the issue, actually when ABAPers create the exception in RFC they give some pre-defined values & those values come as part of the enumerated Data Type & you need to send those values exactly the way threy stored in RFC.
I was missing the undersocre (_) initially.
Thanks for all who answered.
- Lalit -
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
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.