Skip to main content

SOAP stack that can run inside an applet?

2 replies [Last post]
mmo18
Offline
Joined: 2008-07-20

Hi - I hope this is the right forum to ask this question. If not, please advise!

I am seeking a simple SOAP stack that can run as part of an applet.
The SOAP stacks I tried so far (Apache, Java 6's built-in SOAP stack) cause security exceptions when running as an applet, since they query System.getProperty(...) which is forbidden (or to be precise: limited to a few well-known prop's) when running as an applet.

Does someone have a pointer to a SOAP stack that is "well-behaved"? We don't need any fancy SOAP capabilities (security, encryption, quality-of-service, ...) - just the basic protocol handling and the XML -- POJO mapping.

Michael

PS.: Below are the two exception stack traces we are getting with the Java 6 SOAP stack during initialization. Does someone have an idea, what it is trying to do here? What is this "resolver" that it seems to be dealing with? Could one maybe configure it, to avoid whatever it is doing here? And any idea, why it is apparently missing the CatalogManager-class in the second case here? Is the Java 6 WS stack incomplete?

<br />
...<br />
*** Error creating/initializing soap provider "my.example.soap.SOAPJAXWS": java.lang.ExceptionInInitializerError<br />
java.lang.ExceptionInInitializerError<br />
	at com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown Source)<br />
	at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown Source)<br />
	at com.sun.xml.internal.ws.client.WSServiceDelegate.(Unknown Source)<br />
	at com.sun.xml.internal.ws.client.WSServiceDelegate.(Unknown Source)<br />
	at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown Source)<br />
	at javax.xml.ws.Service.(Unknown Source)<br />
...<br />
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission xml.catalog.ignoreMissing read)<br />
	at java.security.AccessControlContext.checkPermission(Unknown Source)<br />
	at java.security.AccessController.checkPermission(Unknown Source)<br />
	at java.lang.SecurityManager.checkPermission(Unknown Source)<br />
	at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)<br />
	at java.lang.System.getProperty(Unknown Source)<br />
	at com.sun.org.apache.xml.internal.resolver.CatalogManager.(Unknown Source)<br />
	at com.sun.org.apache.xml.internal.resolver.CatalogManager.(Unknown Source)<br />
	... 9 more<br />
...<br />

and

<br />
...<br />
*** Error starting data provider: java.lang.NoClassDefFoundError: Could not initialize class com.sun.org.apache.xml.internal.resolver.CatalogManager<br />
java.lang.NoClassDefFoundError: Could not initialize class com.sun.org.apache.xml.internal.resolver.CatalogManager<br />
	at com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown Source)<br />
	at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown Source)<br />
	at com.sun.xml.internal.ws.client.WSServiceDelegate.(Unknown Source)<br />
	at com.sun.xml.internal.ws.client.WSServiceDelegate.(Unknown Source)<br />
	at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown Source)<br />
	at javax.xml.ws.Service.(Unknown Source)<br />
...<br />

Message was edited by: mmo18

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
intoccabile
Offline
Joined: 2006-01-18

having the exact same problem as you, any progress?

mmo18
Offline
Joined: 2008-07-20

Yes - I had progress. I had to learn that I need to sign ALL .jar files that the applet uses AND they all have to be signed with the same certificate (i.e. even though the library files I were using WERE already signed - but by an other signing authority - I needed to re-sign them with the same certificate that I use to sign the applet's main-jar). After that the applet now starts up fine and does not try to access any illegal system property nor does it try to locate any missing class thereby avoiding these exceptions.

I am not 100% positive whether that's a prereq or not: in the process of trying to get this running I also migrated to the very latest Java 6 JRE (i.e. for Sun JRE that's 1.6.0_17, for an IBM JRE that would be 1.6.0sr7).

With these both steps my applet is now working fine using SOAP to communicate with the server and it does so with both mentioned JREs.

HTH,
Michael

Message was edited by: mmo18