aspose file tools*
The moose likes BEA/Weblogic and the fly likes Web Service *Client* Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Web Service *Client*" Watch "Web Service *Client*" New topic
Author

Web Service *Client*

Mark Wuest
Ranch Hand

Joined: Jun 07, 2003
Posts: 88
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

Joined: Jun 07, 2003
Posts: 88
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

Joined: Feb 19, 2008
Posts: 1
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

Joined: Jun 24, 2010
Posts: 1
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
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3273
    
  52

"Gaurav Ch", please check your private messages regarding an important administrative matter.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web Service *Client*