File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes How come there's no exceptions when use JAX-WS? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How come there Watch "How come there New topic
Author

How come there's no exceptions when use JAX-WS?

Ong Vua
Ranch Hand

Joined: Jan 24, 2008
Posts: 59
When I generated using JAX-RPC, it throws RemoteException. But when I generated using JAX-WS, I do not see it throw the RemoteException. So how do I catch exceptions using JAX-WS approach?

JAX-RPC

public crmondemand.ws.ecbs.customobject10.CustomObject10Execute_Output customObject10Execute(crmondemand.ws.ecbs.customobject10.CustomObject10Execute_Input CustomObject10Execute_Input) throws java.rmi.RemoteException;

JAX-WS

/**
*
* @param customObject10ExecuteInput
* @return
* returns crmondemand.ws.ecbs.customobject10._10._2004.CustomObject10ExecuteOutput
*/
@WebMethod(operationName = "CustomObject10Execute", action = "document/urn:crmondemand/ws/ecbs/customobject10/10/2004:CustomObject10Execute")
@WebResult(name = "CustomObject10Execute_Output", targetNamespace = "urn:crmondemand/ws/ecbs/customobject10/10/2004", partName = "CustomObject10Execute_Output")
public CustomObject10ExecuteOutput customObject10Execute(
@WebParam(name = "CustomObject10Execute_Input", targetNamespace = "urn:crmondemand/ws/ecbs/customobject10/10/2004", partName = "CustomObject10Execute_Input")
CustomObject10ExecuteInput customObject10ExecuteInput);
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
WebServiceException is the base exception class for runtime exceptions thrown when using JAX-WS.
For details, please refer to the JAX-WS specification document.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
 
 
subject: How come there's no exceptions when use JAX-WS?
 
Similar Threads
JAX-WS wsgen using Maven2
How to generate a correct WSDL for a service with overloaded methods ?
javax.xml.ws.AsyncHandler is an interface, and JAXB can't handle interfaces
can we generate java classes using wsdl2java cxf command to specific targetNamespace
JAX-RPC vs JAX-WS