ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to handle soap fault in message set and WSDL?

Post new topic  Reply to topic
 How to handle soap fault in message set and WSDL? « View previous topic :: View next topic » 
Author Message
jamesyu
PostPosted: Wed Mar 14, 2007 11:46 am    Post subject: How to handle soap fault in message set and WSDL? Reply with quote

Acolyte

Joined: 31 Jan 2007
Posts: 70

Hi All,

1. In my message set, I've created 3 messages: request, response and error.
2. In my message category file, the request message is set with Role Type of "wsdl:input" and Role Usage of "soap:body". The response message is set with Role Type of "wsdl:output" and Role Usage of "soap:body". The error message is set with Role Type of "wsdl:fault" and Role Usage of "soap:fault"
3. Generated WSDL with soap over JMS with two-way operation
4. Imported WSDL to RAD, and a Web service client was generated successfully in RAD
5. Sent a valid request message via the Web service client in RAD, and a response message was retrieved from the flow successfully.

Here is how I handle invalid request messages in my flow. If the last name can't be found from the request message, I create an error message and send back to the caller instead of a positive response message. Notice that the "error" message has its own message structure which is different than the normal response message.

The thing is, such a reply message with error information can't be taken by the Web service client in RAD at all with the following Java exception occurred:

"org.xml.sax.SAXException: WSWS3047E: Error: Cannot deserialize element id of bean com.thc.broker.webservice.Lab_info."

Notice that, the element "id" is the first element defined in my error message structure. The "Lab_info" message is my actual request message.

In my case, I treated the error message exactly like a normal response message, just with different message structure and content.

Does that imply I can't have a separate message created to handle the errors in the message set?

how is the soap:fault/wsdl:fault being handled in the message category and WSDL in broker?

Thanks,
James
Back to top
View user's profile Send private message
jamesyu
PostPosted: Thu Mar 15, 2007 4:46 pm    Post subject: Reply with quote

Acolyte

Joined: 31 Jan 2007
Posts: 70

Looks like I can't have my own "error message" defined acting as a SOAP Fault since this won't be recognized by Web service client at all. Only the standard SOAP Fault message can be taken by Web service client generated in RAD. Below is a sample SOAP Fault message built in my flow that works fine with client:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode xmlns:ns1="http://webservice.broker.ibm.com/messaging">ns1:A01</faultcode>
<faultstring>a parameter missing</faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to handle soap fault in message set and WSDL?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.