2011-02-28 91 views
4

内骆驼的路线,我想这样做:JAXWS和ServiceMix的

<jaxws:endpoint id="AbcEsbHTTPEndpoint" 
    implementor="com.abc.esb.ABCWSServiceImpl" 
    address="/ABCWSServiceService" 
    wsdlLocation="wsdl/ABCWSService.wsdl" 
    endpointName="e:ABCWSService" 
    serviceName="s:ABCWSServiceService" 
    xmlns:e="http://com.abc.esb/abcesb/services/ABCWSService" 
    xmlns:s="http://com.abc.esb/abcesb/services/ABCWSService"> 
</jaxws:endpoint> 


<camelContext xmlns="http://camel.apache.org/schema/spring"> 
    <route> 
     <from uri="cxf:bean://ABCWSServiceService"/> 
     <to uri="cxf:bean:decodeClient"/> 
    </route> 
</camelContext>  

<jaxws:client id="decodeClient" 
    address="http://ESB-DEV1:9081/abcesb/services/Decoder" 
    wsdlLocation="http://ESB-DEV1:9081/abcesb/services/Decoder?wsdl" 
    serviceClass="com.abc.esb.ABCServiceInterface" 
    abstract="true" > 
</jaxws:client> 

我不明白如何从<jaxws:endpoint>配置到<jaxws:client>骆驼的路线是什么使用的语法?我知道你可以使用<cxf:cxfEndpoint>但我不想用,如果我不必。

我知道如何用JBI做到这一点,但我想用OSGI包而不是JBI将它部署到servicemix中。

回答

-4

查看骆驼发行版中的示例中的一些cxf示例。他们展示了如何设置cxf,而不是jbi。

+0

感谢您的回复。是的,我仔细看过了那些。我认为这个例子(camel-example-cxf-proxy)是确切的用例。基于这个例子,我可以使用来自“cxf:cxfEndpoint”配置的终点的骆驼路线。我很好奇,如果我能从骆驼路线上使用“jaxws:endpoint”端点。我不知道骆驼路线中引用jaxws:端点的语法。 感谢您的帮助! – guido 2011-03-03 12:04:10

+0

Guido,我也尝试将camel-example-cxf-proxy安装到serviceMix 4.3.0中。安装很好(install -s wrap:file:/ c:/ ... jar)。但看起来这个例子不起作用。使用SOAPUI进行测试时,我无法访问WSDL。你可以让我知道如何使它在ServiceMix中工作 – David 2012-03-07 18:38:26

+2

克劳斯......我知道你很聪明,因为你发明了骆驼。但我们可以看到一些实际的代码吗?我一直在寻找一个路由到/从一个jax-ws端点的实际例子,但找不到一个。你成为骆驼的主要创造者将是最好的人举个例子(甚至是一个链接,什么?)。如果你发布了一个例子,我将删除我对这个答案的低估。干杯。 – Jack 2012-07-19 15:22:05

2

jaxws:client你有你的配置的端点是jaxws:endpoint并且可以使用bean组件连接:

<camelContext xmlns="http://camel.apache.org/schema/spring"> 
    <route> 
     <from uri="bean:AbcEsbHTTPEndpoint"/> 
     <to uri="bean:decodeClient"/> 
    </route> 
</camelContext> 

通常有一个需要做的事情之间 - 说来适应消息以某种方式 - 但以上将至少实现路由。