Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » How to make standalone client in Eclipse
How to make standalone client in Eclipse [message #177955] Sat, 26 August 2006 20:52 Go to next message
Kenneth Evans, Jr. is currently offline Kenneth Evans, Jr.Friend
Messages: 77
Registered: July 2009
Member
I would like to make a standalone client (.java file with a main) that
accesses an existing web service (not on my server). I have the WSDL.

This seems like a standard thing to do, but I cannot find any directions for
how to do it in Eclipse using the WTP tools. Nor have I figured it out
myself. It seems to want you to specify one of your servers as the source
of the web service. I should not need a server to do a standalone
application.

I have done this several times in Visual Studio, and it is easy there.

In Eclipse I have just installed WTP and have done the ConvertProj and
AreaProj tutorials, but not much more. I am familiar with Eclipse, just not
WTP. Thanks in advance.

-Ken
Re: How to make standalone client in Eclipse [message #177989 is a reply to message #177955] Sun, 27 August 2006 21:37 Go to previous messageGo to next message
Kenneth Evans, Jr. is currently offline Kenneth Evans, Jr.Friend
Messages: 77
Registered: July 2009
Member
Ok, I think I figured it out:

1. Use the Web Services Wizard on an existing WSDL file (right click, Web
Services | Generate Client) or run it from the Web Services Explorer on a
WDSL you found there, using the Launch Web Service Wizard icon, for example.

2. Choose a Java Utility Project, not a Dynamic Web Project.

3. It generates the stub files, Xxx*.java.

4. In your application use:

try {
XxxSoapProxy proxy = new XxxSoapProxy();
XxxSoap soap = proxy.getXxxSoap();
result = soap.xxxMethod(...); // some method in the XxxSoap.java
interface.
...
} catch(Exception ex) {
...
}

Sure would have saved a lot of time if someone had put that in the help
or a Tutorial. Or maybe I missed it
Re: How to make standalone client in Eclipse [message #178027 is a reply to message #177989] Mon, 28 August 2006 13:56 Go to previous messageGo to next message
Seng Phung Lu is currently offline Seng Phung LuFriend
Messages: 62
Registered: July 2009
Member
Hi Kenneth,
It isn't in the tutorials yet, so that IS a great suggestion. Feel free
to open a bugzilla for this idea, and even to contribute the
documentation. =)

Thanks!

Kenneth Evans wrote:
> Ok, I think I figured it out:
>
> 1. Use the Web Services Wizard on an existing WSDL file (right click, Web
> Services | Generate Client) or run it from the Web Services Explorer on a
> WDSL you found there, using the Launch Web Service Wizard icon, for example.
>
> 2. Choose a Java Utility Project, not a Dynamic Web Project.
>
> 3. It generates the stub files, Xxx*.java.
>
> 4. In your application use:
>
> try {
> XxxSoapProxy proxy = new XxxSoapProxy();
> XxxSoap soap = proxy.getXxxSoap();
> result = soap.xxxMethod(...); // some method in the XxxSoap.java
> interface.
> ...
> } catch(Exception ex) {
> ...
> }
>
> Sure would have saved a lot of time if someone had put that in the help
> or a Tutorial. Or maybe I missed it
>
>
>
>
Re: How to make standalone client in Eclipse [message #178376 is a reply to message #178027] Thu, 31 August 2006 16:29 Go to previous messageGo to next message
Kenneth Evans, Jr. is currently offline Kenneth Evans, Jr.Friend
Messages: 77
Registered: July 2009
Member
Hi,

I am having trouble with the tutorials that already exist. Eclipse has
hung (started using all the CPU) during the wizards for both of
ConverterProj and AreaProj. The Web Services Explorer often does not find
public WSDLs that one would use for a standalone client, even though when I
put the URL in a browser, they are found instantly. It just sits there and
does nothing, but says it is in progress if you click the button again.

So, before writing a tutorial, which isn't hard, I would like to have
things working a little better.

-Ken
Re: How to make standalone client in Eclipse [message #178595 is a reply to message #178376] Wed, 06 September 2006 17:18 Go to previous messageGo to next message
Chris Brealey is currently offline Chris BrealeyFriend
Messages: 104
Registered: July 2009
Senior Member
Ken,
sorry you're having trouble here. The wizards should never hang, though there
are times they reach out to the network to download resources (like WSDL
documents), and firewall configurations - which are configured differently in
Eclipse WTP than in your browser - are often a factor.

As for the Web Services Explorer, for certain WSDL documents it gets into
trouble due to Sun JRE 1.4's use of Crimson as its default XML parser. There is
more on this, and a workaround to try, at
http://dev.eclipse.org/newslists/news.eclipse.webtools/msg11 465.html.

In the end, if trouble continues, please open a bug against us.

Cheers - CB.

Kenneth Evans wrote:

> Hi,
>
> I am having trouble with the tutorials that already exist. Eclipse has
> hung (started using all the CPU) during the wizards for both of
> ConverterProj and AreaProj. The Web Services Explorer often does not find
> public WSDLs that one would use for a standalone client, even though when I
> put the URL in a browser, they are found instantly. It just sits there and
> does nothing, but says it is in progress if you click the button again.
>
> So, before writing a tutorial, which isn't hard, I would like to have
> things working a little better.
>
> -Ken
Re: How to make standalone client in Eclipse [message #178655 is a reply to message #178595] Thu, 07 September 2006 13:19 Go to previous message
Eclipse UserFriend
Originally posted by: wknauf_NO_._INSIDE_hg-online.de

Hi Chris,

I have seen those hangs at one place, behind a proxy (no internet connection
without proxy possible). Seems the wizard validates the project in the last
creation step, tries to load the DTD/XSD, cannot connect and hangs endless.
I had to enter the valid WTP proxy settings to finish the project creation wizard.

If there is no bug open I will have to do some more research and file one..

Wolfgang

Chris Brealey schrieb:
> Ken,
> sorry you're having trouble here. The wizards should never hang, though there
> are times they reach out to the network to download resources (like WSDL
> documents), and firewall configurations - which are configured differently in
> Eclipse WTP than in your browser - are often a factor.
>
Previous Topic:Starting WebSphere 6.1 with WTP 1.5
Next Topic:IWAB0489E Error when deploying Web service to Axis runtime
Goto Forum:
  


Current Time: Fri Apr 19 23:56:37 GMT 2024

Powered by FUDForum. Page generated in 0.03390 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top