Hi,
I was just trying to execute the TestClient.java program for a web service which is created using C++ on gsoap framework.
When I am executing the TestClient, getting the below error:
% java TestClient
Method 'ns1:shareLegacyData' not implemented: method name or namespace not recognized
Here are the files I am using:
----------
public class TestClient
{
public static void main(String [] args)
{
try
{
//String endpoint = "http://ws.apache.org:5049/axis/services/echo";
String endpoint = "http://berdoo.openmarket.com:8901/HelloWorld.cgi";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
//call.setOperationName(new
QName("http://soapinterop.org/",
"echoString"));
call.setOperationName(new QName("http://soapinterop.org/","shareLegacyData"));
//String ret = (String) call.invoke( new Object[] { "Hello!" } );
String ret = (String) call.invoke( new Object[] { });
System.out.println("Sent 'Hello!', got '" + ret + "'");
} catch (Exception e) {
System.err.println(e.toString());
}
}
}
-------
C++ client is working fine. the method shareLegacyData() just returns "Hello World" into the
"resp" variable.
if (soap_call_ns1__shareLegacyData(&soap, NULL, NULL, resp) == SOAP_OK)
std::cout << "Server Says = " << resp << std::endl;
else // an error occurred
soap_print_fault(&soap, stderr); // display the SOAP fault message on the stderr stream
H
ere is
the web service implementation
int ns1__shareLegacyData(struct soap *soap, char *&resp)
{
SimpleLibrary simple; /* Library containing legacy functions */
resp = simple.sayHello();
return SOAP_OK;
}
I appreciate any pointers to fix this problem.
Thanks.
RK
Want a free 1 GB eMail account? Get your own SMXBOX!
