Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageIn 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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.