hallikpapa
asked on
Server was unable to process request. ---> Object reference not set to an instance of an object.
I have a simple web service I am trying to consume, but I am getting the error in the subject line.
The results from:
var_dump($client->__getFun ctions());
IS:
array(4) {
[0]=> string(71) "SEServiceCheckResponse SEServiceCheck(SEServiceCh eck $parameters)"
[1]=> string(62) "ReturnFYDatesResponse ReturnFYDates(ReturnFYDate s $parameters)"
[2]=> string(71) "SEServiceCheckResponse SEServiceCheck(SEServiceCh eck $parameters)"
[3]=> string(62) "ReturnFYDatesResponse ReturnFYDates(ReturnFYDate s $parameters)" }
The results from:
var_dump($client->__getFun
IS:
array(4) {
[0]=> string(71) "SEServiceCheckResponse SEServiceCheck(SEServiceCh
[1]=> string(62) "ReturnFYDatesResponse ReturnFYDates(ReturnFYDate
[2]=> string(71) "SEServiceCheckResponse SEServiceCheck(SEServiceCh
[3]=> string(62) "ReturnFYDatesResponse ReturnFYDates(ReturnFYDate
<?php
try {
$client = new SoapClient("SEService.wsdl",
array('trace' => true));
var_dump($client->__getFunctions());
$return = $client->ReturnFYDates('2008');
} catch (SoapFault $exception)
{
echo $exception;
}
?>
////WSDL FILE
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://mydomain.com/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://mydomain.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://mydomain.com/">
<s:element name="SEServiceCheck">
<s:complexType />
</s:element>
<s:element name="SEServiceCheckResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="SEServiceCheckResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ReturnFYDates">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="fiscalyear" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ReturnFYDatesResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ReturnFYDatesResult">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="SEServiceCheckSoapIn">
<wsdl:part name="parameters" element="tns:SEServiceCheck" />
</wsdl:message>
<wsdl:message name="SEServiceCheckSoapOut">
<wsdl:part name="parameters" element="tns:SEServiceCheckResponse" />
</wsdl:message>
<wsdl:message name="ReturnFYDatesSoapIn">
<wsdl:part name="parameters" element="tns:ReturnFYDates" />
</wsdl:message>
<wsdl:message name="ReturnFYDatesSoapOut">
<wsdl:part name="parameters" element="tns:ReturnFYDatesResponse" />
</wsdl:message>
<wsdl:portType name="SEService_pxySoap">
<wsdl:operation name="SEServiceCheck">
<wsdl:input message="tns:SEServiceCheckSoapIn" />
<wsdl:output message="tns:SEServiceCheckSoapOut" />
</wsdl:operation>
<wsdl:operation name="ReturnFYDates">
<wsdl:input message="tns:ReturnFYDatesSoapIn" />
<wsdl:output message="tns:ReturnFYDatesSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SEService_pxySoap" type="tns:SEService_pxySoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="SEServiceCheck">
<soap:operation soapAction="http://mydomain.com/SEServiceCheck" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ReturnFYDates">
<soap:operation soapAction="http://mydomain.com/ReturnFYDates" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="SEService_pxySoap12" type="tns:SEService_pxySoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="SEServiceCheck">
<soap12:operation soapAction="http://mydomain.com/SEServiceCheck" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ReturnFYDates">
<soap12:operation soapAction="http://mydomain.com/ReturnFYDates" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SEService_pxy">
<wsdl:port name="SEService_pxySoap" binding="tns:SEService_pxySoap">
<soap:address location="http://mydomain.com/SEService/SEService_pxy.asmx" />
</wsdl:port>
<wsdl:port name="SEService_pxySoap12" binding="tns:SEService_pxySoap12">
<soap12:address location="http://mydomain.com/SEService/SEService_pxy.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.