learn java
The moose likes Web Services and the fly likes error (405) Method not available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "error (405) Method not available" Watch "error (405) Method not available" New topic

error (405) Method not available

dale con
Ranch Hand

Joined: Apr 15, 2005
Posts: 93
Hi all

I'm trying to do a simple test

I have a java file (test.java) in my ide and in it the code below to call an external web service, but when debugging, it gets to the call.invoke i get the error (405) Method not allowed

Am I missing soemthing?

Thanks for any help

My code

String endpoint = "http://www.xmethods.net/sd/2001/TemperatureService.wsdl";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( endpoint );
Object [] arguments = new Object[1];
arguments[0] = "90210";
String result = (String) call.invoke(arguments);
System.out.println(result );
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12913
I would certainly use TCPMON or a similar utility to find out the actual contents of the request as a first step.
dale con
Ranch Hand

Joined: Apr 15, 2005
Posts: 93
How do i set TCPMon up to see the actvity?

Normally, when testing my own web services i telll it to listen to port number x, but this is a external web service so i'm not sure how to set it up
dale con
Ranch Hand

Joined: Apr 15, 2005
Posts: 93

I've changed the codes endpoint to this

String endpoint = "http://services.xmethods.net:80/soap/servlet/rpcrouter";

But now i get the error

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

which i don't understand

Are you able to help?

Many thanks
Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
I use http://www.pocketsoap.com/tcptrace/ , for me its more handy than AxisTCPMonitor. easy to configure and watch the req/res sent to remote host.
dale con
Ranch Hand

Joined: Apr 15, 2005
Posts: 93

i can't seem to get the pocket soap to work.

if i'm accessing a remote web service whose endpoint is http://services.xmethods.net:80/soap/servlet/rpcrouter

What do i put in the Destination server on pocketsoap?

Will it be www.xmethods.net or will it be the wsdl file

Thanks for any help
I agree. Here's the link: http://aspose.com/file-tools
subject: error (405) Method not available