SOAP URL of apparently valid service fails with 405 error

Oxygen general issues.
dkarr
Posts: 1
Joined: Sat Apr 15, 2006 2:25 am

SOAP URL of apparently valid service fails with 405 error

Post by dkarr »

I have a servlet that listens for SOAP messages. It's running on my laptop. I can test it locally. I then entered that URL into the "SOAP URL" field in the SOAP Analyzer, and clicked Open. It worked for a fraction of a second, and then popped up the following error dialog:

"405 Method Not Allowed for: http://localhost:7001/HTTPListenerWAMU/listener"

Again, I can test that URL with tools I've built, and it works fine.

I also tried a similar test with XMLSpy and Stylus Studio, and it also works fine.

By the way, when it presents that dialog, it never turns off the hourglass cursor on the "WSDL File Opener" dialog, even though it's not doing anything anymore.
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Post by Radu »

Hi, David

I just answered your email.
I will update this post as soon as we pinpoint the problem and have a solution.

Regards,
Radu.
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Post by Radu »

Hello David,

We investigated the problem further, installed BEA and created a test servlet.
When analyzing a WSDL file from an URL (in your case the servlet URL) the http client does a "GET" in order to receive the file from the servlet. Using the "GET" method to receive a file is the right thing to do (I tested other applications and all of them complain that the method is not supported by the servlet).
The "POST" method is usually used by the user to post parameters and then to receive an answer so that's way using it when requesting an URL's content is a peculiar idea.
What you can do in your servlet is that from the doGet method to call the doPost one like:

Code: Select all

protected void doGet(HttpServletRequest arg0, HttpServletResponse res) throws ServletException, IOException {
doPost(arg0, res);
}
or another way is to have the implementation done on the "service" method which does not care whether it has called by GET or POST.

In this way you'll have the same implementation for both methods.
I filed a bug to consider handling the "Method not allowed" error when doing a "GET" and trying to do a POST with the same URL.
I'll update also the post on the forum with this.

Hope this helps,
Regards, Radu.
Post Reply