axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaidev Nair <jaidevn...@gmail.com>
Subject Getting Server.BadTargetObjectURI exception when running the client
Date Thu, 03 Mar 2005 04:26:01 GMT
Hai all

Am new to webservices.
Am facing this problem for couple of hours am not beign able to rectify it.

Am trying to access one of the service from xmethods using AXIS.

My client code is like this :

import java.io.PrintStream;
import java.net.URL;
import javax.xml.rpc.ParameterMode;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.utils.Options;
import  org.apache.axis.providers.java.RPCProvider;
import org.xml.sax.XMLReader;

public class Temp
{

    public Temp()
    {
    }

    public static void main(String args[]) throws Exception
    {
        String endpoint =
"http://services.xmethods.net:80/soap/servlet/rpcrouter";
        String method = "getTemp";
		String zipcode = "67801";
		
		Service service = new Service();
		Call call = (Call)service.createCall();
		call.setUseSOAPAction(true);
		call.setTargetEndpointAddress(new URL(endpoint));
		call.setOperationName(method);
		
		call.addParameter("zipcode", XMLType.XSD_STRING, ParameterMode.IN);
		
		call.setReturnType(XMLType.XSD_FLOAT);

		

		Float resp = (Float)call.invoke(new Object[] {
			zipcode
		});

		System.out.println("Got result : " + resp.toString());
		return;
    }
}

THE ERROR WHAT I AM GETTING WHEN I RUN THIS CLIENT IS :

Exception in thread "main" AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.BadTargetObjectURI
 faultSubcode:
 faultString: Unable to determine object id from call: is the method
element namespaced?
 faultActor: /soap/servlet/rpcrouter
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace: AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.BadTargetObjectURI
 faultSubcode:
 faultString: Unable to determine object id from call: is the method
element namespaced?
 faultActor: /soap/servlet/rpcrouter
 faultNode:
 faultDetail:

Unable to determine object id from call: is the method element namespaced?

Can any on help me in this what is the problem with my client code.

Thanks,
JAIDEV.


-- 
Jaidev.Nair
Software Engineer
eDrugStore - Web Services 
Inspired By Inovation®
www.benchmarksoft.com

Ph : +91 44 24987589  Extn : 150

Cut me and ...  i will bleed Java !

Mime
View raw message