File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Client web service with url wsdl entered by user Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Client web service with url wsdl entered by user" Watch "Client web service with url wsdl entered by user" New topic
Author

Client web service with url wsdl entered by user

Mohamed Mostafa
Greenhorn

Joined: Mar 15, 2012
Posts: 11
i am still learning somehow about web service
I need to create a client web service in which the user enters the IP and port of the wsdl url
any help ??
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
What is a "client web service" - are you writing a client for an existing WS? Or are you writing a WS that accesses some other WS that is designated by the WSDL info you're passing to the first WS? TellTheDetails
Mohamed Mostafa
Greenhorn

Joined: Mar 15, 2012
Posts: 11
Tim Moores wrote:What is a "client web service" - are you writing a client for an existing WS? Or are you writing a WS that accesses some other WS that is designated by the WSDL info you're passing to the first WS? TellTheDetails


yes I am writing a client for existing Web Service

i need to create a client which takes the url of the WSDL from the user
and to access a method called adaptorservice in that WSDL which have one parameter as a string and returns string
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
I think you're confused about what a WSDL is and does. A WSDL is used to create client code for a WS, it's not used to access the WS itself. So a user that runs the code would not be entering the URL of the WSDL (apart from highly unusual, very rare, circumstances, where the WS in turn accesses another WS that is identified by its WSDL).
Mohamed Mostafa
Greenhorn

Joined: Mar 15, 2012
Posts: 11
what about the proxy and port ?
that what exactly would be entered by the user.
and they are part of the URL that's why i thought we can take all the URL from user
so if i want to get only the proxy and port would that differ or the same as you said we cant take that from user and it has to be predefined ?
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Now I'm confused. What does a proxy have to do with a WS invocation? Should the client access the WS through a proxy? Or what kind of proxy is this?
Mohamed Mostafa
Greenhorn

Joined: Mar 15, 2012
Posts: 11
Tim Moores wrote:Now I'm confused. What does a proxy have to do with a WS invocation? Should the client access the WS through a proxy? Or what kind of proxy is this?


well suggest that this is the URL of the WSDL : http://localhost:9999/ws/hello?wsdl


what i have meant that the user should enter the proxy which refer to the above link as "localhost" and the port which refers to the above link as "9999"

that's it after that i would like to use a method in that WSDL which for example called " adaptorService " which need a parameter of string and return back another string result.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
I don't think you're using the word "proxy" correctly; I don't see where one would be involved here.

So what you actually want to do is to enter the URL of a WSDL, and then access methods defined in that WSDL without any prior knowledge of what's in the WSDL? I think SOAPUI can do that.
Mohamed Mostafa
Greenhorn

Joined: Mar 15, 2012
Posts: 11
Tim Moores wrote:I don't think you're using the word "proxy" correctly; I don't see where one would be involved here.

So what you actually want to do is to enter the URL of a WSDL, and then access methods defined in that WSDL without any prior knowledge of what's in the WSDL? I think SOAPUI can do that.


so do you advise any tutorials to watch or any good references that can help me ?
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
I don't think you'll find much about this, as it is a very specialized topic. Studying the source code of a tool that does it (like SOAPUI, IIRC) might help. Or maybe you can even reuse some of its code, depending on licensing issues.
Mohamed Mostafa
Greenhorn

Joined: Mar 15, 2012
Posts: 11
Tim Moores wrote:I don't think you'll find much about this, as it is a very specialized topic. Studying the source code of a tool that does it (like SOAPUI, IIRC) might help. Or maybe you can even reuse some of its code, depending on licensing issues.


oh that's so pessimistic well anyways thanks so much for helping
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
I think it's realistic.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Client web service with url wsdl entered by user