2013-10-29 30 views
0

我已經下載了,並且正在嘗試使用WSO2 ESB並使用wsHttpBindings設置WCF服務的代理。當我使用Soap Tracing時,一切正常 - 當我關閉它時,每次都會出現500內部服務器錯誤。我完全堅持這一點,不明白爲什麼會這樣。WSO2 ESB - Soap Tracing關閉時代理不起作用

我已經嘗試設置通過代理和基於WCF的代理服務器,我總是有完全相同的問題 - 與肥皂跟蹤啓用一切看起來不錯,完美的作品。如果我關掉它,否則不碰任何東西,我得到一個500錯誤:

System.ServiceModel.ProtocolException: An HTTP Content-Type header is required for SOAP messaging and none was found. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error. 

我有一個basicHttpBinding的嘗試它,它似乎做工精細用肥皂跟蹤打開或關閉。這個問題似乎只是與wsHttpBindings。

這裏是代理的完整源:

<?xml version="1.0" encoding="UTF-8"?> 
<proxy xmlns="http://ws.apache.org/ns/synapse" 
     name="ContactService" 
     transports="http" 
     statistics="disable" 
     trace="disable" 
     startOnLoad="true"> 
    <target> 
     <outSequence> 
     <send/> 
     </outSequence> 
     <endpoint> 
     <wsdl service="ContactService" 
       port="ContactService_WsHttp" 
       uri="http://localhost/Actions/ContactService.svc?singleWsdl"/> 
     </endpoint> 
    </target> 
    <publishWSDL uri="http://localhost/Actions/ContactService.svc?singleWsdl"/> 
    <description/> 
</proxy> 

回答

0

可以請你嘗試,你正在使用的代理服務器的inSequence中?

謝謝你, 1G

+0

我已經加入了完整的源代碼爲代理原來的問題 - 它是如此奇怪的是,它的工作原理100%,與在啓用SOAP示蹤預期ESB,但是當我關閉它時根本不起作用,我得到了500錯誤!我不認爲示蹤者應該改變ESB的工作方式? – Wiredness

1
我有同樣的問題

,這裏是有問題的代理:這是工作不上3.X跟蹤

<proxy name="cx.partner.usps.RateV4" 
     transports="https http" 
     startOnLoad="true" 
     trace="disable"> 
    <description/> 
    <target> 
    <inSequence> 
     <property name="CONTENT_TYPE" 
        value="application/xml" 
        scope="axis2-client" 
        type="STRING"/> 
     <property name="FORCE_HTTP_1.0" value="true" scope="axis2"/> 
     <log level="full"/> 
     <send> 
      <endpoint key="partner.usps.prd.endpoint"/> 
     </send> 
    </inSequence> 
    <outSequence> 
     <class name="cx.wso2.mediators.addNamespace"> 
      <property name="soapPartName" value=""/> 
      <property name="nsToAdd" value="http://xmlns.usps.com"/> 
     </class> 
     <send/> 
    </outSequence> 
    </target> 
    <publishWSDL key="conf:/esb-resources/wsdl/usps/RateV4.wsdl"> 
    <resource location="RateV4.xsd" key="conf:/esb-resources/schema/usps/RateV4.xsd"/> 
    </publishWSDL> 

,但在遷移到4.7之後,我必須啓用SOAP跟蹤器。

+0

嗨@Wiredness,我與版本4.9.0有同樣的問題,你能找到解決方案嗎? –

0

試試這個,它爲我們工作:

<parameter name="enforceWSAddressing">true</parameter>