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 how do I set the port when using servicegen to create a wsdl file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "how do I set the port when using servicegen to create a wsdl file" Watch "how do I set the port when using servicegen to create a wsdl file" New topic
Author

how do I set the port when using servicegen to create a wsdl file

Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 582
I am using servicegen to create my wdsl file. In the build script I have set the port to the port that weblogic is running on. The problem is that when I run servicegen ant task, it sets the soap address to

<soap:address location="http://localhost:7001/process/myProcess">
</soap:address>

in the build script the servicegen part is

<service targetNamespace="${namespace}"
serviceName="AntiVirusProcess"
serviceURI="/AntiVirusProcess"
generateTypes="True"
expandMethods="True">
</service>
is there a servicePort variable I can add the service API does not seem to show one.

Thanks for any help

Tony
Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 582
The awnser is you cant, it has to be set at run time through the calling program.

final String wsdl = "http://localhost:9001/anti_virus/AntiVirusProcess?WSDL";

and then call your stub with the argument parameter

AntiVirusProcess_Impl ws = new AntiVirusProcess_Impl(wsdl);
And it works.

Tony
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how do I set the port when using servicegen to create a wsdl file