You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by rk...@smxbox.com on 2006/07/18 10:44:35 UTC

Axis Java Client for a gsoap C++ web service...

                  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(newQName("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

Here isthe 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