Meaningless Drivel is fun!*
The moose likes JNLP and Web Start and the fly likes Web Start and Web Services Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Web Start and Web Services" Watch "Web Start and Web Services" New topic
Author

Web Start and Web Services

Steve Wood
Ranch Hand

Joined: Jan 08, 2003
Posts: 137
Hi,
I have a web start application which is also a web services client. For some reason, I cannot connect to the web service (I have included the Axis library in my jar). The code basically stops at the point it tries to make the actual connection to the service. I use the same code for my desktop application and everything works fine.
Does anyone know if there are restrictions on web start for allowing this? Are there any libraries I might need to add to my jar to get it to work?
Any help is greatly appreciated.
Cheers,
Steve
Steve Wood
Ranch Hand

Joined: Jan 08, 2003
Posts: 137
Hi,
Sorry, I think I've got some slightly more specific information. I think the problem may have to do with security permissions. I have the following JNLP:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://www.informavores.com/hosted/enterprise/start" href="Firefly.jnlp">
<information>
<title>Firefly Designer</title>
<vendor>Informavores</vendor>
<homepage href="index.jsp" />
<description>Powerful decision support systems for real people.</description>
</information>
<resources>
<j2se version="1.3+" />
<jar href="Firefly.jar" />
</resources>
<application-desc main-class="com.informavores.firefly.designer.DesignerMain" />
<security>
�� <all-permissions/>
</security>
</jnlp>
which works just fine, except that I am never prompted with a security warning stating that the application is requesting unrestricted access. Is there a problem with my JNLP? The jar is signed.
Any help is greatly appreciated. Thanks in advance.
Cheers,
Steve
Paul Cahoon
Greenhorn

Joined: Jun 24, 2003
Posts: 2
Steve,
Did you get this working by chance? I am trying to do the same thing now, and have the same issue. My JNLP file looks just like yours and my jar is signed also.
If I figure anything out, if you haven't yet I will let you know.
Paul
Steve Wood
Ranch Hand

Joined: Jan 08, 2003
Posts: 137
Hi Paul,
I eventually found the solution - should have posted it.
The problem I had was that there was a strange character in the text, which I only noticed when I was editing and had to press delete twice to get a character to delete.
If I were you, try re-typing your JNLP file in a simple text editor to make sure you don't have any unwanted extra (and hidden) characters.
It works fine now.
Cheers,
Steve
Alina Hila
Greenhorn

Joined: Aug 08, 2008
Posts: 5
Hello
I have the same problem with a client and a webservice using axis2.
Running the webservice and client in a regular way without java webstart, it works fine.
Running the client from jnlp, it can not connect to the webservice. Did you find another solution for this problem please?
My jar files are signed, just don't know the cause for why the client just can't connect with the webservice when using java webstart.
Thank you for your time
Alina Hila
Greenhorn

Joined: Aug 08, 2008
Posts: 5
hello again,
just found out the exception that causes the client not to connect with the webservice
it is : org.apache.axis2.AxisFault: Error during encryption
can anybody help?
thank you
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I wouldn't be surprised if the rest of the stack trace contained more useful information. Like the root cause of that error, for example. How about if you look at that and post it here if you need more help?
Alina Hila
Greenhorn

Joined: Aug 08, 2008
Posts: 5
Hello Paul
yes, i discovered that the base error looks like:
org.apache.ws.security.WSSecurityException: An unsupported signature or encryption algorithm was used (unsupported key transport encryption algorithm: No such algorithm: http://www.w3.org/2001/04/xmlenc#rsa-1_5)
that gave me a clue about what to search on the internet about.
what i found out was this link http://www.mail-archive.com/wss4j-dev@ws.apache.org/msg01973.html
but unfortunatelly did not solve the problem.
1)I must mention that i uninstalled all jre and jdk from my computer, and now i have only jdk 1.6.0_11
2)i edited the java.security file to register security.provider.10=org.bouncycastle.jce.provider.BouncyCastleProvider
3)replaced local_policy.jar and US_export_policy.jar in $JAVA_HOME\jre\lib\security with unlimited strength policy files from http://java.sun.com/javase/downloads/index.jsp#docs (At the end of the page).
4)and i included in my jnlp this line <jar href="lib/bcprov-jdk16-141.jar"/>
5)and of course downloaded the this jar from http://www.bouncycastle.org/latest_releases.html

the web start is succesfully downloading the application (i am testing it now on local machine) just that the error above still remains. And i am again in the "don't know what to do" phase :P

thank you
Alina Hila
Greenhorn

Joined: Aug 08, 2008
Posts: 5
Hello
ok, the above solution might work, i think in my case the problem is another one: an expired certificate
if that doesn't help, also i noticed some changes when i put bcprov-jdk16-141.jar in <java-home>/jre/lib/ext folder
i am using java 1.6 now, and i say some changes because the real problem in this case probably is the expried certificate, so i didn't get the change to run the client
have a good day
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Web Start and Web Services
 
Similar Threads
Looking up a webservice
Utilizing a java stored procedure for web services
Help Urgently Needed
doubt in web service composition
Calling C#.NET Web Service From Java Applet