File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Dynamic Proxy client runtime error - Cannot find the web service method? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Dynamic Proxy client runtime error - Cannot find the web service method?" Watch "Dynamic Proxy client runtime error - Cannot find the web service method?" New topic
Author

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

deepa manjunath
Greenhorn

Joined: Jan 25, 2010
Posts: 1
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic Proxy client runtime error - Cannot find the web service method?
 
Similar Threads
problem with webservice dynamic proxyclient
Dynamic Proxy
Compilation of a Dynamic Proxy Client
Dynamic Proxy Client
use of urn in soap service?