• 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
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

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

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 645
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic