[英]Camel Http proxy to Web services
我已經閱讀了一些有關Camel的內容,並瀏覽了下載目錄中的一些示例。
我想知道是否可以使用jetty:或servlet將路由配置為接受參數name = fred的傳入Http請求:
然后,我需要將其轉換為真實的安全SOAP請求(HTTPS),並獲取SOAP響應。
我必須編寫Java代碼來發送SOAP請求嗎? 到目前為止,我所看到的示例都是使用SOAP作為輸入,修改一些值並將其作為SOAP發送的。
任何人都可以用最少的代碼提供一些指導嗎?
謝謝與問候田
這是我已經完成的工作,並且可以正常工作。.velocity_template.vm包含整個SOAP請求,並在運行時替換了動態字段。 $ {} in.headers.name
<?xml version="1.0" encoding="UTF-8"?>
<!-- START SNIPPET: e1 -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:cxf="http://camel.apache.org/schema/cxf"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd">
<cxf:cxfEndpoint id="real_webservice"
address="url_to_wsdl?wsdl"
endpointName="s:Real_impl_class"
xmlns:s="real_namespace"/>
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route id="helloRoute">
<from uri="servlet:///hello"/>
<to uri="velocity:etc/velocity_template.vm"/>
<to uri="cxf:bean:real_webservice?dataFormat=MESSAGE"/>
</route>
</camelContext>
</beans>
<!-- END SNIPPET: e1 -->
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.