Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Java Web Service Client
Java Web Service Client [message #144968] Mon, 24 October 2005 14:05 Go to next message
Ben Sisson is currently offline Ben SissonFriend
Messages: 202
Registered: July 2009
Senior Member
I have been working with Web Services for about 6 months now. I find that
using Eclipse to generate the Web Service and Client's is fantastic.
However, I notice that when I generate the client that it creates a JSP
client (which works for my testing) but I need a java client to access the
Web Services as well. I noticed that under the JSP files in the client
are a number of java files as well. Here is my predicament, I want to
create a stand alone java program using the visual editor and add a
connection to the Web Service from there.

(1) Would it be easier to generate a Web Service client from the WSDL
first and then add the Visual parts to the program?

(2) Create the visual project first and then add connections to the Web
Service?

(3) Is there a way of generating a Java Web Service client from the WSDL
that isn't a JSP and can easily be incorporated into a Visual project?

(4) If there is another combination or option that I haven't discussed,
please let me know.

Thanks,
Ben
Re: Java Web Service Client [message #144995 is a reply to message #144968] Mon, 24 October 2005 17:29 Go to previous messageGo to next message
Jeff Shirley is currently offline Jeff ShirleyFriend
Messages: 6
Registered: July 2009
Junior Member
When you have WTP generate a web services client, it just generates a
proxy which can connect onto your service. So you can use the proxy to
call your webservice methods from whatever code you want. Just have it
generate the client, write your other code separately, and then link it up.

You can simply uncheck the "Test Web Service" box, and it won't generate
the JSP files, but leave the "Generate Proxy" box checked. Then you can
just instantiate the <your service name>Proxy class which gets generated
by WTP wherever you want to call the webservice method. Simply call the
method on the proxy, and it will handle the communication. You may need
to edit the EnrollerServiceLocator, etc files to suit your situation.

Hope that helps.

Jeff

Ben wrote:
> I have been working with Web Services for about 6 months now. I find
> that using Eclipse to generate the Web Service and Client's is
> fantastic. However, I notice that when I generate the client that it
> creates a JSP client (which works for my testing) but I need a java
> client to access the Web Services as well. I noticed that under the JSP
> files in the client are a number of java files as well. Here is my
> predicament, I want to create a stand alone java program using the
> visual editor and add a connection to the Web Service from there.
> (1) Would it be easier to generate a Web Service client from the WSDL
> first and then add the Visual parts to the program?
>
> (2) Create the visual project first and then add connections to the Web
> Service?
>
> (3) Is there a way of generating a Java Web Service client from the WSDL
> that isn't a JSP and can easily be incorporated into a Visual project?
>
> (4) If there is another combination or option that I haven't discussed,
> please let me know.
>
> Thanks,
> Ben
>
Re: Java Web Service Client [message #145069 is a reply to message #144995] Mon, 24 October 2005 23:09 Go to previous message
Ben Sisson is currently offline Ben SissonFriend
Messages: 202
Registered: July 2009
Senior Member
That worked perfectly, thanks for your advice and help.
Previous Topic:WTP project structure
Next Topic:build.xml
Goto Forum:
  


Current Time: Sun Nov 03 06:03:40 GMT 2024

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

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

Back to the top