Web Service Client works from IDE, not standalone

I'm using the Netbeans 5.5 IDE & JAX-WS 2.0 & jdk1.6.

I use an Applet to call a webservice on an embedded web-server which has gSoap generated WebServices.

The code works fine if I run it from the IDE. However, the following error occurs if I run it from the webserver:

java.lang.NoClassDefFoundError: Could not initialize class com.sun.org.apache.xml.internal.resolver.CatalogManager

at com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown Source)

at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)

at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown Source)

at javax.xml.ws.Service.<init>(Unknown Source)

at NetburnerWebfunctions.Webfunctions.<init>(Webfunctions.java:38)

at IO.getDIPs(IO.java:32)

at IO.<init>(IO.java:25)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at sun.applet.AppletPanel.createApplet(Unknown Source)

at sun.plugin.AppletViewer.createApplet(Unknown Source)

at sun.applet.AppletPanel.runLoader(Unknown Source)

at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

basic: Exception: java.lang.NoClassDefFoundError: Could not initialize class com.sun.org.apache.xml.internal.resolver.CatalogManager

I believe this class is being found since I got a different error when I had the classname wrong.

The console has reported:

network: Connecting http://192.168.0.2/META-INF/services/javax.xml.ws.spi.Provider with proxy=DIRECT

to which I serve up a file with the first line as:

NetburnerWebfunctions.WebfunctionsPortType

This class (autogenerated by Netbeans webservice import) contains:

@WebService(name ="WebfunctionsPortType", targetNamespace ="http://www.red-earth.co.uk/Webfunctions")

publicinterface WebfunctionsPortType{

...

@WebMethod(action ="http://www.red-earth.co.uk/Webfunctions/getDIPs")

@WebResult(name ="result", targetNamespace ="http://www.red-earth.co.uk/Webfunctions")

@RequestWrapper(localName ="getDIPs", targetNamespace ="http://www.red-earth.co.uk/Webfunctions", className ="NetburnerWebfunctions.GetDIPs")

@ResponseWrapper(localName ="getDIPsResponse", targetNamespace ="http://www.red-earth.co.uk/Webfunctions", className ="NetburnerWebfunctions.GetDIPsResponse")

publicint getDIPs();

...

}

In the applet the webfunction is called using the following code:

NetburnerWebfunctions.Webfunctions service =

new NetburnerWebfunctions.Webfunctions(new java.net.URL("http://192.168.0.2/webfunctions.wsdl.xml"),

new javax.xml.namespace.QName("http://www.red-earth.co.uk/Webfunctions","Webfunctions"));

NetburnerWebfunctions.WebfunctionsPortType port = service.getWebfunctions();

result = port.getDIPs();

The Applet is placed on the html page thus:

<APPLET code="IO.class" Archive="Applet.jar" width=350 height=200></APPLET>

Any Ideas why this error occurs - have I got the provider wrong?

[4196 byte] By [Ian4a] at [2007-11-27 2:31:35]
# 1
I had same error but then I signed my jar and it worked.Sign jar http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/development.html#security
toddjavaa at 2007-7-12 2:46:32 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Hi, I could run the client as an application but not as an Applet out side IDE.can u please help me with sample code if u r done with Applet.if u want i can give u my sample code.thanks in advance.
JAX-WSa at 2007-7-12 2:46:32 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...