Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic