SOAP_Client_InsertData.php
| 1 |
<?php
|
|---|---|
| 2 |
/*
|
| 3 |
AUTHOR: Bo?tjan Tittl
|
| 4 |
THIS SCRIPT WAS CREATED ONLY FOR TESTING OF RAFAL INSERTION OF MEASUREMENTS ON SERVER SIDE DATABASE
|
| 5 |
*/
|
| 6 |
|
| 7 |
$xmlString ='<?xml version="1.0" encoding="UTF-8"?> |
| 8 |
<rafaldata>
|
| 9 |
<username>MOXA</username>
|
| 10 |
<password>64cba4c87672aa2ba847bef10f225ded43e5b076</password>
|
| 11 |
<mesurements>
|
| 12 |
<mesurement id="1">
|
| 13 |
<filter>11</filter>
|
| 14 |
<flowrate>1.00</flowrate>
|
| 15 |
<samplingtime>10:00:00</samplingtime>
|
| 16 |
<stoptime>10:00:01</stoptime>
|
| 17 |
<stopdate>2010-01-10</stopdate>
|
| 18 |
<standard>1.00</standard>
|
| 19 |
<operating>1.00</operating>
|
| 20 |
<tam>1.0</tam>
|
| 21 |
<tfm>1.0</tfm>
|
| 22 |
<tim>1.0</tim>
|
| 23 |
<pam>1</pam>
|
| 24 |
<cloggedfilter>1</cloggedfilter>
|
| 25 |
<writedatetime>2011-03-04 17:35:00</writedatetime>
|
| 26 |
</mesurement>
|
| 27 |
<mesurement id="2">
|
| 28 |
<filter>12</filter>
|
| 29 |
<flowrate>2.00</flowrate>
|
| 30 |
<samplingtime>20:00:00</samplingtime>
|
| 31 |
<stoptime>20:00:01</stoptime>
|
| 32 |
<stopdate>2010-01-20</stopdate>
|
| 33 |
<standard>2.00</standard>
|
| 34 |
<operating>2.00</operating>
|
| 35 |
<tam>2.0</tam>
|
| 36 |
<tfm>2.0</tfm>
|
| 37 |
<tim>2.0</tim>
|
| 38 |
<pam>2</pam>
|
| 39 |
<cloggedfilter>2</cloggedfilter>
|
| 40 |
<writedatetime>2011-03-04 17:35:00</writedatetime>
|
| 41 |
</mesurement>
|
| 42 |
</mesurements>
|
| 43 |
</rafaldata>';
|
| 44 |
|
| 45 |
$client = new SoapClient("http://88.200.63.164/webservice/Insert/RafalMeasurements.wsdl"); //CHANGE THIS (TO wsdl FULL PATH ON SERVER) |
| 46 |
echo $client->InsertMeasurement($xmlString); |
| 47 |
?>
|