• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

GET instead of POST?

 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I've posted this question on Java Developer Connection's Forums, but no responses yet. Was wondering if anyone here could help me out?

I am running through the examples in the "Java Web Services in a NutShell" book.

I am using jwsdp-1.4 and tomcat-jwsdp-1.4.

I was trying the EchoService example, which sends an empty SOAP message to a servlet deployed in Tomcat. This servlet should then simply echo the message back to the sender.

However, when I attempt to run the example, I get the following error:

[java] Headers:
[java] Content-Type: text/xml; charset=utf-8
[java] Content-Length: 132
[java] SOAPAction: ""

[java] Message:
[java] <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body/></SOAP-ENV:Envelope>
[java] Using connection class com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection
[java] Sep 29, 2004 10:22:45 AM com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection post
[java] SEVERE: SAAJ0008: Bad Response; HTTP method GET is not supported by this URL
[java] com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (405HTTP method GET is not supported by this URL
[java] com.sun.xml.messaging.saaj.SOAPExceptionImpl: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (405HTTP method GET is not supported by this URL
[java] at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:285)
[java] at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:151)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:121)
[java] at ora.jwsnut.chapter3.client.EmptyMessageClient.main(EmptyMessageClient.java:41)
[java] java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (405HTTP method GET is not supported by this URL
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:121)
[java] at ora.jwsnut.chapter3.client.EmptyMessageClient.main(EmptyMessageClient.java:41)
[java] Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (405HTTP method GET is not supported by this URL
[java] at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:285)
[java] at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:151)
[java] ... 3 more

The error message seems to suggest that the HttpSOAPConnection class is getting confused between POST and GET modes. Or is there something I need to configure in my client code? Has anyone else seen / worked around this?

Thanks, Neil
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic