aspose file tools*
The moose likes Web Services and the fly likes Creating a web service client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Creating a web service client" Watch "Creating a web service client" New topic
Author

Creating a web service client

Shruti Sharma
Ranch Hand

Joined: Mar 25, 2010
Posts: 55
Hi,

I am creating a web service client using RAD tool. When I enter the WSDL url in the service definition I get an error saying:

"The service definition selected is invalid."

My WSDL URL is "https://surya9.dss.state.va.us/SPIDERWeb/services/SearchMainWService?wsdl".

Can someone tell why am I getting this error?

Thanks,
-Shruti
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Copy that URL and paste it into your browser's address bar. Press Enter. If you don't get a WSDL in return, that's why you are getting that error.
Shruti Sharma
Ranch Hand

Joined: Mar 25, 2010
Posts: 55
I do see the WSDL file but I need to be in client N/W by connecting to VPN to access that file, does that mean that I have to connect to VPN to access the wsdl file as well?

An important point to mention here: The mesage that I get when I connect to VPN try accessing the WSDL file is:

******************
There is a problem with this website's security certificate.

The security certificate presented by this website was issued for a different website's address.

Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server.
We recommend that you close this webpage and do not continue to this website.
Click here to close this webpage.
Continue to this website (not recommended).
More information

*****************

I have to click on "Continue to this website (not recommended)." and that is when I get to see the WSDL file.

Please give some ideas on how to generating proxies to establish communication with this web service.

Thanks,
-Shruti


Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
If the web service is within your control, then you may want to consider to make the WSDL available using plain HTTP.
It makes little sense to require HTTPS to access the WSDL. The requests and responses when communicating with the web service are more important to protect.
If the web service is outside of your control, then I suspect there is little you can do. It does sounds like they should get a proper certificate - perhaps this is something you can suggest.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 577

Hi Shruthi,
Please give some ideas on how to generating proxies to establish communication with this web service.

Manually copy the WSDL content on to your local system file and then generate proxies. You don't need to worry too much of accessing a secure WSDL.


Cheers,
Naren
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
Shruti Sharma
Ranch Hand

Joined: Mar 25, 2010
Posts: 55
Thanks, Naren!

I have another question: I have created the classes (including the proxy class) using the WSDL URL through RAD. Now I need to send the input to my web service through an XML file. How to pass data to web service in an XML file through a SOAP message? Is there a tool that generates it?
Also, I need to pass the security parameters (username/password) for authorization and authentication.

Thanks,
-Shruti
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 577

Hi Shruthi,
How to pass data to web service in an XML file through a SOAP message? Is there a tool that generates it?

You can do it by using SOAPUI.

Also, I need to pass the security parameters (username/password) for authorization and authentication.

Here is a link, which guides you on how to invoke a secure web service.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating a web service client