Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #24855

Re: Axis2 web service How to Make Web Service Address Configurable

Newsgroups comp.lang.java.programmer
Date 2013-07-31 09:28 -0700
References <160ade1f-4f9c-43a9-aeb8-d9d4f600184f@googlegroups.com> <kta765$gpo$1@news.albasani.net>
Message-ID <eaa739af-ea7d-431b-b35b-9689ee8b4d33@googlegroups.com> (permalink)
Subject Re: Axis2 web service How to Make Web Service Address Configurable
From zigzagdna@yahoo.com

Show all headers | View raw


On Wednesday, July 31, 2013 1:26:55 AM UTC-4, Sebastian wrote:
> Am 31.07.2013 06:30, schrieb zigzagdna@yahoo.com: > Subject: Axis2 web service How to Make Web Service Address Configurable > > 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 here 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, > > if the endpoints are different, I guess there would be multiple wsdl's, each appropriate to the environment. So you could a) generate the code for each environment separately b) use Ant or Maven to deploy the code appropriate for each environment. Alternatively, perhaps you could do the code generation in each of the environments (perhaps even at runtime) and load the artifacts dynamically. -- Sebastian

Thanks, but there has to be a better way, so code is generated only once and then modified so it becomes independentof the environment and web service URL etc are configurable in some file.  Google erach shows some information which is confusing.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Axis2 web service How to Make Web Service Address Configurable zigzagdna@yahoo.com - 2013-07-30 21:30 -0700
  Re: Axis2 web service How to Make Web Service Address Configurable Sebastian <news@seyweiler.dyndns.org> - 2013-07-31 07:26 +0200
    Re: Axis2 web service How to Make Web Service Address Configurable zigzagdna@yahoo.com - 2013-07-31 09:28 -0700
  Re: Axis2 web service How to Make Web Service Address Configurable Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-07-31 18:04 -0300
    Re: Axis2 web service How to Make Web Service Address Configurable Lew <lewbloch@gmail.com> - 2013-07-31 14:14 -0700
      Re: Axis2 web service How to Make Web Service Address Configurable zigzagdna@yahoo.com - 2013-07-31 15:07 -0700
        Re: Axis2 web service How to Make Web Service Address Configurable Lew <lewbloch@gmail.com> - 2013-07-31 17:47 -0700
          Re: Axis2 web service How to Make Web Service Address Configurable Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-07-31 22:04 -0300
  Re: Axis2 web service How to Make Web Service Address Configurable Arne Vajhøj <arne@vajhoej.dk> - 2013-07-31 23:26 -0400

csiph-web