cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From coatsey <demis...@gmail.com>
Subject Re: configurability of published soap:address location on jaxws endpoints
Date Tue, 25 Mar 2008 23:15:49 GMT

Christan,
thanks for the reply.  Looks like I just had a misconfiguration of my
endpoint that was causing it to not be replaced by the publishedEndpointUrl. 
It was just the way I'd read the previous post had me thinking that cxf
didn't handle replacing the endpoint in static wsdl files, so I hadn't
looked for a config problem.

Crisis averted ;)

Cheers,
Mike


Christian Vest Hansen wrote:
> 
> I use WSDL-first development in conjuction with this feature.
> 
> I write my WSDL with a single static endpoint address - it does mcuh
> matter what it is.
> 
> Then I configure it at deployment-time, by having Spring load a
> server-local properties file into a PropertyPlaceholderConfigurer
> bean.
> 
> This properties file will have a "host" variable, and I use that
> variable to set my published endpoint url to something like this:
>    publishedEndpointUrl="http://${host}/app/services/ImportantService"
> 
> For the wsdl location, I just to the one I package in the .war file, like
> this:
>    wsdlLocation="classpath:ImportantService.wsdl"
> 
> This method works out quite nicely for me, and I haven't experienced a
> time where the publishedEndpointUrl. An issue could be that the code
> only overrides one of the endpoints, and it can be pretty hard to tell
> which, but that is why I only put a single endpoint in my WSDL.
> 
> Granted, it defeats the purpose of having multiple endpoints, but for
> me, that's a loss I can live with.
> 
> On 3/25/08, coatsey <demisgfh@gmail.com> wrote:
>>
>>  Willem,
>>  I just found this thread while looking for a way to change the
>> soap:address
>>  location published at runtime, and wanted to contribute my thoughts.
>>  Unfortunately when using a static wsdl (specified using the wsdlLocation
>>  attribute), limiting the location to that contained in the wsdl is a
>> serious
>>  limitation in development as it means that you either have to:
>>  a) create a different wsdl for each environment you're going to deploy
>> into
>>  b) have an incorrect wsdl for all but the final deployed destination. 
>> This
>>  also assumes that the developer knows hostnames at build-time, and I
>> expect
>>  will limit the ability to test.
>>
>>  Neither of these options makes me very comfortable.  In my mind, the
>>  publishedEndpointUrl should be honoured regardless of whether you're
>> using a
>>  static wsdl or not so that the definition can be externalised to a
>>  deploytime decision.
>>
>>  Does this seem reasonable to you?  Unfortunately the current code seems
>> to
>>  be a showstopper for doing wsdl-first development (I'm more than happy
>> for
>>  you to tell me otherwise & provide a workaround though).
>>
>>  As our wsdl's have already been defined for these interfaces, it looks
>> like
>>  I'll need to try a different WS framework in the mean-time (probably
>> suns
>>  jaxws-ri without the spring plugin).  It's a real shame though b/c cxf
>> looks
>>  great otherwise.  Hopefully I'll be back using it soon.
>>
>>  Cheers,
>>  Mike
>>
>>
>>
>>
>>
>>  Willem2 wrote:
>>  >
>>  > Hi Christian,
>>  >
>>  > Please see my comments in the mail.
>>  > Christian Vest Hansen wrote:
>>  >> Hi Willem,
>>  >>
>>  >> Troublesome as it may be, I have to try it. I'm scheduled this month
>>  >> to work on this as it is a feature that's pretty high on our wish
>>  >> list, and we might schedule more time if one month is not enough.
>>  >>
>>  >>
>>  > Great, any contribution are welcome here :)
>>  >>> I think if we can delegate the WSDL query to a static WSDL resovler
>>  >>> handler , you can define the WSDL service address as what you want.
>>  >>>
>>  >>
>>  >> Can you tell me more about this idea? Where would the good extension
>>  >> points be - what packages & modules to look at.
>>  >>
>>  >>
>>  > Since CXF WSDLQueryHandler[1] will Generate the WSDL Dynamically,
>>  > if your endpoint is generated from a static WSDL, I think you can
>> define
>>  > the publishing url as what you
>>  > want in the static WSDL and let WSDLQueryHandler return the static
>> WSDL
>>  > instead.
>>  >
>>  >
>> [1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
>>  >
>>  > Willem.
>>  >> 2007/12/4, Willem Jiang <ning.jiang@iona.com>:
>>  >>
>>  >>> Hi Chirstian,
>>  >>>
>>  >>> I don't think you can do that , since CXFServletControl will use the
>>  >>> endpoint address which get from the endpoint information to find the
>>  >>> right destination, and this endpoint information will be used as the
>>  >>> service address when CXF generate the WSDL for you.
>>  >>>
>>  >>> I think if we can delegate the WSDL query to a static WSDL resovler
>>  >>> handler , you can define the WSDL service address as what you want.
>>  >>>
>>  >>> Willem.
>>  >>>
>>  >>> Christian Vest Hansen wrote:
>>  >>>
>>  >>>> Hi,
>>  >>>>
>>  >>>> I'm trying to make it possible to configure the published
>> soap:address
>>  >>>> location in the jaxws generated WSDLs.
>>  >>>>
>>  >>>> >From a spring point of view, I'm trying to make this:
>>  >>>>
>>  >>>> (beans.xml....)
>>  >>>>   <jaxws:endpoint id="publishedEndpointUrl"
>>  >>>>     implementor="#greeter"
>>  >>>>     address="http://localhost:8080/publishedEndpointUrl"
>>  >>>>     publishedEndpointUrl="http://cxf.apache.org/GreeterEndpoint"/>
>>  >>>> (....)
>>  >>>>
>>  >>>> Do this:
>>  >>>>
>>  >>>> (http://localhost:8080/publishedEndpointUrl?wsdl....)
>>  >>>>   <wsdl:service name="GreeterService">
>>  >>>>     <wsdl:port binding="tns:GreeterServiceSoapBinding"
>>  >>>> name="GreeterPort">
>>  >>>>       <soap:address
>> location="http://cxf.apache.org/GreeterEndpoint"/>
>>  >>>>     </wsdl:port>
>>  >>>>   </wsdl:service>
>>  >>>> (....)
>>  >>>>
>>  >>>> Right now, I'm trying to wrap my head around how the WSDL is
>> generated
>>  >>>> and how that is connected to the values in the EndpointImpl objects
>>  >>>> that the jaxws:endpoint xml generates.
>>  >>>>
>>  >>>> If you have any hints to that end, or other relevant information
>> then
>>  >>>> it would be greatly appreciated - I haven't worked with the CXF
>> source
>>  >>>> before and the docs on the wiki are still a bit sparse in this
>> regard.
>>  >>>>
>>  >>>> Thanks!
>>  >>>>
>>  >>>>
>>  >>>>
>>  >>
>>  >>
>>  >>
>>  >
>>  >
>>
>>
>> --
>>  View this message in context:
>> http://www.nabble.com/configurability-of-published-soap%3Aaddress-location-on-jaxws-endpoints-tp14127128p16266846.html
>>  Sent from the cxf-dev mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Venlig hilsen / Kind regards,
> Christian Vest Hansen.
> 
> 

-- 
View this message in context: http://www.nabble.com/configurability-of-published-soap%3Aaddress-location-on-jaxws-endpoints-tp14127128p16290841.html
Sent from the cxf-dev mailing list archive at Nabble.com.


Mime
View raw message