Home »
Imported messages »
comp.lang.php »
problem with web service
problem with web service [message #172715] |
Sun, 27 February 2011 10:43 |
parviz a
Messages: 1 Registered: February 2011
Karma:
|
Junior Member |
|
|
Dear All,
I have a little experience in PHP and so I need to use "Web Service"
because of the using processmaker (BPMS tools) and the Process maker
is based on PHP code. I have programmed following code but
unfortunately the result value is empty. Would you please to lead me
######## PHP code:
<?php
echo '1,';
$client = new SoapClient( 'http://192.168.0.94:8080/DecisionService/ws/
test111ruleapp/4.0/test111/1.0?WSDL');
echo '3,';
$card= array('creditCeilings'=>'45');
$params=array('DecisionID'=>"1",'Card'=>$card);
$result=(array)$client->__SoapCall('executeDecisionService', $params);
echo '<br>=============$result=======================<br>';
var_dump($result);
echo '<br>=============DecisionID====================<br>';
var_dump($result["DecisionID"]);
echo '<br>=============Card==========================<br>';
var_dump((array)$result["Card"]);
echo '<br>========countCard==========================<br>';
var_dump(count((array)$result["Card"]));
echo '<br>=============SoapCall======================<br>';
var_dump((array)$client->__SoapCall('executeDecisionService',
$params));
echo '<br>=============$params=======================<br>';
var_dump($params);
?>
########## result:
1,3,
=============$result=======================
array(4) { ["ilog.rules.outputString"]=> string(0)
"" ["ilog.rules.firedRulesCount"]=> int(0) ["DecisionID"]=> string(36)
"cb37cc0d-6de8-4046-88b1-32c2da1a6874" ["Card"]=> object(stdClass)#111
(0) { } }
=============DecisionID====================
string(36) "cb37cc0d-6de8-4046-88b1-32c2da1a6874"
=============Card==========================
array(0) { }
========countCard==========================
int(0)
=============SoapCall======================
array(4) { ["ilog.rules.outputString"]=> string(0)
"" ["ilog.rules.firedRulesCount"]=> int(0) ["DecisionID"]=> string(36)
"d74a9368-68f9-4f61-b96d-3a38ad66b9dc" ["Card"]=> object(stdClass)#109
(0) { } }
=============$params=======================
array(2) { ["DecisionID"]=> string(1) "1" ["Card"]=> array(1)
{ ["creditCeilings"]=> string(2) "45" } }
########### WSDL:
<definitions targetNamespace="http://www.ilog.com/rules/
DecisionService">
-
<types>
-
<xsd:schema
attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="http://www.ilog.com/rules/DecisionService">
<xsd:import namespace="http://
www.ilog.com/rules/param"/>
-
<xsd:element
name="DecisionServiceRequest">
-
<xsd:complexType>
-
<xsd:sequence>
<xsd:element
maxOccurs="1" minOccurs="0" name="DecisionID" type="xsd:string"/>
<xsd:element
ref="param:Card"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
-
<xsd:element
name="DecisionServiceResponse">
-
<xsd:complexType>
-
<xsd:sequence>
<xsd:element
name="ilog.rules.outputString" type="xsd:string"/>
<xsd:element
name="ilog.rules.firedRulesCount" type="xsd:int"/>
<xsd:element
name="DecisionID" type="xsd:string"/>
<xsd:element
ref="param:Card"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
-
<xsd:element
name="DecisionServiceException">
-
<xsd:complexType>
-
<xsd:sequence>
<xsd:element maxOccurs="1"
minOccurs="1" name="exception" nillable="false" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
-
<xsd:schema
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://www.ilog.com/rules/card">
<xsd:element name="Card"
nillable="true" type="Card"/>
-
<xsd:complexType name="Card">
-
<xsd:sequence>
<xsd:element maxOccurs="1"
minOccurs="1" name="creditCeilings" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
-
<xsd:schema targetNamespace="http://
www.ilog.com/rules/param">
<xsd:import namespace="http://
www.ilog.com/rules/card"/>
-
<xsd:element name="Card">
-
<xsd:complexType>
-
<xsd:sequence>
<xsd:element ref="ns1:Card"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
-
<message name="DecisionServiceSoapResponse">
<part name="parameters"
element="tns:DecisionServiceResponse">
</part>
</message>
-
<message name="DecisionServiceSoapRequest">
<part name="parameters"
element="tns:DecisionServiceRequest">
</part>
</message>
-
<message name="DecisionServiceSoapFault">
<part name="fault"
element="tns:DecisionServiceException">
</part>
</message>
-
<portType name="DecisionServiceTest111">
-
<operation name="executeDecisionService">
<input message="tns:DecisionServiceSoapRequest">
</input>
<output message="tns:DecisionServiceSoapResponse">
</output>
<fault name="DecisionServiceSoapFault"
message="tns:DecisionServiceSoapFault">
</fault>
</operation>
</portType>
-
<binding name="DecisionServiceSOAP"
type="tns:DecisionServiceTest111">
<soap:binding style="document" transport="http://
schemas.xmlsoap.org/soap/http"/>
-
<operation name="executeDecisionService">
<soap:operation soapAction="executeDecisionService"
style="document"/>
-
<input>
<soap:body use="literal"/>
</input>
-
<output>
<soap:body use="literal"/>
</output>
-
<fault name="DecisionServiceSoapFault">
<soap:fault name="DecisionServiceSoapFault"
use="literal"/>
</fault>
</operation>
</binding>
-
<service name="DecisionServiceTest111">
-
<port name="DecisionServiceSOAP192.168.0.94"
binding="tns:DecisionServiceSOAP">
<soap:address location="http://192.168.0.94:8080/
DecisionService/ws/test111ruleapp/4.0/test111/1.0"/>
</port>
</service>
</definitions>
|
|
|
Goto Forum:
Current Time: Tue Nov 26 13:26:41 GMT 2024
Total time taken to generate the page: 0.04382 seconds