axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua.Wh...@hartfordlife.com
Subject Re: How to avoid hardcoding the location of wsdl file in generated source?
Date Tue, 09 May 2006 11:17:49 GMT

<br><font size=2 face="sans-serif">Dies,</font>
<br>
<br><font size=2 face="sans-serif">Thanks for the reply!</font>
<br>
<br><font size=2 face="sans-serif">Joshua<br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Dies Koper &lt;dies@jp.fujitsu.com&gt;</b></font>
<p><font size=1 face="sans-serif">05/08/2006 07:56 PM</font>
<br><font size=1 face="sans-serif">Please respond to axis-user</font>
<br>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp;
To: &nbsp; &nbsp; &nbsp; &nbsp;axis-user@ws.apache.org</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp;
cc: &nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp;
Subject: &nbsp; &nbsp; &nbsp; &nbsp;Re: How to avoid hardcoding the location
of wsdl file in generated &nbsp; &nbsp;source?</font></table>
<br>
<br>
<br><font size=2 face="Courier New">Hello Joshua,<br>
<br>
Set the URL yourself in your client:<br>
<br>
import javax.xml.rpc.*;<br>
[...]<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ServiceFactory
sf = ServiceFactory.newInstance();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YourService
service = (YourService)sf.loadService(YourService.class);<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YourSEI
remote = service.getYourSEI();<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String
url = args[0];<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ((Stub)remote)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
url);<br>
<br>
Load the url from a property file or pass it as argument to your client.<br>
<br>
Regards,<br>
Dies<br>
<br>
Joshua.White@hartfordlife.com wrote:<br>
&gt; When using the axis-wsdl2java ant task, the location of the wsdl file gets hard <br>
&gt; coded in the generated client code. &nbsp;I need to move my app between environments
<br>
&gt; without having to recompile. &nbsp;How do I prevent this from happening? &nbsp;Is
there <br>
&gt; another alternative?<br>
&gt; <br>
&gt; Regards,<br>
&gt; <br>
&gt; Joshua<br>
<br>
</font>
<br>
<br>
<FONT SIZE=3><BR>
<BR>
*************************************************************************<BR>
This communication, including attachments, is<BR>
for the exclusive use of addressee and may contain proprietary,<BR>
confidential and/or privileged information.  If you are not the intended<BR>
recipient, any use, copying, disclosure, dissemination or distribution is<BR>
strictly prohibited.  If you are not the intended recipient, please notify<BR>
the sender immediately by return e-mail, delete this communication and<BR>
destroy all copies.<BR>
*************************************************************************<BR>
</FONT>

Mime
View raw message