2

I'm having a problem deploying a Glassfish web application which calls a web service periodically. Basically the issue seems to be that the call to the javax.xml.ws.Service never seems to return. There are no exceptions thrown.

The code looks as follows (object / variable names changed):

  MyService ss = new MyService(wsdlURL, SERVICE_NAME);

where wsdlURL is a URL object for a local WSDL file (have also tried with a remotely hosted WSDL), and SERVICE_NAME is the string with the web service name.

The actual constructor for the MyService object simply invokes super on javax.xml.ws.Service

public class MyService extends Service {
    public MyService(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }
}

On my development machine this works exactly as expected, but in deployment the call to the MyService constructor never returns.

I am attempting to deploy this on a Glassfish v3.1 server running on a Red Hat Enterprise Linux Server release 5.6 (Tikanga).

Java version is 1.6 on both development and deployment environments.

Does anybody have any ideas about what could be happening here? The lack of any exceptions makes this very difficult to debug. I imagine that this could potentially be a WSDL problem as if I understand it correctly, javax.xml.ws.Service does some interpretation during the call to the constructor, which I suppose could be causing something to hang. However, it seems very odd that it would work fine on my development machine, but not on the deployment server.

Any help is much appreciated!

HalliHax
  • 816
  • 2
  • 11
  • 26

2 Answers2

0

I had a similar experience and it was because the given URL was not valid.

pavithraCS
  • 709
  • 6
  • 23
0

The problem might be because of proxy that is being used on deployment machine. I had faced the same problem and later figured out that it is due to the proxy settings.

Try setting proxy before creating the Stub class, i.e

 System.setProperty("http.proxyHost", "xxx.x.xx.xx");
 System.setProperty("http.proxyPort", "8080");
 MyService ss = new MyService(wsdlURL, SERVICE_NAME);
Manisha
  • 157
  • 1
  • 4
  • Thanks for that. I decided to re-write the application to run as a standalone Java application which runs alongside the server rather than under it. For some reason, separating the code allowed the web service stuff to work with no problems whatsoever, so it seems like it was some kind of Glassfish related problem. – HalliHax Jul 21 '11 at 08:33