You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "raulvk.soa" <ra...@gmail.com> on 2008/11/25 18:34:54 UTC
servicemix-cxf-bc locationURI
Is it possible to have servicemix-cxf-bc automatically insert it's own
hostname/IP address into the <soap:address location="..." /> element of the
WSDL that ServiceMix serves?
I used the following in my xbean.xml:
<cxfbc:consumer wsdl="file:/home/smx/resources/ServiceA.wsdl"
locationURI="http://0.0.0.0:8190/Services/ServiceA" targetService="..." />
I expected 0.0.0.0 to be replaced by the machine's IP address when the WSDL
was requested via http://0.0.0.0:8190/Services/ServiceA?wsdl, but this
didn't happen and the client ended up trying to invoke itself!
This would be very helpful for cases where you need to have one generic WSDL
to deploy on many machines that will be offering the service, but don't want
to have to modify the WSDL for each machine...
Any ideas if the current servicemix-cxf-bc component is capable of doing
this substitution?
--
View this message in context: http://www.nabble.com/servicemix-cxf-bc-locationURI-tp20686030p20686030.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: servicemix-cxf-bc locationURI
Posted by "raulvk.soa" <ra...@gmail.com>.
Hi Gino,
Sure, we are already using PropertyPlaceholders for other configuration
data. However, it seems that whatever endpoint you specify on the
locationURI, it just gets ignored by ServiceMix, instead of inserting it as
an additional endpoint when serving the WSDL.
Thanks.
Ginobean wrote:
>
> Yes. It is indeed possible.
>
> Recipe:
> 1. In your xbean.xml file, add a PropertyPlaceholderConfigurer.
> 2. for the locationURI, you can now use a variable placeholder in place
> of a hardcoded url.
>
> What this means is that you can configure a property file to hold the
> location URI instead of having to edit xbean.xml and rebuilding separate
> packages for each target environment.
>
> Hope this helps..
>
> Gino.
>
>
> <bean id="propertyConfigurer"
> class="org.springframework.beans.factory.config.
> PropertyPlaceholderConfigurer">
> <property name="location" ..
> </bean>
>
> <cxfbc:consumer wsdl="classpath:ServiceName.wsdl"
> locationURI="${services.base.url}/ServiceName" ..
>
>
>
--
View this message in context: http://www.nabble.com/servicemix-cxf-bc-locationURI-tp20686030p21923777.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: servicemix-cxf-bc locationURI
Posted by Ginobean <gi...@gmail.com>.
Yes. It is indeed possible.
Recipe:
1. In your xbean.xml file, add a PropertyPlaceholderConfigurer.
2. for the locationURI, you can now use a variable placeholder in place
of a hardcoded url.
What this means is that you can configure a property file to hold the
location URI instead of having to edit xbean.xml and rebuilding separate
packages for each target environment.
Hope this helps..
Gino.
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.
PropertyPlaceholderConfigurer">
<property name="location" ..
</bean>
<cxfbc:consumer wsdl="classpath:ServiceName.wsdl"
locationURI="${services.base.url}/ServiceName" ..
--
View this message in context: http://www.nabble.com/servicemix-cxf-bc-locationURI-tp20686030p21858561.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: servicemix-cxf-bc locationURI
Posted by Freeman Fang <fr...@gmail.com>.
raulvk.soa wrote:
> Is it possible to have servicemix-cxf-bc automatically insert it's own
> hostname/IP address into the <soap:address location="..." /> element of the
> WSDL that ServiceMix serves?
>
> I used the following in my xbean.xml:
>
> <cxfbc:consumer wsdl="file:/home/smx/resources/ServiceA.wsdl"
> locationURI="http://0.0.0.0:8190/Services/ServiceA" targetService="..." />
>
> I expected 0.0.0.0 to be replaced by the machine's IP address when the WSDL
> was requested via http://0.0.0.0:8190/Services/ServiceA?wsdl, but this
> didn't happen and the client ended up trying to invoke itself!
>
I'm not sure I understand how your client get the wsdl? In any case,
your client need specify the server's ip/hostname to get the wsdl, right?
You mean your client just use "http://0.0.0.0:8190/Services/ServiceA" to
retrieve the wsdl?
> This would be very helpful for cases where you need to have one generic WSDL
> to deploy on many machines that will be offering the service, but don't want
> to have to modify the WSDL for each machine...
>
>
How about just specify "http://localhost:8190/Services/ServiceA" in this
case?
> Any ideas if the current servicemix-cxf-bc component is capable of doing
> this substitution?
>
>
>