This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

generated WSDL through wsgen and REPLACE_WITH_ACTUAL_URL

 
Sagar Kale
Ranch Hand
Posts: 188
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In JAX-WS, I generate wsdl using wsgen ant task. But in generated wsdl I get



Is there way so that I can set actual url either in my java source file or in ant task?


Thanks.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Have you tried to use the wsdlLocation attribute in the @WebService annotation?
If you are deploying to GlassFish, you do not have to worry about setting the address, since GlassFish will automatically do this for you.
Best wishes!
 
Sagar Kale
Ranch Hand
Posts: 188
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to webservices. But wsdlLocation is used only for contract first webservices. Correct me if I am wrong.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Yes, you are wrong.
You can write a code-first web service and then generated the WSDL. Normally when JAX-WS deploys a web service, it will generate the WSDL but if you tell it that you already have a WSDL, using the wsdlLocation in the @WebService annotation you can deploy a web service with an existing WSDL and JAX-WS will not generate a new one.
Best wishes!
 
Sagar Kale
Ranch Hand
Posts: 188
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
Etienne Gauthier
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hum, not that wrong the 'wsdlLocation' attribute of the @WebService annotation is marked as ' Not currently used by JAX-WS RI 2.2.1 '.

And currently, using some annotation like this one:

@WebService(name = "DepartmentService", wsdlLocation = "${testWS.wsdlLocation}")


Doesn't change the generated soap:address. It remains: 'REPLACE_WITH_ACTUAL_URL' in the generated WSDL



Etienne
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sagar,
To answer your question, use this ANT command to find and replace your WSDL location.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Etienne Gauthier wrote:Hum, not that wrong the 'wsdlLocation' attribute of the @WebService annotation is marked as ' Not currently used by JAX-WS RI 2.2.1 '.
And currently, using some annotation like this one:
@WebService(name = "DepartmentService", wsdlLocation = "${testWS.wsdlLocation}")
Doesn't change the generated soap:address. It remains: 'REPLACE_WITH_ACTUAL_URL' in the generated WSDL
Etienne

The wsdlLocation specifies the location of an existing WSDL document for the web service, which is not the same as the endpoint address.
The wsdlLocation is usually a file on the server which the web service is deployed, but since it is an URL it is not limited to this option.
Some web service stacks, such as Metro (at least when running in GlassFish) dynamically modify the endpoint address in the WSDL depending on to which URL the request for the WSDL was placed.
Best wishes!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic