Hi,
I'm a new user to Axis, just downloaded it and playing around with it (Axis
RC1)

I was under the impression that when you invoke an Axis webservice, you
need to specify the correct namespace for the Service and/or operation
name.
But it seems to be working even if you provide the incorrect namespace.

For eg, my deployed StockQuoteDemo webservice has the following
targetnamespace, as per the WSDL:

targetnamespace
="http://localhost/axistest/services/urn:xmltoday-delayed-quotes";

I'm using the following code to invoke the webservice:

System.setProperty(javax.xml.rpc.ServiceFactory.SERVICEFACTORY_PROPERTY,
                        "org.apache.axis.client.ServiceFactory");

String invalidNamespace = "blah blah";

javax.xml.rpc.Service service = ServiceFactory.newInstance
().createService(new QName(invalidNamespace , "StockQuoteServiceService"));
javax.xml.rpc.Call call = service.createCall();
call.setOperationName(new QName(invalidNamespace , "test"));
call.setTargetEndpointAddress
("http://localhost:9090/axistest/services/urn:xmltoday-delayed-quotes";);
String returnValue = (String)call.invoke(null);

It works fine when I was expecting it to complain. So is the actual Object
to be invoked located simply via a unique URL (the targetendpoint) instead
of the namespace?

Thanks,
Junaid


Reply via email to