Wiredness
Wiredness

Reputation: 175

WSO2 ESB - Proxies do not work when Soap Tracing is turned off

I have downloaded and I am trying out the WSO2 ESB and setting up proxies for WCF services with wsHttpBindings. When I have Soap Tracing enabled everything works fine - when I turn it off I get a 500 internal server error every time. I am completely stuck with this and can't understand why this would be.

I have tried setting up both pass through proxies and WCF based proxies and I always have the exact same issue - with Soap Tracing enabled everything looks great and works perfectly. If I turn it off and otherwise don't touch anything I get a 500 error:

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.

I have tried it with a basicHttpBinding and it seems to work fine with Soap Tracing on or off. The problem seems to just be with wsHttpBindings.

Here is the full source for the proxy:

<?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>

Upvotes: 0

Views: 705

Answers (3)

AgnesE
AgnesE

Reputation: 11

Try this, it worked for us:

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

Upvotes: 0

sbrissen
sbrissen

Reputation: 11

I am having the same issue, here is the proxy that is having issues:

<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>

This was working without tracing on 3.x, but after migrating to 4.7 I have to enable the SOAP tracer.

Upvotes: 1

Vanji
Vanji

Reputation: 1704

can you please try with in the inSequence of the proxy that your are using?

thank you, 1G

Upvotes: 1

Related Questions