hi,

I have to implement a doc/lit-webservice (B2B) for our order-system. Our 
order-system is based on servlets, ejb-components 
and jboss4. On basis of this application-environment we decided to implement 
the webservice as an ejb service endpoint.


To learn more about jbossws I created a little test-order-application (doing: 
xsd -> wsdl -> wscompile -> sessionbean -> delpoy).
Everything works fine, but I have problems with the errorhandling of the 
webservice! How should I propagate errors 
(e.g. runtimeexceptions, businessruleexceptions) to the ws-client? 

Here are my tries:

1. Try: Encapsulate all errors in the response message.

Here's the code-fragment for the orderresponse:
...
  | <xsd:complexType name="OrderResponse">
  |             <xsd:choice>
  |             <xsd:sequence>
  |                     <xsd:element name="orderid" type="xsd:int"/>
  |             </xsd:sequence>
  |                     <xsd:element name="error" type="xsd:string"/>
  |             </xsd:choice>
  | </xsd:complexType>
  | ...

Problem: wscompile throws an error: xsd:choice not supported???


2. Try: define one custom exception for the webservice: e.g. ServiceException 
and send these errors in a fault-message

Problem: I never saw fault-elements in a commercial webservice-wsdl like from 
amazon (http://soap.amazon.com/schemas3/AmazonWebServices.wsdl)? How do such 
webservice propagate their exceptions (e.g. businessruleexceptions like "wrong 
bank account number format") to the user?

 
How should I implement errorhandling for all exceptions for my "doc/lit-EJB 
Service Endpoint"? 

thanx elm

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881057#3881057

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3881057


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to