• Post Reply Bookmark Topic Watch Topic
  • New Topic

Webservice - Java Client  RSS feed

 
Md Uddin
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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?
 
Amir Keibi
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Yes. The "TimeServer" is your interface, right?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!