views:

52

answers:

2

Hello guys,

I've a web service, which is basically a @Stateless EJB annotated with @WebService, and other JAX-WS related annotations. I can deploy this bean on my machine's glassfish instance, and see its WSDL through Glassfish's administrative GUI. I can also call its methods without any problems, from a SE client.

When I deploy this web service to a server instance in any other machine, I can no longer browse its WSDL through glassfish, and the client fails to connect to the server. The message displayed is:

Invalid WSDL request: http://ip:port/context/serviceEndpoint?wsdl

The HTTP error returned by Glassfish on such request is 405 (method not allowed).

I browsed around, and couldn't get anything directly related to glassfish v3. There are issues open on Glassfish's bugzilla for version 2, meaning they're old and have been labelled as CLOSED/FIXED already.

Anyone ran into this before? Any help or any clues about what could be happening here?

Thanks in advance!

A: 

Did you take a look in Glassfish log ? Is very important to look there first.

Sacx
Yes, sorry I didn't mention it. It thorws a NullPointerException while generating the WSDL for the web service. The stack, however, does not give a hint on what could be wrong on the WSDL file. Besides, the error is not thrown when the WSDL is accessed from the same machine where the server is hosted.
javabeats
Digging further on the log (increased log verbosity a bit), there's this stack trace:[code]javax.xml.ws.WebServiceException: WSP1007: Policy exception occured when finishing WSDL parsing. at com.sun.xml.ws.policy.PolicyWSDLParserExtension.postFinished(...)[/code]
javabeats
A: 

For the sake of those who might come across this problem one day: I had OpenSSO on the target server. And by many obvious reasons, it was a classpath clashing problem that prevented the WSDL to be generated by glassfish.

Once OpenSSO has been removed of the equation, everything worked as it was supposed too. So, even if you're not an OpenSSO user, check your classpath for multiple Metro instances, or any other JAX related library that might be conflicting with glassfish's own on your domain.

javabeats