• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Webservice - Java Client

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everyone,

I am very new with the web services. So, please bear with me if the question is stupid.

I am trying to get a better concept about writing a Java SOAP CLIENT (I understand the SOAP Service Implementation, I think .

Seems like there are different ways of writing a JAVA soap client. For example, in the below link
Java SOAP Client

(1) Java Web Service client Without Tool (without running 'wsimport'):
=> My understanding is, when we do this, it will not generate the service stubs on client side ...
# Please correct me if I am wrong, or what is the case here

Q: In this case, how can we access the HelloWorld class? (Client code can be anywhere other than SOAP Service Implementation package)

So how can we import

or call



Am I missing any step before writing this type of client?
 
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In this example, "HelloWorld" interface forms the web service's "contract". These contracts (which have no implementation) are packaged with your client. That is, the interface is packaged into a jar file for example, and is add to your client app's classpath. On the contrary, if you generate the stub with wsimport, the tool will read the WSDL and generates the interface for you.
 
Md Uddin
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Amir Keibi wrote:In this example, "HelloWorld" interface forms the web service's "contract". These contracts (which have no implementation) are packaged with your client. That is, the interface is packaged into a jar file for example, and is add to your client app's classpath. On the contrary, if you generate the stub with wsimport, the tool will read the WSDL and generates the interface for you.




Hi Amir, thank you for your reply. So, for the below Web Service client (took it from 'Java Web service up and running' book, chapter 1), I need to do the same, right? Need to add the interface jar into the client class path and then run it ....?


 
Amir Keibi
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. The "TimeServer" is your interface, right?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic