Cannot consume PHP SOAP service

  • Thread starter Thread starter Eddie Shipman
  • Start date Start date
E

Eddie Shipman

Guest
I have a PHP Zend SOAP service where we use AutoDiscover to generate the wsdl below:


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="https://partstrader.u-r-g.com/PartsTradersvc.php?wsdl"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="XML Schema"
xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap12="WSDL 1.1 Binding Extension for SOAP 1.2" name="PartsTrader" targetNamespace="https://partstrader.u-r-g.com/PartsTradersvc.php?wsdl">
<types>
<xsd:schema targetNamespace="https://partstrader.u-r-g.com/PartsTradersvc.php?wsdl">
<xsd:element name="ProcurementAddRq">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="request" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ProcurementAddRqResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ProcurementAddRqResult" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
<portType name="PartsTraderPort">
<operation name="ProcurementAddRq">
<documentation>
Function to return the inventory for the passed request.
</documentation>
<input message="tns:ProcurementAddRqIn"/>
<output message="tns:ProcurementAddRqOut"/>
</operation>
</portType>
<binding name="PartsTraderBinding" type="tns:PartsTraderPort">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="ProcurementAddRq">
<soap:operation soapAction="https://partstrader.u-r-g.com/PartsTradersvc.php?wsdl#ProcurementAddRq"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="PartsTraderService">
<port name="PartsTraderPort" binding="tns:PartsTraderBinding">
<soap:address location="https://partstrader.u-r-g.com/PartsTradersvc.php?wsdl"/>
</port>
</service>
<message name="ProcurementAddRqIn">
<part name="parameters" element="tns:ProcurementAddRq"/>
</message>
<message name="ProcurementAddRqOut">
<part name="parameters" element="tns:ProcurementAddRqResponse"/>
</message>
</definitions>


Now, using this service from a PHP client poses no problems whatsoever. However, our customer is using a .Net client and were getting 500 exceptions on the service side. PHP, for some reason is not logging this 500 exception, either.

I cannot "discover" the service methods form a .Net client I'm writing to test. Although it is old, the tutorial at sanity-free.org is supposed to work , I'm using VS2017.

When I try to add a reference to the PHP service using Visual Studio 2017, I can't get it added. If I enter in the "Address" bar of the Add Service reference dialog and click Go, I get this:
An error (details) occurred while attempting to find services at 'http://localhost/server.php?wsdl'
This is the details:
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Now, if I click the Advanced button and then the Add Web Reference button, enter the URL in the URL area and click the green button, It never 'discovers" any service methods in the "Web services found at this URL" listbox.

Is there something special I need to do to this service to be accessible from a .net client? How do I "Retrieve the LoaderExceptions" so I can see what the problem is?

Continue reading...
 
Back
Top