• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error (405) Method not available

 
dale con
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 );
call.setOperationName("getTemp");
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
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would certainly use TCPMON or a similar utility to find out the actual contents of the request as a first step.
Bill
 
dale con
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

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
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

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
http://www.xmethods.net/sd/2001/TemperatureService.wsdl

Thanks for any help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic