Cxf Endpoint开始使用驼峰上下文。我怎么能避免这个?

问题描述 投票:0回答:1

我正在使用CXF端点进行soap web服务。当我的驼峰上下文启动时,检查Web服务是否正在运行。我想改变它,就像当我的路由呼叫CXF端点时,它应该检查我的服务是否正在运行?有任何建议来满足我的要求吗?

CXF Endpoint:  

    <cxf:cxfEndpoint id="accountBalanceServiceEndpoint"
            address="{{wsdlUrlTest}}"
            wsdlURL="{{wsdlUrlTest}}?wsdl"
            serviceName="s:AccountBalanceService"
            endpointName="s:AccountBalancePort"
            xmlns:s="http://soap.test.pqr.abc.com/"> 
            <cxf:properties>
                       <entry key="dataFormat" value="MESSAGE"/>
                    </cxf:properties>
     </cxf:cxfEndpoint> 


 Route:

<route id="SoapService" startupOrder="40">
    <from uri="direct:SoapService" />
            <setHeader headerName="operationNamespace">
              <constant>http://soap.test.pqr.abc.com/</constant>
            </setHeader>
            <setHeader headerName="operationName">
              <constant>getContacts</constant>
            </setHeader>
             <setBody>
                <simple>
                    <![CDATA[
                    <soapenv:Envelope  

                          xmlns:q0="http://soap.test.pqr.abc.com/"  

                          xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"  
                            >  
                          <soapenv:Body>
                            <q0:getContacts> 
                              <arg0>
                                <custId>12345</custId>
                             </arg0>
                            </q0:getContacts>
                          </soapenv:Body>  

                        </soapenv:Envelope> 

                    ]]>
                </simple>
             </setBody>
             <to uri="cxf:bean:accountBalanceServiceEndpoint?defaultOperationName=getContacts" />
    </route>
java web-services soap apache-camel cxf
1个回答
0
投票

在路由启动时,CXF不会检查您正在调用的服务的可用性。 CXF只会在发出请求时建立Http(s)连接。我怀疑您遇到的问题是从您正在调用的服务的端点发现WSDL,在这种情况下,它可能会在CXFEndpoint实例化时建立连接以下载WSDL和模式。

首先下载WSDL和模式并从文件脱机加载而不是使用serviceUrl?WSDL可能对您有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.