Java Technologies for Web Services - applets & webservices

Hi

I've written an applet which includes a web service client and uses several simple methods from the web service. The applet works well as a stand-alone application. However when I embed it in a jsp page of a web application it stops working. The web methods seem to be the only problem for all works well without them.

Is there any simple way to fix that?

Thanks for your time.

[406 byte] By [cama_m42a] at [2007-11-26 23:12:10]
# 1

Hi,

I've got the same problem and have found that the applet cannot find the libraries needed to communicate with the webservice (JAX-WS).

Seems that the libraries needed are on your computer so it works as a standalone app, but the JRE cannot find them when its embedded in a webpage. If you fix this let me know.

Cheers

daverushtona at 2007-7-10 14:09:45 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

Well I solved it partially...

One of my problems was that applet works as untrusted application in a browser so it hasn't got permission to access the web service on a different host. The solution is to sign the applet and is quite decently described here: http://www-personal.umich.edu/~lsiden/tutorials/signed-applet/signed-applet.html

So now I don't get permission errors in java console any more.

What I get is:

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(XmlUtil.java:208)

at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:125)

at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:52)

at javax.xml.ws.Service.<init>(Service.java:57)

at org.me.card.client.CardWSService.<init>(CardWSService.java:40)

at org.me.hello.MyJApplet.init(MyJApplet.java:136)

at sun.applet.AppletPanel.run(AppletPanel.java:417)

at java.lang.Thread.run(Thread.java:619)

Any idea what that could mean?

cama_m42a at 2007-7-10 14:09:45 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

Java can't find the CatalogManager class. I think you need to include the .jar file that contains this class with your applet...although I'm not sure which jar file that is ;-)

Once you've found it, put it in the same directory as the applet on your webserver and reference it within your html page using the archive tag(I think). Hope this helps

daverushtona at 2007-7-10 14:09:45 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
I had the same error - now solved thankyou,Java is now looking for META-INF/services/javax.xml.ws.spi.Provider on the server, which should contain the name of the provider. I'm not sure what to put in this file. Any ideas?
Ian4a at 2007-7-10 14:09:45 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...