• Post Reply Bookmark Topic Watch Topic
  • New Topic

Subject: Axis2 web service How to Make Web Service Address Configurable  RSS feed

 
zigzag dna
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I am generating client and web service code from a wsdl file. Now my wsdl file has following for web service end point address:
<wsdl:service name="SG910_BtB_IN0138_NonConformances_ETS_Source_v1.webService.receiveNonConformanceWS">
- <wsdl:port name="SG910_BtB_IN0138_NonConformances_ETS_Source_v1_webService_receiveNonConformanceWS_Port" binding="tns:SG910_BtB_IN0138_NonConformances_ETS_Source_v1_webService_receiveNonConformanceWS_Binder">
<soap:address location="http://itsusmpl00082.jnj.com:7996/ws/SG910_BtB_IN0138_NonConformances_ETS_Source_v1.webService.receiveNonConformanceWS/SG910_BtB_IN0138_NonConformances_ETS_Source_v1_webService_receiveNonConformanceWS_Port" />
</wsdl:port>
</wsdl:service>


Now location is hardcoded to refer to some address. Now I am using wsdl2java to generate code. But code has address hardcoded. Since this address can change from dev to qa to prod. How can I make generated code independent of address; i.e., generated code will work across all environments.

I am new to axis2 and this code generation, so appreciate any guidance,


 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should be easy to adapt the generated code so that it reads the URL from some property that you can pass in via the command line invocation of the client. Start by looking through the source code for where the URL gets used.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!