首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Camel-CXF调用WS时缺少SOAPAction标头

使用Camel-CXF调用WS时缺少SOAPAction标头
EN

Stack Overflow用户
提问于 2016-06-17 07:08:52
回答 1查看 2.5K关注 0票数 1

我们正在尝试使用Camel-Cxf/Fuse和Payload dataformat来调用Soap服务。有时客户端拒绝请求,说SOAPAction丢失,这是间歇性的。有没有办法让我们在服务调用期间专门设置SOAPAction?在什么情况下我们无法发送SOAPAction?下面是我们用于调用的配置。

代码语言:javascript
复制
<!-- CXF configuration pointing to WSDL URL and service Name -->

    <cxf:cxfEndpoint id="abcSOAPCPOutbound"
                         wsdlURL="wsdl/FooService.wsdl"
                         endpointName="cNS:FooServiceSoap"
                         serviceName="cNS:FooService"
                         address="http://example.com/processRequest.asmx"
                         xmlns:cNS="http://www.example.com"
                         loggingFeatureEnabled="false">
            <cxf:inInterceptors>
                <ref bean="GZIPInInterceptor"/>
            </cxf:inInterceptors>     
            <cxf:outInterceptors>           
                <ref bean="iuABCSOAPOutboundInterceptor"/>        
            </cxf:outInterceptors>       
        </cxf:cxfEndpoint> 

    <!-- Came route for invoking service with operationName header set  -->

    <route id="iuFooOutboundRoute">
                <from uri="direct-vm:iuOutboundtoFoo"/>     
                <setHeader headerName="operationName" >
                    <constant>FooSync</constant>
                </setHeader>
                <convertBodyTo type="String"/> 
                <!-- Send to Colibrium -->
                <to uri="cxf:bean:abcSOAPCPOutbound?dataFormat=PAYLOAD"/> 
        <process ref="extractHTTPStatusCode"/>
    </route>

如果在调用服务前将camel header设置为SOAPAction,会有什么问题吗?

EN

回答 1

Stack Overflow用户

发布于 2016-06-21 12:40:32

是,

使用与operationName相同的方法:

代码语言:javascript
复制
<setHeader headerName="SOAPAction">
    <constant>DummyOperation</constant>
</setHeader>

你可以在这里参考- http://www.javaworld.com/article/2078883/open-source-tools/java-tip-write-an-soa-integration-layer-with-apache-camel.html?page=4

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37870807

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档