*
The moose likes Web Services and the fly likes Getting a 500 HTTP status returned from my web service with no errors in log Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Getting a 500 HTTP status returned from my web service with no errors in log" Watch "Getting a 500 HTTP status returned from my web service with no errors in log" New topic
Author

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

Rob Micah
Ranch Hand

Joined: Aug 30, 2011
Posts: 94
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

Joined: Feb 10, 2001
Posts: 613
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


All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Rob Micah
Ranch Hand

Joined: Aug 30, 2011
Posts: 94
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Getting a 500 HTTP status returned from my web service with no errors in log
 
Similar Threads
Getting Session on web service client
packages and CLASSPATH
Error in First Hibernate Example
Step by steyp JNDI look up with jboss 7.1
Table Viewer GUI from a Database