For Programmers: Free Programming Magazines  


Home > Archive > Java Help > September 2004 > A question regarding Web Service Client









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author A question regarding Web Service Client
Lior

2004-09-29, 11:03 am

Hi,

I read sun's tutorial "Creating Web Service Clients with JAX-RPC" and
I coundn't understand something.
The code conatins, for example: (Stub) (new
MyHelloService_Impl().getHelloIFPort()); Since it's a stand alone
client, how it suppose to recognize MyHelloService_Impl()? Should it
be added to the project libraries? What did I miss here?

Thanks, Lior
Steve W. Jackson

2004-09-30, 4:08 pm

In article <4d51ce8a.0409290240.1c7b93b3@posting.google.com>,
liorl@maxbill.com (Lior) wrote:

>:Hi,
>:
>:I read sun's tutorial "Creating Web Service Clients with JAX-RPC" and
>:I coundn't understand something.
>:The code conatins, for example: (Stub) (new
>:MyHelloService_Impl().getHelloIFPort()); Since it's a stand alone
>:client, how it suppose to recognize MyHelloService_Impl()? Should it
>:be added to the project libraries? What did I miss here?
>:
>:Thanks, Lior


That tutorial leaves a lot for you to figure out. Basically, you need
to set up an appropriate environment so that the Ant tasks work properly
and all the right values are included in the build.properties files and
the targets.xml files in all the right spots. When you execute the
default Ant task (named build), it refers to the WSDL file for the
"MyHelloService" and uses wscompile (I think) to create Java code from
it.

If the directory structure is still as I remember it, you can look in
the jaxrpc/commons directory for the targets.xml file there, and find a
target named "generate-stubs". In its <param> entry's "value"
attribute, add "-keep" before the "-d" (it'll work elsewhere, that's
just where I put mine). That will cause the Java code created to remain
in your "build" directory after it's done. You can look through this
code and compare it against what you see in the WSDL file to get a feel
for how this all works.

= Steve =
--
Steve W. Jackson
Montgomery, Alabama
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com