Page History
...
Section | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<msg> correspond à un message explicatif. La balise <transacid> contient l'ID de la transaction. Et la balise <retrycount> contient la valeur du compteur d’essais.Le timeout est définit à 40 secondes pour un
A partir de ce point, le site web peut interroger à nouveau le web service grâce à la nouvelle fonction Cette fonction utilise la même structure que les autres fonctions
Cette fonction va rechercher si un problème est survenu dans le processus ou si une réponse a été générée entre temps. Au bout de 20 secondes, si le processus n'a pas retourné de résultat alors le même XML timeout que précédemment est retourné avec la valeur du Dans le cas où une réponse a été générée, ce résultat est retourné.
|
WsLogin
Cette fonction WsLogin
renvoie trois paramètres (Path
, Key
, language
). Vous devez ensuite utiliser ces 3 paramètres pour faire appel aux autres fonctions du webservice.
Exemple en ASP
Code Block | ||
---|---|---|
| ||
private function ConnectEdb
LsUSER = "WSUSER" // Utilisateur Logistics
LsPSWD = "987654" // Mot de passé de l'utilisateur Logistics
LsCOMPANY = "DEMO" // Nom du dossier Logistics
LsVERSION = "109" // Version du webservice
LsPRGROOT = "\\server\winbooks\data\logistics\" // Chemin où se trouve le plugin (utilisé par le web service). Attention, comme le web service peut se trouver sur un autre serveur que celui des pages du site, il faut impérativement lui envoyer un chemin UNC. Le chemin dans le fichier Logistics.ini doit également être un chemin UNC.
LsCTRL = "<?xml version = '1.0' encoding='Windows-1252' standalone='yes'?>" & _
"<VFPData><login>" & _
"<userid>" & LsUSER & "</userid>" & _
"<pswd>" & LsPSWD & "</pswd>" & _
"<compid>" & LsCOMPANY & "</compid>" & _
"<version>" & LsVERSION & "</version>" & _
"<PrgRoot>" & LsPRGROOT & "</PrgRoot></login></VFPData>"
set soapclient = CreateObject("MSSOAP.SoapClient30")
soapclient.ClientProperty("ServerHTTPRequest") = True
soapclient.mssoapinit(WSPath)
Lsresult = soapclient.login (LsCTRL)
set oLogin = new clsLogin
oLogin.XmlLoginResponse = LsResult
session("edb_Path") = oLogin.DbPath
session("edb_Key") = oLogin.DbKey
session("edb_Lang") = oLogin.Language
|
Exemple en C#
Code Block | ||
---|---|---|
| ||
String lsValue = "";
String lsName = "";
String LsCTRL = "<?xml version = '1.0' encoding='Windows-1252' standalone='yes'?>" +
"<VFPData><login>" +
"<userid>" + psUSER + "</userid>" +
"<pswd>" + psPSWD + "</pswd>" +
"<compid>" + psCOMPANY + "</compid>" +
"<version>" + psVERSION + "</version>" +
"<PrgRoot>" + psPRGROOT + "</PrgRoot></login></VFPData>";
WsFlex ws = new WsFlex("");
psResultLogin = ws.LOGIN(LsCTRL);
|
En C#, WsFlex doit être déclaré dans les WebRéférences de votre projet qui pointe vers le fichier WSDL de votre webservice.
Exemple en PHP
Code Block | ||
---|---|---|
| ||
<?php
// 1. Initialisation
$client = new SoapClient("http://217.112.181.34/wsflexDotNet/ServiceFlexDotNet.asmx?wsdl", array('soap_version' => SOAP_1_2));
$LsUSER = "WSUSER"; // Utilisateur Logistics
$LsPSWD = "987654"; // Mot de passé de l'utilisateur Logistics
$LsCOMPANY = "DEMO"; // Nom du dossier Logistics
$LsVERSION = "109"; // Version du webservice
$LsPRGROOT = "\\server\winbooks\data\logistics\\";
$LsCTRL = "<?xml version = '1.0' encoding='Windows-1252' standalone='yes' ?>
<VFPData>
<login>
<userid>".$LsUSER."</userid>
<pswd>".$LsPSWD."</pswd>
<compid>".$LsCOMPANY."</compid>
<version>".$LsVERSION. "</version>
<PrgRoot>".$LsPRGROOT."</PrgRoot>
</login>
</VFPData>";
try
{
$params = array("PcCtrl" => $LsCTRL);
$Res = $client->__call('Login', array("parameter" => $params));
$language = "F";
$dbpath = $LsPRGROOT."".$LsCOMPANY."\\";
$dbkey = $Res->LOGINResult;
//echo 'RESPONSE: ' .$client->__getLastResponse()."<br>";
//echo 'REQUEST : ' . $client->__getLastRequest()."<br>";
}
catch (SoapFault $fault)
{
print_r($fault);
throw new Exception($fault->getMessage());
}
// 2. Request
$xmlFile = '<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<custid>WS00000003</custid>
</xmlreturn>
</VFPData>';
try
{
$param = array("PcFunc" => "WsGetCustInfo", "PcPath" => $dbpath, "PcKey" => $dbkey, "PcLang" => $language, "Pcxmlheader" => "a", "pcxmlfile" => $xmlFile, "pcxmlfooter" => "a");
$cust = $client->__call("WsRequest", array("parameter" => $param));
var_dump($cust);
}
catch (SoapFault $fault)
{
print_r($fault);
throw new Exception($fault->getMessage());
}
?>
|
WsGetLogin
Warning |
---|
Dans toutes les versions inférieures à la version 5.5, le mot de passe ne doit pas dépasser 20 caractères. A partir de la version 5.5, il n'y a plus de limitation du nombre de caractères dans le mot de passe. |
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlresult>
<chkmail>jfcu@spiritsystems.be</chkmail>
<pswd>123</pswd>
</xmlresult>
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<name>Fauquet Sprl.</name>
<name2>Fauquet Geoffrey</name2>
<adrname />
<adrname2 />
<adrstreet />
<adrstreet2 />
<adrcountry />
<adrzip />
<adrcity />
<adrfax />
<adrphone />
<adrphone2 />
<userid />
<email />
<civility />
<title />
<customer>true</customer>
<supplyer>false</supplyer>
<groupid>WS00000001</groupid>
<custid>P-WS00000003</custid>
<custtype />
<vat />
<vatcountry />
<discount>0</discount>
<saledelay>0</saledelay>
<paydelay />
<paydisc>0</paydisc>
<other>false</other>
<paymode />
<web>true</web>
<webpsw />
<webwhere />
<points>0</points>
<errornr>ERROR 0</errornr>
<language />
<dbkey />
<logmessage>Consumer is correct</logmessage>
<displayinventory>0</displayinventory>
<u_test />
<c_prenom>John.</c_prenom>
<c_num>18</c_num>
<ana1 />
</xmlreturn>
</VFPData>
|
WsManageCustomer
Cette fonction permet d'ajouter ou de modifier un client.
Si aucun Custid n'est indiqué, le client sera alors créé sinon il sera modifié
Warning |
---|
Le mot de passe ne doit pas dépasser 20 caractères. |
Exemple d'appel en CSharp
Code Block | ||
---|---|---|
| ||
TextBox_XmlResult.Text = ws.WsRequest("WSMANAGECUSTOMER", TextBox_XmlHeaderSend.Text, TextBox_XmlFileSend.Text, TextBox_XmlFooterSend.Text);
|
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlresult>
<name>Fauquet Sprl</name>
<name2>Fauquet Geoffrey</name2>
</xmlresult>
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<custid>C-WS00000003</custid>
<userid />
<accountid />
<groupid>WS00000003</groupid>
<name>Fauquet Sprl</name>
<name2>Fauquet Geoffrey</name2>
<adrstreet />
<adrzip />
<adrcity />
<adrphone />
<adrphone2 />
<adrfax />
<language />
<vat />
<memo />
<vatid />
<s_deleted>false</s_deleted>
<s_credate>2008-02-26T10:46:07</s_credate>
<s_moddate>2008-02-26T10:53:08</s_moddate>
<custtype />
<currid />
<agent />
<artcateg />
<artcoef>0</artcoef>
<bankname />
<banknr />
<paydelay />
<paymode />
<paydisc>0.0</paydisc>
<credfile />
<credamount>0</credamount>
<crednote />
<priority />
<fullline>false</fullline>
<situation />
<transport />
<ca>0</ca>
<bankparam />
<tarif>0</tarif>
<ana1 />
<ana2 />
<adrcountry />
<stkid />
<adrname />
<adrname2 />
<title />
<supplyer>false</supplyer>
<customer>true</customer>
<extref />
<importid />
<other>false</other>
<custaccid />
<discount>0</discount>
<currid2 />
<adrstreet2 />
<invstreet2 />
<vatcountry />
<email />
<website />
<buyvatid />
<saledelay>0</saledelay>
<s_repdate />
<blocktype>0</blocktype>
<blockwhen>0</blockwhen>
<blockmax>0</blockmax>
<codexpgrp />
<copycount>0</copycount>
<invpos>false</invpos>
<invartgrp>false</invartgrp>
<amtfranco>0</amtfranco>
<artport />
<vatcat />
<modified>false</modified>
<civility />
<web>false</web>
<webpsw />
<webwhere />
<webdispinv>0</webdispinv>
<forecolor />
<gdisc>0</gdisc>
<u_test />
<s_creuid />
<s_moduid />
</xmlreturn>
</VFPData>
|
WsGetCustInfo
Cette fonction permet d'avoir les informations d'un client.
Exemple en ASP
Code Block | ||
---|---|---|
| ||
set soapclient = CreateObject("MSSOAP.SoapClient30")
soapclient.ClientProperty("ServerHTTPRequest") = True
soapclient.mssoapinit(WSPath)
LSresult = soapclient.wsrequest ("WSGETCUSTINFO",LsPath,LsKey,LsLang,"a",LsXMLFile,"a")
|
Exemple d'appel en CSharp
Code Block | ||
---|---|---|
| ||
ws.WsRequest(PcProcName, pPath, pKey, pLang, pcXmlHeader, pcXmlFile, pcXmlFooter);
|
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<custid>C-WS00000001</custid>
</xmlreturn>
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<custid>WS00000316</custid>
<userid />
<accountid />
<groupid>WS000316</groupid>
<name>Spirit Systems sprl</name>
<name2>Cuylits Jean-François.</name2>
<adrstreet>Fond Jean Paques 6C</adrstreet>
<adrzip>1438</adrzip>
<adrcity>Louvain-La-Neuve</adrcity>
<adrphone>010 45 12 44</adrphone>
<adrphone2>0475 78 82 57</adrphone2>
<adrfax />
<language>F</language>
<vat>04737.109.813</vat>
<memo />
<vatid />
<s_deleted>false</s_deleted>
<s_credate />
<s_moddate />
<custtype />
<currid />
<agent />
<artcateg />
<artcoef>0</artcoef>
<bankname />
<banknr />
<paydelay />
<paymode />
<paydisc>0.0</paydisc>
<credfile />
<credamount>0</credamount>
<crednote />
<priority />
<fullline>false</fullline>
<situation />
<transport />
<ca>0</ca>
<bankparam />
<tarif>0</tarif>
<ana1 />
<adrcountry>BE</adrcountry>
<stkid />
<adrname />
<adrname2 />
<title>Monsieur</title>
<supplyer>false</supplyer>
<customer>false</customer>
<extref />
<importid />
<other>false</other>
<custaccid />
<discount>0</discount>
<currid2 />
<adrstreet2 />
<invstreet2 />
<vatcountry>BE</vatcountry>
<email>jfcu@spiritsystems.be</email>
<website />
<buyvatid />
<saledelay>0</saledelay>
<s_repdate />
<blocktype>0</blocktype>
<blockwhen>0</blockwhen>
<blockmax>0</blockmax>
<codexpgrp />
<copycount>0</copycount>
<invpos>false</invpos>
<invartgrp>false</invartgrp>
<vatcat />
<modified>false</modified>
<civility />
<web>false</web>
<webpsw>123</webpsw>
<webwhere />
<webdispinv>0</webdispinv>
<forecolor />
<gdisc>0</gdisc>
<u_test />
<s_creuid />
<s_moduid />
</xmlreturn>
</VFPData>
|
WsGetPrice_Stock
Cette fonction permet d'avoir le prix pour un article donné ainsi que le nombre d'article total et par stock spécifié.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<Customer>
<custid>C-0100000009</custid>
</Customer>
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<articles>
<article>
<artid>C2</artid>
<color />
<size />
</article>
<warehouses>
<Warehouse>A</Warehouse>
<Warehouse>B</Warehouse>
</warehouses>
</articles>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<vatinc>.T.</vatinc>
<xmlreturnst>
<xartid>C2</xartid>
<xcolor />
<xsize />
<xwarehouse>
<Xname>A</Xname>
<Qty>5000</Qty>
</xwarehouse>
<xwarehouse>
<Xname>B</Xname>
<Qty>3000</Qty>
</xwarehouse>
<xqty>8000</xqty>
<xprice>0</xprice>
<xstkinday>0</xstkinday>
<xremark>x</xremark>
</xmlreturnst>
</VFPData>
|
WsGetDeliveryAdress
Cette fonction permet d'avoir les adresses de livraisons d'un client.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<custid>C-WS00000001</custid>
</xmlreturn>
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<name>Geo SPRL.</name>
<adrstreet>Place du charbonnage, 2</adrstreet>
<adrstreet2>Trazegnies</adrstreet2>
<adrzip>6183</adrzip>
<adrcity>Trazegnies</adrcity>
<adrcountry>BE</adrcountry>
<persid>P-WS00000001</persid>
</xmlreturn>
</VFPData>
|
WsGetContacts
Cette fonction permet d'avoir les contacts d'un client
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<custid>C-WS00000001</custid>
</xmlreturn>
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<name>Geo SPRL.</name>
<adrstreet>Place du charbonnage, 2</adrstreet>
<adrstreet2>Trazegnies</adrstreet2>
<adrzip>6183</adrzip>
<adrcity>Trazegnies</adrcity>
<adrcountry>BE</adrcountry>
<persid>P-WS00000001</persid>
</xmlreturn>
<xmlreturn>
<name>Test</name>
<adrstreet>Rue du bois</adrstreet>
<adrstreet2>Drogenbos</adrstreet2>
<adrzip>1000</adrzip>
<adrcity>Bruxelles</adrcity>
<adrcountry />
<persid>P-WS00000002</persid>
</xmlreturn>
</VFPData>
|
WsManageContact
Cette fonction permet d'ajouter ou de modifier un contact. Pour cela, il faut envoyer le custID du client visé. Si le persid est spécifié et existant, alors le contact sera modifié sinon il sera ajouté.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<name>Spirit Systems sprl.</name>
<name2>Cuylits Jean-François.</name2>
<adrstreet>Fond Jean Paques 6C</adrstreet>
<adrstreet2 />
<adrcountry>BE</adrcountry>
<adrzip>1438</adrzip>
<adrcity>Louvain-La-Neuve</adrcity>
<adrfax />
<adrphone>010 45 12 44</adrphone>
<adrphone2>0475 78 82 57</adrphone2>
<email>jfcu@spiritsystems.be</email>
<title>Monsieur</title>
<vat>0437.109.813</vat>
<vatcountry>BE</vatcountry>
<web>true</web>
<webpsw>123</webpsw>
<language>F</language>
<CustId>C-WS00000001</CustId>
<persid>P-WS00000003</persid>
</xmlreturn>
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<name>Geo SPRL.</name>
<adrstreet>Place du charbonnage, 2</adrstreet>
<adrstreet2>Trazegnies</adrstreet2>
<adrzip>6183</adrzip>
<adrcity>Trazegnies</adrcity>
<adrcountry>BE</adrcountry>
<persid>P-WS00000001</persid>
</xmlreturn>
<xmlreturn>
<name>Test</name>
<adrstreet>Rue du bois</adrstreet>
<adrstreet2>Drogenbos</adrstreet2>
<adrzip>1000</adrzip>
<adrcity>Bruxelles</adrcity>
<adrcountry />
<persid>P-WS00000002</persid>
</xmlreturn>
</VFPData>
|
WsCheckOrder - WsPutOrder
Cette fonction permet de voir si l'ajout d'une commande est possible. Si oui, on peut utiliser WsPutOrder pour créer le document. Le header contient les champs correspondants aux informations du client et le File contient le détail de la commande.
Exemple d'XML envoyé
|
WsLogin
Cette fonction WsLogin
renvoie trois paramètres (Path
, Key
, language
). Vous devez ensuite utiliser ces 3 paramètres pour faire appel aux autres fonctions du webservice.
Exemple en ASP
Code Block | ||
---|---|---|
| ||
private function ConnectEdb
LsUSER = "WSUSER" // Utilisateur Logistics
LsPSWD = "987654" // Mot de passé de l'utilisateur Logistics
LsCOMPANY = "DEMO" // Nom du dossier Logistics
LsVERSION = "109" // Version du webservice
LsPRGROOT = "\\server\winbooks\data\logistics\" // Chemin où se trouve le plugin (utilisé par le web service). Attention, comme le web service peut se trouver sur un autre serveur que celui des pages du site, il faut impérativement lui envoyer un chemin UNC. Le chemin dans le fichier Logistics.ini doit également être un chemin UNC.
LsCTRL = "<?xml version = '1.0' encoding='Windows-1252' standalone='yes'?>" & _
"<VFPData><login>" & _
"<userid>" & LsUSER & "</userid>" & _
"<pswd>" & LsPSWD & "</pswd>" & _
"<compid>" & LsCOMPANY & "</compid>" & _
"<version>" & LsVERSION & "</version>" & _
"<PrgRoot>" & LsPRGROOT & "</PrgRoot></login></VFPData>"
set soapclient = CreateObject("MSSOAP.SoapClient30")
soapclient.ClientProperty("ServerHTTPRequest") = True
soapclient.mssoapinit(WSPath)
Lsresult = soapclient.login (LsCTRL)
set oLogin = new clsLogin
oLogin.XmlLoginResponse = LsResult
session("edb_Path") = oLogin.DbPath
session("edb_Key") = oLogin.DbKey
session("edb_Lang") = oLogin.Language
|
Exemple en C#
Code Block | ||
---|---|---|
| ||
String lsValue = "";
String lsName = "";
String LsCTRL = "<?xml version = '1.0' encoding='Windows-1252' standalone='yes'?>" +
"<VFPData><login>" +
"<userid>" + psUSER + "</userid>" +
"<pswd>" + psPSWD + "</pswd>" +
"<compid>" + psCOMPANY + "</compid>" +
"<version>" + psVERSION + "</version>" +
"<PrgRoot>" + psPRGROOT + "</PrgRoot></login></VFPData>";
WsFlex ws = new WsFlex("");
psResultLogin = ws.LOGIN(LsCTRL);
|
En C#, WsFlex doit être déclaré dans les WebRéférences de votre projet qui pointe vers le fichier WSDL de votre webservice.
Exemple en PHP
Code Block | ||||
---|---|---|---|---|
| ||||
<?php
// 1. Initialisation
$client = new SoapClient("http://217.112.181.34/wsflexDotNet/ServiceFlexDotNet.asmx?wsdl", array('soap_version' => SOAP_1_2));
$LsUSER = "WSUSER"; // Utilisateur Logistics
$LsPSWD = "987654"; // Mot de passé de l'utilisateur Logistics
$LsCOMPANY = "DEMO"; // Nom du dossier Logistics
$LsVERSION = "109"; // Version du webservice
$LsPRGROOT = "\\server\winbooks\data\logistics\\";
$LsCTRL = "<?xml version = '1.0' encoding='Windows-1252' standalone='yes' ?>
<VFPData>
<login>
<userid>".$LsUSER."</userid>
<pswd>".$LsPSWD."</pswd>
<compid>".$LsCOMPANY."</compid>
<version>".$LsVERSION. "</version>
<PrgRoot>".$LsPRGROOT."</PrgRoot>
</login>
</VFPData>";
try
{
$params = array("PcCtrl" => $LsCTRL);
$Res = $client->__call('Login', array("parameter" => $params));
$language = "F";
$dbpath = $LsPRGROOT."".$LsCOMPANY."\\";
$dbkey = $Res->LOGINResult;
//echo 'RESPONSE: ' .$client->__getLastResponse()."<br>";
//echo 'REQUEST : ' . $client->__getLastRequest()."<br>";
}
catch (SoapFault $fault)
{
print_r($fault);
throw new Exception($fault->getMessage());
}
// 2. Request
$xmlFile = ' | ||||
Code Block | ||||
| ||||
<?xml version="1.0" encoding="ISO-8859-1Windows-1252" standalone="yes" ?> <VFPData> <order> <docdet> <thirdid>P-WS00000002</thirdid> <thirdname>Colin</thirdname> <basis1>1140490</basis1> <vatid1>21</vatid1> <vatpc1>21</vatpc1> <vatamt1>239503</vatamt1> <basis2 /> <vatid2 /> <vatpc2 /> <vatamt2 /> <basis3 /> <vatid3 /> <vatpc3 /> <vatamt3 /> <topay>1379993</topay> </docdet> </order> <xmlreturn> <custid>WS00000003</custid> </xmlreturn> </VFPData>'; try { $param = array("PcFunc" => "WsGetCustInfo", "PcPath" => $dbpath, "PcKey" => $dbkey, "PcLang" => $language, "Pcxmlheader" => "a", "pcxmlfile" => $xmlFile, "pcxmlfooter" => "a"); $cust = $client->__call("WsRequest", array("parameter" => $param)); var_dump($cust); } catch (SoapFault $fault) { print_r($fault); throw new Exception($fault->getMessage()); } ?> |
WsGetLogin
Warning |
---|
Dans toutes les versions inférieures à la version 5.5, le mot de passe ne doit pas dépasser 20 caractères. A partir de la version 5.5, il n'y a plus de limitation du nombre de caractères dans le mot de passe. |
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="ISO-8859-1Windows-1252" standalone="yes" ?> <order> <docdet> <artid>DELL1700</artid> <artname>Dell 1700</artname> <qty>1000</qty> <unitprice>561980</unitprice> <amount>561980</amount> <vatid>21</vatid> <vatpc>21</vatpc> </docdet> <docdet> <artid>HPLASERCOLOR3000</artid> <artname>HP Color LaserJet 3000</artname> <qty>1000</qty> <unitprice>578510</unitprice> <amount>578510</amount> <vatid>21</vatid> <vatpc>21</vatpc> </docdet> </order><VFPData> <xmlresult> <chkmail>jfcu@spiritsystems.be</chkmail> <pswd>123</pswd> </xmlresult> </VFPData> |
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="ISO-8859-1Windows-1252" standalone="yes" ?> <VFPData> <returncode>OK</returncode> <Xorderid>382</Xorderid> <headgroups> <headgroup code="L100FAC" description="Coordonnées de facturation"> <xmlreturn> <name>Fauquet Sprl.</name> <name2>Fauquet Geoffrey</name2> <adrname /> <adrname2 /> <adrstreet /> <adrstreet2 /> <adrcountry /> <adrzip /> <header> <adrcity /> <ncol>2</ncol> <adrfax /> <col01 type="C">Libellé</col01><adrphone /> <col02 type="M">Valeur</col02><adrphone2 /> <userid /> </header> <email /> <recs> <civility /> <rec> <title /> <col01>Code client<<customer>true</col01>customer> <supplyer>false</supplyer> <col02>WS00000001<<groupid>WS00000001</col02>groupid> <custid>P-WS00000003</custid> <custtype </rec>> <vat /> <rec> <vatcountry /> <col01>Nom<<discount>0</col01>discount> <saledelay>0</saledelay> <paydelay <col02>Colin</col02>> <paydisc>0</paydisc> <<other>false</rec>other> <paymode /> <rec> <web>true</web> <webpsw <col01>Adresse</col01>> <webwhere /> <col02>Chaussée<points>0</points> de Tubize 483<br>BE 1420 Braine<errornr>ERROR l'alleud<0</col02>errornr> <language /> </rec> <dbkey /> </recs> <logmessage>Consumer is <correct</headgroup>logmessage> <headgroup code="L200VAT" description="Totaux"><displayinventory>0</displayinventory> <u_test /> <header> <c_prenom>John.</c_prenom> <ncol>2</ncol><c_num>18</c_num> <ana1 /> <col01 type="C">Libellé</col01> <col02 type="M">Valeur</col02> </header> <recs> <rec> <col01>Htva</col01></xmlreturn> </VFPData> |
WsManageCustomer
Cette fonction permet d'ajouter ou de modifier un client.
Si aucun Custid n'est indiqué, le client sera alors créé sinon il sera modifié
Warning |
---|
Le mot de passe ne doit pas dépasser 20 caractères. |
Exemple d'appel en CSharp
Code Block | ||
---|---|---|
| ||
TextBox_XmlResult.Text = ws.WsRequest("WSMANAGECUSTOMER", TextBox_XmlHeaderSend.Text, TextBox_XmlFileSend.Text, TextBox_XmlFooterSend.Text);
|
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <xmlresult> <name>Fauquet Sprl</name> <name2>Fauquet Geoffrey</name2> <col02>942.56</col02> </rec> <rec> <col01>Tva</col01> <col02>197.94</col02> </rec> <rec> <col01>A payer</col01> <col02>1140.50</col02> </rec> <rec> <col01>Devise</col01> <col02>EUR</col02> </rec> </recs> </headgroup> </headgroups> <body> <header> <ncol>7</ncol> <col01 type="C">code</col01> <col02 type="C">description</col02> <col03 type="N" dec="1">quantité</col03> <col04 type="N" dec="2">prix</col04> <col05 type="N" dec="2">remise</col05> <col06 type="N" dec="2">htva</col06> <col07 type="C">color</col07> </header> <recs> <rec> <col01>DELL1700</col01> <col02>Dell 1700</col02> <col03>1000</col03> <col04>561980</col04> <col05>0</col05> <col06>464450</col06> <col07 /> </rec> <rec> <col01>HPLASERCOLOR3000</col01> <col02>HP Color LaserJet 3000</col02> <col03>1000</col03> <col04>578510</col04> <col05>0</col05> <col06>478110</col06> <col07 /> </rec> </recs> </body> </VFPData> |
WsGetArtInfo
...
</xmlresult>
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<custid>C-WS00000003</custid>
<userid />
<accountid />
<groupid>WS00000003</groupid>
<name>Fauquet Sprl</name>
<name2>Fauquet Geoffrey</name2>
<adrstreet />
<adrzip />
<adrcity />
<adrphone />
<adrphone2 />
<adrfax />
<language />
<vat />
<memo />
<vatid />
<s_deleted>false</s_deleted>
<s_credate>2008-02-26T10:46:07</s_credate>
<s_moddate>2008-02-26T10:53:08</s_moddate>
<custtype />
<currid />
<agent />
<artcateg />
<artcoef>0</artcoef>
<bankname />
<banknr />
<paydelay />
<paymode />
<paydisc>0.0</paydisc>
<credfile />
<credamount>0</credamount>
<crednote />
<priority />
<fullline>false</fullline>
<situation />
<transport />
<ca>0</ca>
<bankparam />
<tarif>0</tarif>
<ana1 />
<ana2 />
<adrcountry />
<stkid />
<adrname />
<adrname2 />
<title />
<supplyer>false</supplyer>
<customer>true</customer>
<extref />
<importid />
<other>false</other>
<custaccid />
<discount>0</discount>
<currid2 />
<adrstreet2 />
<invstreet2 />
<vatcountry />
<email />
<website />
<buyvatid />
<saledelay>0</saledelay>
<s_repdate />
<blocktype>0</blocktype>
<blockwhen>0</blockwhen>
<blockmax>0</blockmax>
<codexpgrp />
<copycount>0</copycount>
<invpos>false</invpos>
<invartgrp>false</invartgrp>
<amtfranco>0</amtfranco>
<artport />
<vatcat />
<modified>false</modified>
<civility />
<web>false</web>
<webpsw />
<webwhere />
<webdispinv>0</webdispinv>
<forecolor />
<gdisc>0</gdisc>
<u_test />
<s_creuid />
<s_moduid />
</xmlreturn>
</VFPData>
|
WsGetCustInfo
Cette fonction permet d'avoir les informations d'un client.
Exemple en ASP
Code Block | ||
---|---|---|
| ||
set soapclient = CreateObject("MSSOAP.SoapClient30")
soapclient.ClientProperty("ServerHTTPRequest") = True
soapclient.mssoapinit(WSPath)
LSresult = soapclient.wsrequest ("WSGETCUSTINFO",LsPath,LsKey,LsLang,"a",LsXMLFile,"a")
|
Exemple d'appel en CSharp
Code Block | ||
---|---|---|
| ||
ws.WsRequest(PcProcName, pPath, pKey, pLang, pcXmlHeader, pcXmlFile, pcXmlFooter);
|
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <xmlresult><xmlreturn> <artId>RADIATOR<<custid>C-WS00000001</artId>custid> </xmlresult>xmlreturn> </VFPData> |
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <cres> <artid>RADIATOR</artid> <buyartid /> <custid ?> <VFPData> <xmlreturn> <custid>WS00000316</custid> <userid /> <accountid /> <groupid>WS000316</groupid> <name>Spirit Systems sprl</name> <name2>Cuylits Jean-François.</name2> <adrstreet>Fond Jean Paques 6C</adrstreet> <adrzip>1438</adrzip> <adrcity>Louvain-La-Neuve</adrcity> <adrphone>010 45 12 44</adrphone> <adrphone2>0475 78 82 57</adrphone2> <adrfax /> <name1>RADIATOR F-11 OIL.</name1><language>F</language> <name2>RADIATOR F-11 OIL</name2><vat>04737.109.813</vat> <family<memo /> <category<vatid /> <coef>0</coef><s_deleted>false</s_deleted> <currid<s_credate /> <s_moddate <buyprice>0</buyprice>> <buydate<custtype /> <currid <saleprice>0</saleprice>> <stock>0<<agent /stock>> <artcateg <minqty>0</minqty>> <maxqty>0<<artcoef>0</maxqty>artcoef> <unit<bankname /> <banknr <vatid>21</vatid>> <ana1>PIECE<<paydelay /ana1>> <paymode <ana2>AUTOS</ana2>> <ana3>CITROEN<<paydisc>0.0</ana3>paydisc> <ana4<credfile /> <memo>Information du produit</memo><credamount>0</credamount> <s_credate>2008-01-08T14:52:52</s_credate> <s_moddate>2008-02-07T14:56:32</s_moddate><crednote /> <priority /> <coeftarif1>0<<fullline>false</coeftarif1>fullline> <situation <saletarif1>0</saletarif1>> <transport <expenses>0</expenses>> <nostock>false<<ca>0</nostock>ca> <bankparam <artpart>false</artpart>> <compound>false<<tarif>0</compound>tarif> <qtypackby>0<<ana1 /qtypackby>> <finalprice>0<<adrcountry>BE</finalprice>adrcountry> <stkid <packkg>0</packkg>> <notinhist>false<<adrname /notinhist>> <adrname2 <stocktype>1</stocktype>> <kg>0<<title>Monsieur</kg>title> <buyvatid <supplyer>false</>supplyer> <buydisc>0<<customer>false</buydisc>customer> <extref <saledisc>0</saledisc>> <artaccid<importid /> <actualval>0<<other>false</actualval>other> <nopaydisc>false<<custaccid /nopaydisc>> <discount>0</discount> <currid2 <buyvatpc>0</buyvatpc>> <coeffinal>0</coeffinal> <pctarif1>0</pctarif1><adrstreet2 /> <pcsalepric>0</pcsalepric> <options>false</options><invstreet2 /> <sleep>false<<vatcountry>BE</sleep>vatcountry> <buydelay>0<<email>jfcu@spiritsystems.be</buydelay>email> <colrange<website /> <s_repdate<buyvatid /> <buyqty>0<<saledelay>0</buyqty>saledelay> <buypack<s_repdate /> <saleqty>0<<blocktype>0</saleqty>blocktype> <salepack <blockwhen>0</>blockwhen> <linkartid <blockmax>0</>blockmax> <codexpgrp <linkqty>0</linkqty>> <linkqtyfix>false<<copycount>0</linkqtyfix>copycount> <compotype>4<<invpos>false</compotype>invpos> <valuetype>0<<invartgrp>false</valuetype>invartgrp> <proqty>0</proqty> <web>true</web><vatcat /> <webpromo>false<<modified>false</webpromo>modified> <civility <webnew>false</webnew>> <webmonth>false<<web>false</webmonth>web> <webmsg1 <webpsw>123</>webpsw> <webmsg2<webwhere /> <memo1 <webdispinv>0</>webdispinv> <memo2<forecolor /> <webviewlev>3<<gdisc>0</webviewlev>gdisc> <u_test <webstockok>0</webstockok>> <s_creuid <packcost>0</packcost>> <forecolor<s_moduid /> <weborder>0</weborder> <vatid2 /> <vatid3 /> <buyvatid2 /> <buyvatid3 /> <expensetyp>0</expensetyp> <u_format /> <u_grammage /> <c_proprio /> <c_categ /> <c_format /> <c_millesim</xmlreturn> </VFPData> |
WsGetPrice_Stock
Cette fonction permet d'avoir le prix pour un article donné ainsi que le nombre d'article total et par stock spécifié.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<Customer>
<custid>C-0100000009</custid>
</Customer>
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <articles> <article> <artid>C2</artid> <color /> <c_url <size /> <disp>0<</disp> article> <c_pdv>false</c_pdv> <warehouses> <c_recomp <Warehouse>A</>Warehouse> <a_stock /> <s_creuid>SYSTEM</s_creuid> <s_moduid>SYSTEM</s_moduid> <Warehouse>B</Warehouse> </cres>warehouses> </VFPData> |
WsGetPasswordFromEmail
Cette fonction permet de récupérer un mot de passé par rapport au login (adresse email)
...
articles>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <vatinc>.T.</vatinc> <xmlreturnst> <xartid>C2</xartid> <xcolor /> <xmlresult><xsize /> <xwarehouse> <Xname>A</Xname> <email>test@test.be<<Qty>5000</email>Qty> </xmlresult> </VFPData> |
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <curres>xwarehouse> <xwarehouse> <Xname>B</Xname> <Qty>3000</Qty> </xwarehouse> <xqty>8000</xqty> <xprice>0</xprice> <xstkinday>0</xstkinday> <password>123<<xremark>x</password>xremark> </curres>xmlreturnst> </VFPData> |
...
WsGetDeliveryAdress
Cette fonction renvoie la liste des requêtes permet d'avoir les adresses de livraisons d'un client.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <xmlreturn> <custid>0100000001<<custid>C-WS00000001</custid> </xmlreturn> </VFPData> | ||||
Code Block | ||||
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="ISO-8859-1Windows-1252" standalone="yes" ?> <VFPData> <xmlreturnlist> <xqueryid>J200000002</xqueryid> <xlib>Historique par date</xlib> <paras> <para> <id>querydate1</id> <name1>A partir de</name1> <xmlreturn> <name>Geo <type>date</type>SPRL.</name> <adrstreet>Place du <mandatory>.F.</mandatory>charbonnage, 2</adrstreet> <adrstreet2>Trazegnies</adrstreet2> <<adrzip>6183</para>adrzip> <adrcity>Trazegnies</adrcity> <para> <adrcountry>BE</adrcountry> <id>querydate2<<persid>P-WS00000001</id>persid> <name1>jusqu'à</name1> <type>date</type> <mandatory>.F.</mandatory> </para> </paras> </xmlreturnlist> <xmlreturnlist> <xqueryid>0900000001</xqueryid> <xlib>STAT DE LIVRAISON</xlib> <paras> <para> <id>querydate1</id> <name1>A partir de</name1> <type>date</type> <mandatory>.F.</mandatory> </para> <para> <id>querydate2</id> <name1>jusqu'à</name1> <type>date</type> <mandatory>.F.</mandatory> </para> </paras> </xmlreturnlist> </VFPData> |
WsGetQuery
Cette fonction renvoie le résultat de la requête (récupérée par WsGetListQuery
) d'un client.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<query_asked>
<queryid>J200000002</queryid>
<custid>C-0100000001</custid>
<artid />
<QueryDate1>01-01-2008</QueryDate1>
<QueryDate2>30-12-2009</QueryDate2>
</query_asked>
</VFPData>
|
</xmlreturn>
</VFPData>
|
WsGetContacts
Cette fonction permet d'avoir les contacts d'un client
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<custid>C-WS00000001</custid>
</xmlreturn>
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<name>Geo SPRL.</name>
<adrstreet>Place du charbonnage, 2</adrstreet>
<adrstreet2>Trazegnies</adrstreet2>
<adrzip>6183</adrzip>
<adrcity>Trazegnies</adrcity>
<adrcountry>BE</adrcountry>
<persid>P-WS00000001</persid>
</xmlreturn>
<xmlreturn>
<name>Test</name>
<adrstreet>Rue du bois</adrstreet>
<adrstreet2>Drogenbos</adrstreet2>
<adrzip>1000</adrzip>
<adrcity>Bruxelles</adrcity>
<adrcountry />
<persid>P-WS00000002</persid>
</xmlreturn>
</VFPData>
|
WsManageContact
Cette fonction permet d'ajouter ou de modifier un contact. Pour cela, il faut envoyer le custID du client visé. Si le persid est spécifié et existant, alors le contact sera modifié sinon il sera ajouté.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<xmlreturn>
<name>Spirit Systems sprl.</name>
<name2>Cuylits Jean-François.</name2>
<adrstreet>Fond Jean Paques 6C</adrstreet>
<adrstreet2 />
<adrcountry>BE</adrcountry>
<adrzip>1438</adrzip>
<adrcity>Louvain-La-Neuve</adrcity>
<adrfax />
<adrphone>010 45 12 44</adrphone>
<adrphone2>0475 78 82 57</adrphone2>
<email>jfcu@spiritsystems.be</email>
<title>Monsieur</title>
<vat>0437.109.813</vat>
<vatcountry>BE</vatcountry>
<web>true</web>
<webpsw>123</webpsw>
<language>F</language>
<CustId>C-WS00000001</CustId>
<persid>P-WS00000003</persid>
</xmlreturn>
</VFPData> | ||||
Code Block | ||||
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="ISO-8859-1Windows-1252" standalone="yes" ?> <VFPData> <header> <xmlreturn> <name>Geo SPRL.</name> <adrstreet>Place du charbonnage, 2</adrstreet> <adrstreet2>Trazegnies</adrstreet2> <adrzip>6183</adrzip> <ncol>12<<adrcity>Trazegnies</ncol>adrcity> <col01 type="C">jnl</col01><adrcountry>BE</adrcountry> <col02 type="N" dec="0">nr</col02> <persid>P-WS00000001</persid> </xmlreturn> <xmlreturn> <col03 type="D">date</col03><name>Test</name> <adrstreet>Rue <col04 type="C">code</col04>du bois</adrstreet> <col05 type="C">couleur</col05><adrstreet2>Drogenbos</adrstreet2> <col06 type="N" dec="1">qté</col06><adrzip>1000</adrzip> <adrcity>Bruxelles</adrcity> <adrcountry /> <persid>P-WS00000002</persid> </xmlreturn> </VFPData> |
WsCheckOrder - WsPutOrder
Cette fonction permet de voir si l'ajout d'une commande est possible. Si oui, on peut utiliser WsPutOrder pour créer le document. Le header contient les champs correspondants aux informations du client et le File contient le détail de la commande.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
<order>
<docdet>
<thirdid>P-WS00000002</thirdid>
<thirdname>Colin</thirdname>
<basis1>1140490</basis1>
<vatid1>21</vatid1>
<vatpc1>21</vatpc1>
<vatamt1>239503</vatamt1>
<basis2 />
<vatid2 />
<vatpc2 />
<vatamt2 />
<basis3 />
<vatid3 />
<vatpc3 />
<vatamt3 />
<topay>1379993</topay>
</docdet>
</order>
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
<order>
<docdet>
<artid>DELL1700</artid>
<artname>Dell 1700</artname>
<qty>1000</qty>
<unitprice>561980</unitprice>
<amount>561980</amount>
<vatid>21</vatid>
<vatpc>21</vatpc>
</docdet>
<docdet>
<artid>HPLASERCOLOR3000</artid>
<artname>HP Color LaserJet 3000</artname>
<qty>1000</qty>
<unitprice>578510</unitprice>
<amount>578510</amount>
<vatid>21</vatid>
<vatpc>21</vatpc>
</docdet>
</order>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="ISO-8859-1" ?> <VFPData> <returncode>OK</returncode> <Xorderid>382</Xorderid> <headgroups> <headgroup code="L100FAC" description="Coordonnées de facturation"> <header> <ncol>2</ncol><col07 type="N" dec="1">livré</col07> <col08 type="N" dec="2">pu</col08> <col09 type="N" dec="2">remise</col09> <col10 type="N" dec="2">net</col10> <col11 type="N" dec="2">montant</col11> <col12 type="C">devise</col12> </header> <recs> <rec> <col01>BCA</col01> <col02>4000</col02> <col03>01/08/08</col03> <col04>000.LV.501.32</col04> <col05 /> <col06>12000</col06> <col07>0</col07> <col08>59000</col08> <col09>0</col09> <col10>59000</col10> <col11>708000</col11> <col12 /> </rec> <rec> <col01>BCF</col01> <col02>1000</col02> <col03>28/03/03</col03> <col04>B0001</col04> <col05 /> <col06>450000</col06> <col07>450000</col07> <col08>30</col08> <col01 type="C">Libellé</col01> <col09>0</col09><col02 type="M">Valeur</col02> <col10>30<</col10> header> <col11>13500</col11> <recs> <col12 /> <rec> </rec> <rec> <col01>Code client</col01> <col01>BCF</col01> <col02>1000<<col02>WS00000001</col02> <col03>28/03/03</col03> </rec> <col04>B0002</col04> <rec> <col05 /> <col01>Nom</col01> <col06>405000</col06> <col07>405000<<col02>Colin</col07>col02> <col08>40<</col08>rec> <col09>0</col09> <rec> <col10>40<<col01>Adresse</col10>col01> <col11>16200</col11> <col02>Chaussée de Tubize 483<br>BE 1420 <col12Braine l'alleud</>col02> </rec> <rec></rec> <col01>BLF<</col01> recs> <col02>2000</col02> </headgroup> <headgroup <col03>28/03/03</col03> code="L200VAT" description="Totaux"> <col04>B0001</col04><header> <col05 <ncol>2</>ncol> <col06>450000</col06> <col01 type="C">Libellé</col01> <col07>0</col07> <col08>30</col08><col02 type="M">Valeur</col02> <col09>0<</col09> header> <col10>30</col10><recs> <col11>13500</col11> <rec> <col12 /> </rec><col01>Htva</col01> <rec> <col01>BLF<<col02>942.56</col01>col02> <col02>2000<</col02>rec> <col03>28/03/03</col03> <rec> <col04>B0002</col04> <col01>Tva</col01> <col05 /> <col06>405000<<col02>197.94</col06>col02> <col07>0<</col07>rec> <col08>40</col08> <rec> <col09>0</col09> <col01>A <col10>40<payer</col10>col01> <col11>16200</col11> <col02>1140.50</col02> <col12 /> </rec> <rec> <rec> <col01>BCF</col01> <col02>3000<<col01>Devise</col02>col01> <col03>28/03/03</col03> <col04>B0001</col04><col02>EUR</col02> <col05 </> rec> <col06>30000<</col06> recs> <col07>0</col07> </headgroup> <col08>30</col08> </headgroups> <body> <col09>0</col09> <header> <col10>30<<ncol>7</col10>ncol> <col11>900</col11><col01 type="C">code</col01> <col12 /><col02 type="C">description</col02> </rec> </recs> </VFPData> |
WsArtGetItems
Cette fonction renvoie toutes les informations des articles cochés exportables sur le Web.
Ceci est bien sur un exemple, vous pouvez modifier la condition WEB = .T.
avec la condition que vous cherchez à avoir.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <sql> <pccond>WEB = .T.</pccond> <pnFrom>0</pnFrom> <col03 type="N" dec="1">quantité</col03> <col04 type="N" dec="2">prix</col04> <col05 type="N" dec="2">remise</col05> <pnCount>0</pnCount> </sql> </VFPData> |
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <curres> <artid>02W.MC.REMUS</artid> <buyartid /><col06 type="N" dec="2">htva</col06> <col07 type="C">color</col07> </header> <recs> <rec> <col01>DELL1700</col01> <col02>Dell 1700</col02> <col03>1000</col03> <custid>1000000002</custid> <col04>561980</col04> <name1>Jeans Remus<<col05>0</name1>col05> <name2>Jeans Remus<<col06>464450</name2>col06> <family <col07 /> <category>28<</category>rec> <coef>1.40</coef> <rec> <currid <col01>HPLASERCOLOR3000</>col01> <buyprice>24.15</buyprice> <col02>HP Color LaserJet <buyprice1>24.15<3000</buyprice1>col02> <buyprice2>24.15</buyprice2> <buyprice3>24.15</buyprice3><col03>1000</col03> ... |
WsArtGetArtIdComp
Cette fonction renvoie tous les ArtId
des composant d'un article.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<artid>DELL1700</artid>
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<cres>
<artpartid>MAXHD500</artpartid>
</cres>
</VFPData>
|
WsGetOrderStatus
<col04>578510</col04>
<col05>0</col05>
<col06>478110</col06>
<col07 />
</rec>
</recs>
</body>
</VFPData>
|
WsGetArtInfo
Cette fonction permet de récupérer les informations d'un contactRetourne le statut des commandes et notes d'envois d'un client.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <order><VFPData> <dochead><xmlresult> <thirdid>toto</thirdid> <number>30</number><artId>RADIATOR</artId> </dochead>xmlresult> </order>VFPData> |
Code Block | ||||
---|---|---|---|---|
| ||||
a
| ||||
Code Block | ||||
| ||||
a |
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ? ?> <VFPData> <cres> <artid>RADIATOR</artid> <buyartid /> <VFPData> <xmlreturnstatus> <custid /> <name1>RADIATOR <xdoctype>Order</xdoctype>F-11 OIL.</name1> <name2>RADIATOR F-11 <xdocnr>30<OIL</xdocnr>name2> <family /> <xdocorig>-</xdocorig> <xdate>21/04/09 11:59:23 AM</xdate> <xqty>1000</xqty> <xref /> <xartid>BRO2070N</xartid> <xartname>Brother 2070N</xartname> </xmlreturnstatus> <xmlreturnstatus> <xdoctype>Order</xdoctype> <xdocnr>30</xdocnr> <xdocorig>-</xdocorig> <xdate>21/04/09 11:59:23 AM</xdate> <xqty>1000</xqty> <xref /> <xartid>MAXHD500</xartid> <xartname>Disque dur 500 Go</xartname> </xmlreturnstatus> <xmlreturnstatus> <xdoctype>Sending note</xdoctype> <xdocnr>4</xdocnr> <xdocorig>41</xdocorig> <xdate>21/04/09 11:59:33 AM</xdate> <xqty>1000</xqty> <xref <category /> <coef>0</coef> <currid /> <buyprice>0</buyprice> <buydate /> <saleprice>0</saleprice> <stock>0</stock> <minqty>0</minqty> <maxqty>0</maxqty> <unit /> <vatid>21</vatid> <ana1>PIECE</ana1> <ana2>AUTOS</ana2> <ana3>CITROEN</ana3> <ana4 /> <memo>Information du produit</memo> <s_credate>2008-01-08T14:52:52</s_credate> <s_moddate>2008-02-07T14:56:32</s_moddate> <coeftarif1>0</coeftarif1> <saletarif1>0</saletarif1> <expenses>0</expenses> <nostock>false</nostock> <artpart>false</artpart> <compound>false</compound> <qtypackby>0</qtypackby> <finalprice>0</finalprice> <packkg>0</packkg> <notinhist>false</notinhist> <stocktype>1</stocktype> <kg>0</kg> <buyvatid /> <buydisc>0</buydisc> <saledisc>0</saledisc> <artaccid /> <actualval>0</actualval> <xartid>BRO2070N< <nopaydisc>false</xartid>nopaydisc> <discount>0</discount> <xartname>Brother 2070N<<buyvatpc>0</xartname>buyvatpc> <<coeffinal>0</xmlreturnstatus> coeffinal> <xmlreturnstatus> <pctarif1>0</pctarif1> <xdoctype>Sending note<<pcsalepric>0</xdoctype>pcsalepric> <xdocnr>4<<options>false</xdocnr>options> <xdocorig>42<<sleep>false</xdocorig>sleep> <buydelay>0</buydelay> <xdate>21/04/09 11:59:33 AM</xdate> <colrange /> <s_repdate <xqty>1000</xqty>> <buyqty>0</buyqty> <xref<buypack /> <xartid>MAXHD500<<saleqty>0</xartid>saleqty> <xartname>Disque dur 500 Go</xartname><salepack /> <linkartid </xmlreturnstatus> </VFPData> |
WsGetPriceArray
Cette fonction renvoie les prix spécifiques pour un client et un article donné sous forme de tableau.
Elle est disponible à partir du WS_PROC106.
Dans le cas d'un prix spécifique, vous pouvez spécifier le type de prix. Ici, le 4 représente les prix spécifiques par client.
Les 1 sont les prix par catégorie, 2 Prix d'achats...
Si le QtyMax
est égale à 0, cela indique que le Maximum est l'infini.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<artid>TEST</artid>
<custid>C-0100000001</custid>
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<curres>
<qtymin>0.00</qtymin>
<qtymax>3.00</qtymax>
<price>20.83</price>
</curres>
<curres>
<qtymin>3.00</qtymin>
<qtymax>6.00</qtymax>
<price>19.23</price>
</curres>
<curres>
<qtymin>6.00</qtymin>
<qtymax>10.00</qtymax>
<price>18.38</price>
</curres>
<curres>
<qtymin>10.00</qtymin>
<qtymax>0.00</qtymax>
<price>17.12</price>
</curres>
<curres>
<qtymin>0.00</qtymin>
<qtymax>0.00</qtymax>
<price>12.50</price>
</curres>
</VFPData>
|
WsGetStringQuery
/>
<linkqty>0</linkqty>
<linkqtyfix>false</linkqtyfix>
<compotype>4</compotype>
<valuetype>0</valuetype>
<proqty>0</proqty>
<web>true</web>
<webpromo>false</webpromo>
<webnew>false</webnew>
<webmonth>false</webmonth>
<webmsg1 />
<webmsg2 />
<memo1 />
<memo2 />
<webviewlev>3</webviewlev>
<webstockok>0</webstockok>
<packcost>0</packcost>
<forecolor />
<weborder>0</weborder>
<vatid2 />
<vatid3 />
<buyvatid2 />
<buyvatid3 />
<expensetyp>0</expensetyp>
<u_format />
<u_grammage />
<c_proprio />
<c_categ />
<c_format />
<c_millesim />
<c_url />
<disp>0</disp>
<c_pdv>false</c_pdv>
<c_recomp />
<a_stock />
<s_creuid>SYSTEM</s_creuid>
<s_moduid>SYSTEM</s_moduid>
</cres>
</VFPData>
|
WsGetPasswordFromEmail
Cette fonction permet de récupérer un mot de passé par rapport au login (adresse email)Vous envoyez une requête dans le tag <query>
et indiquez le nom des tables (tag <table>
) à ouvrir pour que celle-ci fonctionne, la fonction vous exécute la requête.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <xmlresult> <query>SELECT NAME1 FROM ART<<email>test@test.be</query>email> <table>art<</table> xmlresult> </VFPData> |
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <curres> <name1>CORRECTION PRIX<<password>123</name1>password> </curres> <curres> <name1>MOLDED,VELCRO,ANCHORS 25 MM X 25 M</name1> </curres> <curres></curres> </VFPData> |
WsArtGetItems
Cette fonction renvoie toutes les informations des articles cochés exportables sur le Web.
Ceci est bien sur un exemple, vous pouvez modifier la condition WEB = .T.
avec la condition que vous cherchez à avoir.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <sql> <name1>PARTICIPATION<pccond>WEB FORFAITAIRE AUX FRAIS DE TRANSPORTS</name1> </curres> <curres>= .T.</pccond> <name1>FRAIS DE TRANSPORT 5KGS</name1><pnFrom>0</pnFrom> </curres> <curres> <name1>PARTICIPATION AUX FRAIS D'IMPRESSION TESA NET<<pnCount>0</name1>pnCount> </curres>sql> </VFPData> |
WsPrDoc
...
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML
...
reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <jnl>NEC</jnl> <curres> <artid>02W.MC.REMUS</artid> <buyartid /> <custid>1000000002</custid> <name1>Jeans Remus</name1> <name2>Jeans Remus</name2> <family /> <category>28</category> <coef>1.40</coef> <currid <!-- Indique le journal du document. --> <number1>65331</number1> /> <buyprice>24.15</buyprice> <buyprice1>24.15</buyprice1> <buyprice2>24.15</buyprice2> <buyprice3>24.15</buyprice3> <!-- Indique le document à imprimer. --> <layout>invoice modern 2.FRX</layout > <!-- Layout à utiliser. --> <DestEmail>gfau@winbooks.be</DestEmail> <!-- Adresse email de destination (s'il n'est pas mentionné, aucun mail n'est envoyé). --> <fromname>Name for email</fromname> <!-- Nom de l'émetteur. --> <frommail>info@winbooks.be</frommail> <!-- Adresse Email de l'émetteur. --> <msgsubject>Subjet</msgsubject> <!-- Sujet du mail envoyé. --> <msgcontent>Contenu</msgcontent> <!-- Contenu du mail envoyé. --> <pdfname>winbooks</pdfname> <!-- Nom du PDF généré. --> <layoutnumber>4</ layoutnumber > <!-- Indique le numéro du layout à utiliser. --> <keeppdf>true</keeppdf> <!-- Est-ce que le PDF doit être supprimé après l'envoi du mail. --> </VFPData> ... |
WsArtGetArtIdComp
Cette fonction renvoie tous les ArtId
des composant d'un article.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<artid>DELL1700</artid>
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<cres>
<artpartid>MAXHD500</artpartid>
</cres>
</VFPData>
|
WsGetPriceArray
Cette fonction renvoie les prix spécifiques pour un client et un article donné sous forme de tableau.
Elle est disponible à partir du WS_PROC106.
Dans le cas d'un prix spécifique, vous pouvez spécifier le type de prix. Ici, le 4 représente les prix spécifiques par client.
Les 1 sont les prix par catégorie, 2 Prix d'achats...
Si le QtyMax
est égale à 0, cela indique que le Maximum est l'infini.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<artid>TEST</artid>
<custid>C-0100000001</custid>
</VFPData> | ||||
Code Block | ||||
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <curres> <qtymin>0.00</qtymin> <qtymax>3.00</qtymax> <result>Ok<<price>20.83</result>price> </curres> </VFPData> |
WsChangeYourRef
Disponible en Version 106 et supérieure, cette fonction vous donne la possibilité de modifier le contenu du champ référence YourRef d'un document.
S'il n'y a que le number qui est indiqué, le journal sera le journal par défaut de l'E-Commerce.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<number>3</number> <!-- Numéro du document. -->
<reference>OGONES</reference> <!-- Référence à modifier. -->
<jnl>BCC</jnl> <!-- Journal visé. -->
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <curres> <result>Ok</result> <curres> <qtymin>3.00</qtymin> <qtymax>6.00</qtymax> <price>19.23</price> </curres> <curres> <qtymin>6.00</qtymin> <qtymax>10.00</qtymax> <price>18.38</price> </curres> <curres> <qtymin>10.00</qtymin> <qtymax>0.00</qtymax> <price>17.12</price> </curres> <curres> <qtymin>0.00</qtymin> <qtymax>0.00</qtymax> <price>12.50</price> </curres> </VFPData> |
WsPrDoc2
Disponible en version 108 et supérieure.
Cette fonction permet d'imprimer des documents et de les envoyer par Mail.
Le paramétrage d'envois de mail doit bien sûr être fait dans Logistics.
WsGetStringQuery
Vous envoyez une requête dans le tag <query>
et indiquez le nom des tables (tag <table>
) à ouvrir pour que celle-ci fonctionne, la fonction vous exécute la requête.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="WINDOWSWindows-1252" standalone="trueyes" ?> <VFPData> <xmlresult> <query>SELECT NAME1 FROM <Jnl>ECOM</Jnl> <Number>433</Number>ART</query> <MailTo>gfau@winbooks.be</MailTo> <Subject>Sujet</Subject> <Body>Body</Body> </xmlresult><table>art</table> </VFPData> |
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version = "1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <curxml><curres> <jnl>ECOM</jnl> <number>433</number> <number1>433</number1><name1>CORRECTION PRIX</name1> <number2>433<</number2>curres> <layoutnumber>0</layoutnumber><curres> <mailto>gfau@winbooks.be</mailto> <subject>Sujet</subject> <body>Sujet</body> <printed>true</printed><name1>MOLDED,VELCRO,ANCHORS 25 MM X 25 M</name1> </curxml> </VFPData> |
Exemple en ASP
Code Block | ||
---|---|---|
| ||
if (pcSujet="") then pcSujet = "Sujet" End If if (pcBody="") then pcBody = "Body" End If lcXmlHeader = "z" lcXmlFile = "<?xml version = '1.0' encoding='Windows-1252' standalone='yes'?>" & _curres> <curres> <name1>PARTICIPATION FORFAITAIRE AUX FRAIS DE TRANSPORTS</name1> </curres> <curres> <name1>FRAIS DE TRANSPORT 5KGS</name1> </curres> <curres> <name1>PARTICIPATION AUX FRAIS D'IMPRESSION TESA NET</name1> "<VFPData><xmlresult>" & _ "<jnl>" & pcJnl & "</jnl>" & _ "<number1>" & pnNumber & "</number1>" & _ "<number2>" & pnNumber & "</number2>" & _ "<LayoutNumber>1</LayoutNumber>" & _ "<MailTo>" & pcEmail & "</MailTo>" & _ "<Subject>" & pcSujet & "</Subject>" & _ "<Body>" & pcBody & "</Body></xmlresult></VFPData>" lcXmlFooter = "z" strResponse = WSREQUEST("WSPRDOC2",lcPath,lcKey,lcLang,lcXmlHeader, lcXmlFile, lcXmlFooter) </curres> </VFPData> |
WsChangeYourRef
Disponible en Version 106 et supérieure, cette fonction vous donne la possibilité de modifier le contenu du champ référence YourRef d'un document.
S'il n'y a que le number qui est indiqué, le journal sera le journal par défaut de l'E-Commerce.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<number>3</number> <!-- Numéro du document. -->
<reference>OGONES</reference> <!-- Référence à modifier. -->
<jnl>BCC</jnl> <!-- Journal visé. -->
</VFPData>
|
Code Block | ||||
---|---|---|---|---|
| ||||
a
|
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?>
<VFPData>
<curres>
<result>Ok</result>
</curres>
</VFPData>
|