Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Standalone client not working for Weblogic JAX-WS Web Service (with message level security)

 
Andy Shende
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've developed a JAX-WS (2.2) Web Service using OEPE (Oracle Enterprise Pack for Eclipse) with local Weblogic Server 12.1.1 instance. I'm using Java 6 on windows environment. I've added message level security to it using following policy files that come with weblogic: Wssp1.2-2007-Wss1.1-X509-Basic256.xml, Wssp1.2-2007-SignBody.xml, Wssp1.2-2007-EncryptBody.xml. I also developed client using OEPE and configured it to send required security headers. I followed this documentation to develop web service, client and to configure security in both: http://docs.oracle.com/cd/E24329_01/web.1211/e24488/message.htm

If I deploy the client on weblogic server then it works fine, but I cannot run it as a standalone client. It also fails if I deploy it on Apache Tomcat 7. Looking at exception it looks that it requires few weblogic libraries. I've copied weblogic.jar and wseeclient.jar from $WL_HOME/server/lib directory, but still can't get it to work.
This is the exception I get on tomcat:



I've been trying to solve this issue from last two days without any luck and this is driving me crazy. I'm fairly new to weblogic as well as web services so not exactly sure how to do this. Can anyone tell me exactly which jars are needed to run it on tomcat or as a standalone application? Not sure if this should be in this or weblogic forum so posting it in both the forums.

Thanks,
AndyT
 
German Gonzalez-Morris
Ranch Hand
Posts: 268
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this is a WebLogic WebService issue, probably is better in WLS forum.

With that said, the error is very self-explicit: java.lang.ClassNotFoundException: weblogic.utils.NestedException

You need to client artifacts to work with it. Many times depending on the WLS version is hard to have all the necessary files.

First try with wseeclient.zip (unpacking all the libs), and if it doesn't work then try wlfullclient.jar

Regards,

Germán
 
Andy Shende
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, German. I will check if wseeclient.zip works or not. I don't see wlfullclient.jar anywhere in weblogic directory. Where can I get that?

Sorry, Bear, I will be careful next time


 
German Gonzalez-Morris
Ranch Hand
Posts: 268
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wlfullclient must be created:
http://docs.oracle.com/cd/E12840_01/wls/docs103/client/jarbuilder.html

Let us know, if it works either one.
 
Andy Shende
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created wlfullclient.jar and included in my project but now there are compilation errors as it cannot find these two imports,



As the name suggests these have been added for the security purpose.

Thanks,
AndyT
 
German Gonzalez-Morris
Ranch Hand
Posts: 268
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, unfortunately that's common.

I cannot remember the exact jar files to have in the classpath, but for instance:

Found weblogic/wsee/security/bst/ClientBSTCredentialProvider.class
in C:\oracle\wls1036\wlserver_10.3\server\lib\wseeclient.zip\wseeclient.jar

Unfortunately for WLS WS message level security is not easy to get the correct jar files.

I suggest to trial & error exercise; pity.
 
Andy Shende
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I actually added the wsee classes from weblogic.jar found in $WLS_HOME/server/lib but still get following error when I execute it in tomcat,

wlfullclient.jar actually has this class file at weblogic\wsee\security\util\CertUtils.class

Can you tell me what could be the issue this time?

Thanks,
AndyT

 
Andy Shende
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
German Gonzalez-Morris wrote:Yes, unfortunately that's common.

I cannot remember the exact jar files to have in the classpath, but for instance:

Found weblogic/wsee/security/bst/ClientBSTCredentialProvider.class
in C:\oracle\wls1036\wlserver_10.3\server\lib\wseeclient.zip\wseeclient.jar

Unfortunately for WLS WS message level security is not easy to get the correct jar files.

I suggest to trial & error exercise; pity.


Hi German,

Finally I copied all the weblogic libraries files from $WL_HOME/server/lib and $MW_HOME/modules directories and now client is throwing different exception:


When I checked WebService logs to see if it is correctly configured or not I found following error in Weblogic Server logs:


You can see it is not able to find Keystore file. I have checked that keystore file is accessible and present at specified location.

I've configured WebLogic Server for web service security using documentation (http://docs.oracle.com/cd/E24329_01/apirefs.1211/e24401/core/index.html).
I followed these steps:
  • Create a Web service security configuration ((http://docs.oracle.com/cd/E24329_01/apirefs.1211/e24401/taskhelp/webservices/webservicesecurity/CreateDefaultWSSConfig.html)
  • Use X.509 certificates to establish identity ((http://docs.oracle.com/cd/E24329_01/apirefs.1211/e24401/taskhelp/webservices/webservicesecurity/UseX509ForIdentity.html)
  • Specify the key pair used to sign SOAP messages ((http://docs.oracle.com/cd/E24329_01/apirefs.1211/e24401/taskhelp/webservices/webservicesecurity/CreateDigitalSignatureKeystore.html)
  • Specify the key pair used to encrypt SOAP messages ((http://docs.oracle.com/cd/E24329_01/apirefs.1211/e24401/taskhelp/webservices/webservicesecurity/CreateEncryptionKeystore.html)


  • Can you tell me why does weblogic not find the keystore file even though it is present on the server? This has already wasted few days, so if you can provide me any help that would be great.

    Thanks,
    AndyT
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!