• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
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:
try
{
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>"+
<RequestControl>"+"<requestID>1</requestID>"+"<DWLControl>"+"<requesterName>Jeff.Hill</requesterName>"+"<requesterLanguage>100</requesterLanguage>"+
"</DWLControl>"+"</RequestControl>"+"<TCRMTx>"+"<TCRMTxType>getEnterprisePartyView</TCRMTxType>"+"<TCRMTxObject>IdentificationInquiryBObj</TCRMTxObject>"+
"<TCRMObject>"+"<TCRMExtension>"+"<IdentificationInquiryBObj>"+"<InquiryLevel>1</InquiryLevel>"+"<TCRMPartyIdentificationBObj>"+"<IdentificationType>1001100</IdentificationType>"+
"<IdentificationNumber>1000000000</IdentificationNumber>"+"</TCRMPartyIdentificationBObj>"+"</IdentificationInquiryBObj>"+"</TCRMExtension>"+"</TCRMObject>"+
"</TCRMTx>"+"</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)
{
ex.printStackTrace();
}

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
l.java:98)
at com.sun.xml.rpc.client.dii.ConfiguredCall.configureCall(ConfiguredCal
l.java:69)
at com.sun.xml.rpc.client.dii.ConfiguredCall.setMethodName(ConfiguredCal
l.java:50)
at com.sun.xml.rpc.client.dii.DynamicProxyBuilder.buildDynamicProxyFor(D
ynamicProxyBuilder.java:66)
at com.sun.xml.rpc.client.dii.ConfiguredService.getPort(ConfiguredServic
e.java:250)
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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic