Skip to main content

Exception handling JAX-WS 2.1.4 on Tomcat causes HTTP 500 on client

1 reply [Last post]
lostinspace2011
Offline
Joined: 2007-08-01

I have a service which throws a checked exception. However when I deploy this service on Tomcat (6.x) with JAX-WS 2.1.4 I get an HTTP 500 on the client side. When the same service is deployed using the JDK's Endpoint.publish the exception is handled correctly.

I had a look through the specification which has some suggestions on this issue and mentions the 500 error, however I have not been able to find a example which demonstrates how I can correct this behaviour.

The Service

@WebService
public class ServiceProvider
{
...
public synchronized Result fetch(...INPUT...) throws LicenseException
{
...

The Exception
@WebFault
public class LicenseException extends Exception
{
/** Creates a new instance of LicenseException */
public LicenseException(String message)
{
super(message);
}

public String getFaultInfo()
{
return getMessage();
}
}

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
lostinspace2011
Offline
Joined: 2007-08-01

This is the fault generated by Endpoint.publish:

HTTP/1.1 500 Internal Server Error
Content-length: 507
Content-type: text/xml; charset=utf-8





soapenv:Server
Unable to verify license
Unable to verify license


This is the fault received from Tomcat:

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Date: Thu, 19 Jun 2008 22:26:17 GMT
Connection: close





S:Server
Unable to verify license
Unable to verify license