• Post Reply Bookmark Topic Watch Topic
  • New Topic

"rpc.ServiceException"  RSS feed

Subhadip Chatterjee
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,
I have got a problem. I am trying to write one webservice client program, and first few lines of code goes like this:
ServiceFactory serviceFactory = ServiceFactory.newInstance();
javax.xml.rpc.Service service = serviceFactory.createService(new QName("", "PAM_BrowseAccessorByLanID"));

Call call = (Call) service.createCall();
call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY, "");
call.setProperty(Call.OPERATION_STYLE_PROPERTY, "wrapped");
call.setOperationName(new QName("", "PAM770N"));
...and so on
The thing, while running, it's throwing <<javax.xml.rpc.ServiceException at javax.xml.rpc.ServiceFactory.newInstance>>.I have no idea why it's coming at all. My classpath has "jaxrpc.jar", does the program needs any other JAR as well?
William Brogden
Author and all-around good cowpoke
Posts: 13078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You really should have included more information, such as the toolkit you are using - I'm assuming some version of the JWSDP.

Here is what the doc for JWSDP 2.0 have to say:
The javax.xml.rpc.ServiceFactory is an abstract class that provides a factory for the creation of instances of the type javax.xml.rpc.Service. This abstract class follows the abstract static factory design pattern. This enables a J2SE based client to create a Service instance in a portable manner without using the constructor of the Service implementation class.

The ServiceFactory implementation class is set using the system property SERVICEFACTORY_PROPERTY.

I think alot of this changed on going to JWSDP 2.0 so maybe there is a version conflict.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!