• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Dynamic Proxy client runtime error - Cannot find the web service method?

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'am new to the webservices world and have wriiten a simple dynamic proxy client to invoke a webservice method. Please see the code below:
String nameSpaceUri = "http://webservices.base.dwl.com";
String serviceName = "WsDWLServiceControllerAdapterService";
String portName = "WsDWLServiceControllerAdapter";
String paramText1 = "<![CDATA["+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"<!DOCTYPE TCRMService SYSTEM \"myTCRM.dtd \">"+"<TCRMService>"+

String paramText2 = "tcrm";
String paramText3 = "standard";
String paramText4 = "TCRMService";
String paramText5 = "standard";
String paramText6 = "TCRMService";
String paramText7 = "All";

// Specify the location of the WSDL file
URL wsdlUrl = new URL("http://l01oh055841z2kx.cardinalhealth.net:9084/wsa/services/WsDWLServiceControllerAdapter/wsdl/WsDWLServiceControllerAdapter.wsdl");

// Create an instance of service factory
ServiceFactory serviceFactory = ServiceFactory.newInstance();

// Create a service object to act as a factory for proxies.
Service wccService = serviceFactory.createService(wsdlUrl, new QName(nameSpaceUri, serviceName));

// Create a proxy
DynamicProxy.WsDWLServiceControllerAdapter myProxy = (DynamicProxy.WsDWLServiceControllerAdapter)wccService.getPort(new QName(nameSpaceUri, portName), DynamicProxy.WsDWLServiceControllerAdapter.class);

// Invoke the process method
System.out.println(myProxy.process(paramText1, paramText2, paramText3, paramText4, paramText5, paramText6, paramText7));
catch (Exception ex)

I get the following runtime error:

port: {http://webservices.base.dwl.com}WsDWLServiceControllerAdapter does not co
ntain operation: process
at com.sun.xml.rpc.client.dii.ConfiguredCall.configureCall(ConfiguredCal
at com.sun.xml.rpc.client.dii.ConfiguredCall.configureCall(ConfiguredCal
at com.sun.xml.rpc.client.dii.ConfiguredCall.setMethodName(ConfiguredCal
at com.sun.xml.rpc.client.dii.DynamicProxyBuilder.buildDynamicProxyFor(D
at com.sun.xml.rpc.client.dii.ConfiguredService.getPort(ConfiguredServic
at DynamicProxy.WCCClient.main(WCCClient.java:54)

I have created the client classes using the wscompile tool and also verified using javap on the generated class to see if the methid process() actually exists. But haven't yet got a breakthrough.

I'am hoping someone here can throw some ideas or give me some leads to proceed. I'am really STUCK here!!

Thanks Much!
    Bookmark Topic Watch Topic
  • New Topic