Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting a 500 HTTP status returned from my web service with no errors in log

 
Rob Micah
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a simple web service running in Glassfish:



Here is a sample program I am using to call a public web service I found online to test with.


But when I change this program to use my web service I am getting a 500 status returned to me on the call to HttpURLConnection.getInputStream. No errors appear in the glassfish log on the server so I'm at a loss as to what I have done wrong here.
 
Praful Thakare
Ranch Hand
Posts: 642
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)
private static final String SOAP_URL = " http://www.deeptraining.com/webservices/weather.asmx";

here you are trying to connect to deeptraining.com...so obviously your server will not get the request, are you sure you want this?

2) I think you need some client to invoke webservice, since its combination of service (@Webservice) and method (@Webmethod) simply using url will not help as server needs to know which method is to be invoked.

check this thread for nice examples.

I deploy your webservice using cxf and invoked it with cxf client and there are no issues in getting output.

-P
 
Rob Micah
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Praful, thanks for the links. I have discovered my problem. In my SOAP envelope I left off a trailing "/" from the end of my service target namespace.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic