Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web Service *Client*

 
Mark Wuest
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am attempting to deploy a Web Service client to Weblogic 9.1.

When attempting to invoke the client, I get

This happens when instanciating the TerraService class, which extends java.ws.Service and calls

I'm at an impasse - able to invoke the client from a standalone Java program, but not from the server. I've bundled the jaxws jars in my war file (and also tried them in the server's classpath just for grins). Same runtime error.

Does this ring any bells with anyone?

Thanks,

Mark
 
Mark Wuest
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The issue I'm running up against is a jaxws version issue. Weblogic has its own version of the WS client code and the WSDL we're trying to use requires the latest version to be able to parse. Even so, the current codehaus WS stuff won't parse it, so I have to parse it with wsimport. Even *then*, I have to hand edit the stubs to create the standalone client.

That means that there are features/properties of jaxws in the stubs created by wsimport that are not supported by Weblogic. Because of the WSDL, portable stubs are out. I've got a headache and a dent in the wall from banging my head against it and I'm begging for fresh ideas before I end up with a concussion...

Mark
 
SabrinaL
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark,
I had the exact same problem and I was able to fix it by applying the solution described here, with some minor modifications: http://docs.codehaus.org/display/XFIRE/XFire+on+WebLogic+9.2

I do not use XFire; I was simply trying to get a simple Metro/JAX-WS client to run from one of my applications deployed to WLS 9.2. After adding the following lines to my weblogic-application.xml file, it worked. I should also mention that I deployed the required web service JARs as shared J2EE libraries, although I don't see why this wouldn't work if you packaged them within the EAR itself.

<prefer-application-packages>
<package-name>javax.jws.*</package-name>
<package-name>javax.xml.bind.*</package-name>
<package-name>javax.xml.crypto.*</package-name>
<package-name>javax.xml.registry.*</package-name>
<package-name>javax.xml.rpc.*</package-name>
<package-name>javax.xml.soap.*</package-name>
<package-name>javax.xml.stream.*</package-name>
<package-name>javax.xml.ws.*</package-name>
</prefer-application-packages>

The exact packages which need to be added may vary based on service implementation. Additionally, based on the solution write-up it sounds like this feature was just introduced in WLS 9.2 so you may need to upgrade to that version. Hope this helps!
Regards,
Sabrina
 
Gaurav Ch
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am also running into the same scenario, even after making those necessary chnages in my weblogic-application.xml i am not able to consume my webservice.
I am getting the same exception
i am using spring 2.5 , cxf 2.1.10 and weblogic 10.0.1.0



Please help as i am getting frustrated day by day in resolving this issue

Thanks,
Gaurav
 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4511
271
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Gaurav Ch", please check your private messages regarding an important administrative matter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic