cancel
Showing results for 
Search instead for 
Did you mean: 

pass soap exception response to proxy

former_member361003
Participant
0 Kudos

Hi There,

I have a synchronous PROXYXIWS. Proxy is consuming the WS using SOAP. When proxy makes a request, how could I pass SOAP exception back to proxy.

When I tested with SOAPUI, the soap exception has some meaningful message however when called from proxy, it just says unknown application error.

thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Hi,in the definition of your Enterprice Services, you have to assign a Fault Message Type for Both services, create a maping for them and assign the mapping in the Opertarion Mapping.

So when a Exception is triggered the proxy will be notified.

I found those blogs

i hope them helps you

/people/jin.shin/blog/2007/05/21/handling-web-service-soap-fault-responses-in-sap-netweaver-xi

/people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1

Thanks

Former Member
0 Kudos

Hi Bijay,

You can use fault messages to capture. Please take a look at this blogs for some information:

/people/jin.shin/blog/2007/05/21/handling-web-service-soap-fault-responses-in-sap-netweaver-xi

/people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1

Regards,

---Satish

former_member361003
Participant
0 Kudos

Thanks Satish. I have gone through both of the blogs.

Following is the soap fault response while testing the service via soapui.

Based on the below fault response payload received while testing the service, how could I create a fault message type XML schema (xsd) definition externally?.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Body>

<soapenv:Fault>

<faultcode xmlns:ns1="InputValidationException">ns1:INVALID_PACKAGE_ID</faultcode>

<faultstring>Invalid package id</faultstring>

<detail>

<ns2:pack_id xmlns:ns2="http://response.one.com/v2">0401942100000048</ns2:pack_id>

<ns3:prog_id xmlns:ns3="http://response.one.com/v2">04019421</ns3:prog_id>

<ns4:trans_id xmlns:ns4="http://response.one.com/v2">233238987897987098</ns4:trans_id>

<ns5:prom_id xmlns:ns5="http://response.one.com/v2">0</ns5:prom_id>

<ns6:request_type xmlns:ns6="http://response.one.com/v2">UPDATE_REG</ns6:request_type>

</detail>

</soapenv:Fault>

</soapenv:Body>

</soapenv:Envelope>

Former Member
0 Kudos

Hi Bijay,

You can create two fields faultcode and faultstring for now for a start as a fault message or schema and then you can change things accordingly.

Dont forget any changes you made in your message interface then you need to reactivate the proxy once again.

Regards,

---Satish

former_member361003
Participant
0 Kudos

Thanks Satish. Could you be specific? Just like this blog says /people/jin.shin/blog/2007/05/21/handling-web-service-soap-fault-responses-in-sap-netweaver-xi to create fault message "electric-detail" from soap fault response payload, how could I generate similar fault message definition XSD from my soap fault response payload?

regards,

Former Member
0 Kudos

Hi Bijay,

If you see the blog jin have created an xsd with three fields class, message and trace and imported in IR and using it. You can also do the same bijay (see under this line: elow is a shot of the fault message mapping that maps the Currency Exchange Service fault payload ("electric-detail") to the RFC exception.). The message type for rfc is z_currency_exchange_1.Exception. Hope this make sense to you.

Regards,

---Satish

former_member361003
Participant
0 Kudos

Thanks. But I am having hard time to generate XSD schema definition for soap fault for inbound interface based on my soap fault response above. I understand the fault message for outbound interface and mapping. Is there any tool to generate XSD definition for fault message from Soap fault response?

Appreciated. Thanks.

former_member361003
Participant
0 Kudos

Any inputs?

former_member361003
Participant
0 Kudos

Let me rephrase my question. I have proxy--xi-soap synchronous scenario. Proxy is consuming the web service. WSDL provided by third party does not have fault exception schema defined in it. In this case, how could I create fault schema for my inbound interface? I have gone through many blogs in SDN and all are discussing about mapping, which is no use for me.

Please help.

thanks.

former_member361003
Participant
0 Kudos

Looks like no one wants to answer this question.

former_member361003
Participant
0 Kudos

I am still not able to solve this issue. How do I get create my inbound fault message so that I could capture soap fault.

Any genuine help is highly appreciated.

Former Member
0 Kudos

Bijay,

Please go through my reply in this forum post ... this might help solve your issue.

Regards,

Neetesh