Hi,
For your endpoint you can configure
org.apache.activemq.ActiveMQConnectionFactory yourself, where you can specify
<property name="userName" value="..." />
<property name="password" value="..." />
The whole configuration would be like
<bean id="jmsConnectionFactory"
class="org.springframework.jms.connection.SingleConnectionFactory">
<property name="targetConnectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL"
value="tcp://localhost:61616" />
<property name="userName" value="..." />
<property name="password" value="..." />
</bean>
</property>
</bean>
<bean id="jmsConfig" class="org.apache.cxf.transport.jms.JMSConfiguration"
p:connectionFactory-ref="jmsConnectionFactory"
p:targetDestination="test.queue"
/>
<!-- JMS Endpoint -->
<jaxws:endpoint xmlns:customer="http://customerservice.example.com/"
id="CustomerServiceHTTP" address="jms://"
implementor="com.example.customerservice.server.CustomerServiceImpl">
<jaxws:features>
<bean class="org.apache.cxf.feature.LoggingFeature" />
<bean
class="org.apache.cxf.transport.jms.JMSConfigFeature"
p:jmsConfig-ref="jmsConfig" />
</jaxws:features>
</jaxws:endpoint>
Take a look at jms_spring_config example shipped with kit to get more details.
-------------
Freeman(Yue) Fang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋
On 2013-8-28, at 下午3:36, Jan Bernhardt wrote:
> I'm sorry, I hit the wrong key combination (Ctrl+Enter) an my message was
> sent before I was done writing it.
>
> I'm currently testing JMS transport for my webservice communication in a
> WSDL first approache.
>
> <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <soapjms:jndiConnectionFactoryName>ConnectionFactory</soapjms:jndiConnection
> FactoryName>
> <soapjms:jndiInitialContextFactory>org.apache.activemq.jndi.ActiveMQInitialC
> ontextFactory</soapjms:jndiInitialContextFactory>
> <soapjms:jndiURL>tcp://0.0.0.0:61616</soapjms:jndiURL>
>
> It is working fine without any additional configuration within my
> jaxws:endpoint.
>
> <!-- JMS Queue Endpoint -->
> <jaxws:endpoint id="CRMServiceJMSQueue"
> xmlns:serviceNamespace="http://services.talend.org/CRMService"
> serviceName="serviceNamespace:CRMServiceProvider"
> endpointName="serviceNamespace:CRMServiceJMSQueuePort"
> implementor="#CRMServiceBean"
> wsdlLocation="WEB-INF/wsdl/CRMService.wsdl">
> </jaxws:endpoint>
>
> But now, I would like to enable authentication at my ActiveMQ JMS broker,
> but I do not now, who to configure the the jaxws:endpoint to provide
> unsername and password for this.
> Are there any jaxws:properties to be set to accomplish this?
>
> I'm running my demo in a karaf OSGi Container and I do not complete
> understand the magic of where the JMS Conenction Factory comes from, because
> I do not provide any settings for it at any place. I guess the connection
> factory would be the right place to set username and password, but I do not
> know how to configure the connection factory within my OSGi environment.
>
> Can someone help me here?
>
> Best regards.
> Jan
>
>> -----Original Message-----
>> From: Jan Bernhardt
>> Sent: Mittwoch, 28. August 2013 09:28
>> To: '[email protected]'
>> Subject: Authentication with JMS Transport
>>
>> Hi CXF users,
>>
>> I'm currently testing JMS transport for my webservice communication in a
>> WSDL first approache.
>>
>>
>> Viele Grüße
>> Jan
>