X

Geertjan's Blog

  • August 9, 2005

Troubleshooting Web Services in NetBeans IDE 4.1

Geertjan Wielenga
Product Manager
This morning, when I got to work, I thought I'd start the day by generating a nice inspiring quotation. To do this, I wanted to use the very simple client I mentioned here (which I created without doing any coding) to get a quotation from a Quotation service (http://www.seshakiran.com/QuoteService/QuotesService.asmx). However, this is what I got instead:

I thought to myself, "Don't panic", and tried interacting with another web service, this time the Spellchecker service (which is discussed in the same blog entry as the Quotation service above). Again I got the above error. To bring in people googling the above error message here are the first few lines in print:

InvocationTargetException
org.netbeans.modules.websvc.registry.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:449)
org.netbeans.modules.websvc.registry.ui.TestWebServiceMethodDlg.invokeMethod(TestWebServiceMethodDlg.java:442)
org.netbeans.modules.websvc.registry.ui.TestWebServiceMethodDlg.access$500(TestWebServiceMethodDlg.java:64)

If you type callMethodWithParams in Google, you'll get this result. The solution? Well, as with most problems in the web service area -- check your proxy settings. There are, in fact, three areas in NetBeans IDE where proxy settings relate to web services:

  • Deployment-level. This is mentioned here, but in greater detail in Gregg Sporar's blog entry About that proxy server...

  • WSDL Lookup-level. When first you create a web service client, you specify a WSDL file on which the web service client is based. If things go wrong here, right at the start of everything, as also mentioned in Gregg's blog, click Proxy Settings in the wizard itself and then set your proxy (click to enlarge):

  • IDE-level. Finally, and this is where I solved my particular problem, for NetBeans IDE to access the Internet, the proxy setting in Tools > Setup Wizard must be set correctly. So, I fixed my proxy setting here and all was well with the world (click to enlarge):

So, next time you get the kind of error messages indicated above, check your proxy settings, because that's where you should look to solve this problem. And guess what the first quotation was that the Quotation service sent me? Believe it or not, here it is:

Hmmm. Interesting.

Join the discussion

Comments ( 5 )
  • Alexis MP Tuesday, August 9, 2005
    I've found NetTool or Simile (http://simile.mit.edu/httptracer/) to be very helpful.


    -Alexis
  • Geertjan Tuesday, August 9, 2005
    Wow. Very cool. I'll look into these soon -- with an Ant script they can be integrated into the IDE and then invoked from there... that's a cool idea for a future blog entry. Thanks Alexis. I didn't know you were into web services -- good to know.
  • Alexis MP Wednesday, August 10, 2005
    Ok, so here's an idea for yet another blog entry: make one of the two a NetBeans module ;-)
  • Geertjan Thursday, August 11, 2005
    Good idea. I don't know how to do that yet, but hope to find out.
  • Emil S Tuesday, January 10, 2006
    This is a nice blog Geertjan for Netbeans. Although, how does one set an HTTP proxy server username/password for the Deployement case 1, in your blog?
    I am behind a firewall, and require my deployement sun java app server to communicate to a weeb-service located beyone the firewall. I'm not sure how to set up the basic http proxy server authentication.
    -Dhttp.ProxyHost gives my proxy address
    -Dhttp.ProxyPort give the port number
    How does one add user and password authentication for the proxy?
    Thanks,
    Emil S.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.