-
1. Re: change in run-time the soap:address location of wsdl.
hbraun Apr 19, 2006 5:50 AM (in response to amitguz)Stub._setProperty(ENDPOINT_ADDRESS_PROPERTY, "http://tulip.imagine-com.local:12124") should be working. You might have to cast your Port to Stub though.
-
2. Re: change in run-time the soap:address location of wsdl.
thomas.diesler Apr 29, 2006 7:59 AM (in response to amitguz)Use the JSR-109 client deployment model, with <wsdl-override> in jboss-client.xml.
There are plenty of examples in the testsuite. -
3. Re: change in run-time the soap:address location of wsdl.
astevens1 Jun 2, 2006 4:10 PM (in response to amitguz)Yes jboss-client.xml works but I have potentially up to a 1000 of endpoints for the same service. And they come and go. And the approach of
Stub stub = (Stub)port;
stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, this.TARGET_ENDPOINT_ADDRESS);
doesn't seem to work. Any other suggestions for the 1.0.0GA? -
4. Re: change in run-time the soap:address location of wsdl.
cliffb53 Jun 2, 2006 5:01 PM (in response to amitguz)You can change the file <_server_>/deploy/jbossws14.sar/META-INF/jboss-service.xml from this:
<attribute name="WebServiceHost">${jboss.bind.address}</attribute>
to this:<attribute name="WebServiceHost">www.example.com</attribute>
And then use http://www.example.com:8080/jbossws/services to get a WSDL file for each of the published services.
Hope this helps. -
5. Re: change in run-time the soap:address location of wsdl.
acxsjones Jun 22, 2006 11:05 PM (in response to amitguz)Did you ever find a way to do this. I need the ability to change the url at runtime.
Examples show using ENDPOINT_ADDRESS_PROPERTY, but it does not work.
Any help would be great -
6. Re: change in run-time the soap:address location of wsdl.
acxjbertr Jun 23, 2006 11:00 AM (in response to amitguz)If you know the address of the machine you need to hit at runtime, why not just hit it and get the WSDL that it has generated (which would have the appropriate substitution for REPLACE_WITH_ACTUAL_URL)?
Instead of:File file = new File("C:/a.wsdl"); URL url = new URL(file.toURL().toString());
You would have something like:URL wsdlLocation = new URL("http://hostname:8080/webServiceName/WebServiceName?wsdl");
-
7. Re: change in run-time the soap:address location of wsdl.
jason.greene Jun 23, 2006 12:00 PM (in response to amitguz)"astevens@avaya.com" wrote:
Yes jboss-client.xml works but I have potentially up to a 1000 of endpoints for the same service. And they come and go. And the approach of
Stub stub = (Stub)port;
stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, this.TARGET_ENDPOINT_ADDRESS);
doesn't seem to work. Any other suggestions for the 1.0.0GA?
This should work, if it doesn't it is a bug. We actually have an internal client that uses this feature (the jboss portal wsrp), so I am not sure how it could not be working. If you can make a simple test case that proves this and create a jira issue with it attached we can take a look at fixing it.
-Jason -
8. Re: change in run-time the soap:address location of wsdl.
drblmb Sep 13, 2007 3:23 PM (in response to amitguz)I don't understand how to do this. Using JBossWS 2.0.1GA - and still can't figure out how to override the end point address. What Stub?
Let's suppose you are running in production, and have a web service running at 1,000 different locations (IP Addresses). You don't want the overhead of having to go pull down the WSDL everytime you get the port, so you statically link with a .WSDL file stored locally. The problem, however, is that the soap:address location is statically defined in the WSDL. So - how does your JBossWS client change the endpoint address (NOT THE WSDL LOCATION) after getting the web service port?
Example: I have the same web service running at x.x.x.A and at x.x.x.B. So I get the port, and I want to send the same SOAP Request to both servers - why even get the port twice? Just send it to x.x.x.A (assuming that is where the WSDL is pointing to), and then change the endpoint address to x.x.x.B, and using the same port, call the same method again and it should go to x.x.x.B.
This is what we need to do - does anyone know how to do this? And yes, I know that you can override the WSDL location in the constructor - that isn't what I need to do here. I have been working on this for several days without success.
Thanks -
9. Re: change in run-time the soap:address location of wsdl.
richard_opalka Sep 14, 2007 3:06 AM (in response to amitguz)Take a look to addressing JBossWS samples and read WS-Addressing spec. It might help you;-)
Cheers,
Richard