Ty44ler
06-21-2010, 04:54 PM
I'm just trying to make a SOAP call that passes one parameter (customerNumber) and prints a dropdown box, but nothing is showing up in the dropdown box.
$client = new SoapClient("http://refrigerantcompliance/RefrigerantComplianceService/Service1.asmx?wsdl", array('cache_wsdl' => 0));
$result = $client->GetWorkOrders("31200");
print "<select name='workorder'><option>Please Select One</option>";
foreach($result as $k=>$v){
print "<option value=\"".$v->SRPWOHRID."\">".$v->SRPWOHRID." - ".$v->Description."</option>";
}
print "</select><br />";
WSDL File:
<wsdl:definitions targetNamespace="http://tempuri.org/">
−
<wsdl:types>
−
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
−
<s:element name="HelloWorld">
<s:complexType/>
</s:element>
−
<s:element name="HelloWorldResponse">
−
<s:complexType>
−
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
−
<s:element name="GetJobs">
<s:complexType/>
</s:element>
−
<s:element name="GetJobsResponse">
−
<s:complexType>
−
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetJobsResult" type="tns:ArrayOfJobDAO"/>
</s:sequence>
</s:complexType>
</s:element>
−
<s:complexType name="ArrayOfJobDAO">
−
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="JobDAO" nillable="true" type="tns:JobDAO"/>
</s:sequence>
</s:complexType>
−
<s:complexType name="JobDAO">
−
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="StatusCode" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="SRPWOHRID" type="s:int"/>
<s:element minOccurs="1" maxOccurs="1" name="CompanyNumber" type="s:int"/>
<s:element minOccurs="1" maxOccurs="1" name="DivisionNumber" type="s:int"/>
<s:element minOccurs="1" maxOccurs="1" name="CustomerNumber" type="s:int"/>
<s:element minOccurs="1" maxOccurs="1" name="RequestNo" type="s:int"/>
<s:element minOccurs="0" maxOccurs="1" name="RequestorName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="AreaCode" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="PhoneNo" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Address1" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Address2" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="City" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="StateCode" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="ZipCode" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="RequestType" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="CustomerPONumber" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string"/>
</s:sequence>
</s:complexType>
</s:schema>
</wsdl:types>
−
<wsdl:message name="HelloWorldSoapIn">
<wsdl:part name="parameters" element="tns:HelloWorld"/>
</wsdl:message>
−
<wsdl:message name="HelloWorldSoapOut">
<wsdl:part name="parameters" element="tns:HelloWorldResponse"/>
</wsdl:message>
−
<wsdl:message name="GetJobsSoapIn">
<wsdl:part name="parameters" element="tns:GetJobs"/>
</wsdl:message>
−
<wsdl:message name="GetJobsSoapOut">
<wsdl:part name="parameters" element="tns:GetJobsResponse"/>
</wsdl:message>
−
<wsdl:portType name="Service1Soap">
−
<wsdl:operation name="HelloWorld">
<wsdl:input message="tns:HelloWorldSoapIn"/>
<wsdl:output message="tns:HelloWorldSoapOut"/>
</wsdl:operation>
−
<wsdl:operation name="GetJobs">
<wsdl:input message="tns:GetJobsSoapIn"/>
<wsdl:output message="tns:GetJobsSoapOut"/>
</wsdl:operation>
</wsdl:portType>
−
<wsdl:binding name="Service1Soap" type="tns:Service1Soap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
−
<wsdl:operation name="HelloWorld">
<soap:operation soapAction="http://tempuri.org/HelloWorld" style="document"/>
−
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
−
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
−
<wsdl:operation name="GetJobs">
<soap:operation soapAction="http://tempuri.org/GetJobs" 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="Service1Soap12" type="tns:Service1Soap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
−
<wsdl:operation name="HelloWorld">
<soap12:operation soapAction="http://tempuri.org/HelloWorld" style="document"/>
−
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
−
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
−
<wsdl:operation name="GetJobs">
<soap12:operation soapAction="http://tempuri.org/GetJobs" 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="Service1">
−
<wsdl:port name="Service1Soap" binding="tns:Service1Soap">
<soap:address location="http://sqlsvr1/RefrigerantComplianceService/Service1.asmx"/>
</wsdl:port>
−
<wsdl:port name="Service1Soap12" binding="tns:Service1Soap12">
<soap12:address location="http://sqlsvr1/RefrigerantComplianceService/Service1.asmx"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
var_dump($result); resulted in:
object(stdClass)#1 (1) {
["GetWorkOrdersResult"]=>
object(stdClass)#3 (0) {
}
}
Does anyone know what I'm doing wrong?
$client = new SoapClient("http://refrigerantcompliance/RefrigerantComplianceService/Service1.asmx?wsdl", array('cache_wsdl' => 0));
$result = $client->GetWorkOrders("31200");
print "<select name='workorder'><option>Please Select One</option>";
foreach($result as $k=>$v){
print "<option value=\"".$v->SRPWOHRID."\">".$v->SRPWOHRID." - ".$v->Description."</option>";
}
print "</select><br />";
WSDL File:
<wsdl:definitions targetNamespace="http://tempuri.org/">
−
<wsdl:types>
−
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
−
<s:element name="HelloWorld">
<s:complexType/>
</s:element>
−
<s:element name="HelloWorldResponse">
−
<s:complexType>
−
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
−
<s:element name="GetJobs">
<s:complexType/>
</s:element>
−
<s:element name="GetJobsResponse">
−
<s:complexType>
−
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetJobsResult" type="tns:ArrayOfJobDAO"/>
</s:sequence>
</s:complexType>
</s:element>
−
<s:complexType name="ArrayOfJobDAO">
−
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="JobDAO" nillable="true" type="tns:JobDAO"/>
</s:sequence>
</s:complexType>
−
<s:complexType name="JobDAO">
−
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="StatusCode" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="SRPWOHRID" type="s:int"/>
<s:element minOccurs="1" maxOccurs="1" name="CompanyNumber" type="s:int"/>
<s:element minOccurs="1" maxOccurs="1" name="DivisionNumber" type="s:int"/>
<s:element minOccurs="1" maxOccurs="1" name="CustomerNumber" type="s:int"/>
<s:element minOccurs="1" maxOccurs="1" name="RequestNo" type="s:int"/>
<s:element minOccurs="0" maxOccurs="1" name="RequestorName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="AreaCode" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="PhoneNo" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Address1" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Address2" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="City" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="StateCode" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="ZipCode" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="RequestType" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="CustomerPONumber" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string"/>
</s:sequence>
</s:complexType>
</s:schema>
</wsdl:types>
−
<wsdl:message name="HelloWorldSoapIn">
<wsdl:part name="parameters" element="tns:HelloWorld"/>
</wsdl:message>
−
<wsdl:message name="HelloWorldSoapOut">
<wsdl:part name="parameters" element="tns:HelloWorldResponse"/>
</wsdl:message>
−
<wsdl:message name="GetJobsSoapIn">
<wsdl:part name="parameters" element="tns:GetJobs"/>
</wsdl:message>
−
<wsdl:message name="GetJobsSoapOut">
<wsdl:part name="parameters" element="tns:GetJobsResponse"/>
</wsdl:message>
−
<wsdl:portType name="Service1Soap">
−
<wsdl:operation name="HelloWorld">
<wsdl:input message="tns:HelloWorldSoapIn"/>
<wsdl:output message="tns:HelloWorldSoapOut"/>
</wsdl:operation>
−
<wsdl:operation name="GetJobs">
<wsdl:input message="tns:GetJobsSoapIn"/>
<wsdl:output message="tns:GetJobsSoapOut"/>
</wsdl:operation>
</wsdl:portType>
−
<wsdl:binding name="Service1Soap" type="tns:Service1Soap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
−
<wsdl:operation name="HelloWorld">
<soap:operation soapAction="http://tempuri.org/HelloWorld" style="document"/>
−
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
−
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
−
<wsdl:operation name="GetJobs">
<soap:operation soapAction="http://tempuri.org/GetJobs" 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="Service1Soap12" type="tns:Service1Soap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
−
<wsdl:operation name="HelloWorld">
<soap12:operation soapAction="http://tempuri.org/HelloWorld" style="document"/>
−
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
−
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
−
<wsdl:operation name="GetJobs">
<soap12:operation soapAction="http://tempuri.org/GetJobs" 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="Service1">
−
<wsdl:port name="Service1Soap" binding="tns:Service1Soap">
<soap:address location="http://sqlsvr1/RefrigerantComplianceService/Service1.asmx"/>
</wsdl:port>
−
<wsdl:port name="Service1Soap12" binding="tns:Service1Soap12">
<soap12:address location="http://sqlsvr1/RefrigerantComplianceService/Service1.asmx"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
var_dump($result); resulted in:
object(stdClass)#1 (1) {
["GetWorkOrdersResult"]=>
object(stdClass)#3 (0) {
}
}
Does anyone know what I'm doing wrong?