2010年3月19日星期五

[fw-webservices] .NET SOAP client not working with ZEND_SOAP server

Hello,

 

To get a data feed from a vendor I am required to implement a SOAP server based on a WSDL that the vendor supplies (I know it sounds a bit backwards, but that is how it is and I have no control over that).

The WSDL obviously gets slightly modified with the correct endpoint and soap action.

The vendor uses a .NET client to access my ZEND_SOAP service and I successfully get the clients request document and am able to process it without problems. My service sends back a response based on the type declared in the WSDL.

 

The vendor’s tech support only has access to this error message: “Missing SOAP response payload

I am trying to get them to escalate this to development but it is a slow process.

 

I have seen numerous posts here that have to do with interop problems between .NET and PHP so I am hoping that someone can help.

 

I have built a PHP client that works just fine with the service. I even downloaded a generic C# client and it can at least see the raw response that comes over the wire so I know that a response is being set (obviously does not process the xml document since it is generic and only for testing purposes).

I have even gone as far as partially bypassing the SOAP server response. I let Zend_Soap_Server::handle() set the headers and then return a canned SOAP document that is straight out of the vendors example response (with the proper namespaces set).

 

I realize that this is a wishy-washy question but am hoping that someone might have had issues with getting a #C client to talk to a Zend_SOAP server. Could it be: HTTP heards, character encoding, line feed of Win vs. Linux (grasping at straws here, I know)?

 

Here is the definition of the response type from the <types> section of the WSDL:

 

<s:element name="TheResponse">

  <s:complexType>

    <s:sequence>

      <s:element name="Result" type="s:string"/>

      <s:element name="Message" type="s:string" minOccurs="0"/>

    </s:sequence>

  </s:complexType>

</s:element>

 

And here is the response document my service returns:

 

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <soap:Body>

    <TheResponse xmlns="namespace of the type declaration is here">

      <Result>Success</Result>

      <Message>Message Value</Message>

    </TheResponse>

  </soap:Body>

</soap:Envelope>

 

Note that the above is the canned response that I am sending back just to see if that would work - It does not!! The actual response generated by Zend_SOAP is the one below and I would think that from an XML syntax standpoint they should be the same:

 

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="namespace of the type declaration is here">

  <SOAP-ENV:Body>

    <ns1:TheResponse>

      <ns1:Result>Success</ns1:Result>

      <ns1:Message>Message Value</ns1:Message>

    </ns1:TheResponse>

  </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

Thanks,

hgg

没有评论: