QName
is simply a holder for qualified names (local name plus namespace
URI).
I
don't know anything about gSoap and have never used it, but a quick glance of
their sample source for the magic server, leads me to believe that the namespace
URI that they're using for the "magic" method is "urn:MagicSquare" , not
"http://soapinterop.org" which you were trying to use
below.
Try:
call.setOperationName(new QName("urn:MagicSquare", "magic"));
-----Original
Message-----
From: Joe Johannsen [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 10:37 AM
To: [EMAIL PROTECTED]
Subject: REPOST - RE: calling gSoap server from Axis client - "method not implemented" error
From: Joe Johannsen [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 10:37 AM
To: [EMAIL PROTECTED]
Subject: REPOST - RE: calling gSoap server from Axis client - "method not implemented" error
Didn't get any suggestions on this so thought I'd ping one more time. Does gSoap work well with Axis? What are some debugging tips for me? Where can I read about QName()?
Thanks,
Joe
At 01:10 PM 2/19/2003 -0800, Joe Johannsen wrote:
What I meant is I'm calling a web service called magic on my test server. The method name is magic ... this is one of the gSoap examples; here's the gSoap sample client C++ code snippet:Your email description says you're calling a "server" named magic, but in the code you set the service operation name (eg, RPC method name) to "magic". Are you sure that operation shouldn't be something like:
const char magicserver[] = "http://192.168.0.2:2222/";
.
.
.
matrix *A = soap_new_matrix(&soap, -1);
r = rand()%20;
if (soap_call_ns1__magic(&soap, magicserver, NULL, r, A))....
I could understand if I got an error about the parameters, as I think I need to be accepting a return value that's a matrix, not a string. But the error "method not implemented" seems to indicate it's not finding it at all. Could it be that the method signature is different because I have the i/o params wrong?
-Joe
At 03:47 PM 2/19/2003 -0500, Mike Burati wrote:
call.setOperationName(new QName("http://soapinterop.org/", "echoString"));
- -----Original Message-----
- From: Joe Johannsen [mailto:[EMAIL PROTECTED]]
- Sent: Wednesday, February 19, 2003 3:37 PM
- To: [EMAIL PROTECTED]
- Subject: calling gSoap server from Axis client - "method not implemented" error
- I've looked thru archives and see quite a few questions about compatibility with gSoap and not too many answers to the questions. I am using Axis 1.1 RC 1 and gSoap 2.2.2, trying to call the example gSoap server named "magic" from vanilla java code (below). I have verified the server responds using a gSoap client, but cannot get my Axis client to work with it. The error I get back is "Method 'ns1:magic' not implemented".
- Questions:
- 1. How compatible are Axis and gSoap?
- 2. why doesn't it work? How can I look more deeply at this problem?
- 3. As a newbie to Axis I could also use tips on where I can read something in detail on QName() - I don't have an understanding of what that is doing or why http://soapinterop.org is referenced there.
- Thanks,
- Joe
- -----------------------------------------------------------
- TestClient.java:
- -----------------------------------------------------------
- import org.apache.axis.client.Call;
- import org.apache.axis.client.Service;
- import javax.xml.namespace.QName;
- public class TestClient {
- public static void main(String [] args) {
- try {
- String endpoint =
- "http://192.168.0.2:2222";
- Service service = new Service();
- Call call = (Call) service.createCall();
- call.setTargetEndpointAddress( new java.net.URL(endpoint) );
- call.setOperationName(new QName("http://soapinterop.org/", "magic"));
- String ret = (String) call.invoke( new Object[] { "4" } );
- System.out.println("Sent '4', got '" + ret + "'");
- } catch (Exception e) {
- System.err.println(e.toString());
- }
- }
- }
