web services - How to get the properties read from the property file into the wsdl and the generated stubs -
what trying separate configurations of endpoint address , service versions .properties file or any. since, endpoint different in various environments, such uat , production environments. also, service provider controls service/message version using naming convension abcdef_10_4, abcdef name of service , 10.4 release version. service consumer, cannot change on server side.
what looking way make use of similar this
<wsdl:operation name="service1"> <soap:operation soapaction="**${endpointurl}/${msgname}**" /> <wsdl:input> <soap:body use="literal" /> <soap:header use="literal" message="tns:messageheader" part="session" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> <soap:header use="literal" message="tns:messageheader" part="session" /> </wsdl:output> </wsdl:operation> <wsdl:service name="**${servicename}**"> <wsdl:port binding="tns:servicebinding" name="serviceport"> <soap:address location="**${endpointurl}**" /> </wsdl:port> </wsdl:service>
where can specify values in name:value pair similar .properties file like
endpointurl=http://xxx.xxx.xxx.xxx:10000 msgname=abcdef_10_4 servicename=myservice
the problem dont want change wsdl everytime service provider releases new version of services , easier me , team manage version of services in 1 place.
also, when deploy our applicaion on uat/dev/prod/test environments, dont need make changes in wsdl everytime or have many wsdl files each environment.
we using maven cxf codegen plugin generate client stubs.
any idea or possible way similar this?
ok, after digging around google 3-4 hrs, found answer , think should contribute community.
first, create new profile , use maven-resources-plugin filtering replace ${param} in wsdl .properties file , copy replaced resource target folder.
then, in profile user cxf-codegen-plugin generate webservices clients generated wsdl.
that's :)
Comments
Post a Comment