Page History
Anchor | ||||
---|---|---|---|---|
|
Section | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
WsLogin
Exemple en ASP
Code Block | ||
---|---|---|
| ||
private function ConnectEdb LsUSER = "WSUSER" // Utilisateur Flex LsPSWD = "987654" // Mot de passé de l'utilisateur Flex LsCOMPANY = "DEMO" // Dossier Flex LsVERSION = "109" // Version Webservice LsPRGROOT = "\\Server-ecom\demo\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 chemins 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 CSharp
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); |
Cette fonction renvoie trois paramètres (Path
, Key
, language
). Vous devez ensuite utiliser ces paramètres pour faire appel aux fonctions. WsFlex est déclaré dans les WebRéférences de votre projet qui pointe vers le fichier WSDL de votre web service.
Exemple en PHP
Code Block | ||
---|---|---|
| ||
<?php $client = new SoapClient("http://217.112.181.34/wsflexDotNet/ServiceFlexDotNet.asmx?wsdl",array('soap_version' => SOAP_1_2)); $LsUSER = "WSUSER"; $LsPSWD = "987654"; $LsCOMPANY = "DEMO"; $LsVERSION="109"; $LsPRGROOT="e:\\demo\\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)); //echo 'RESPONSE: ' .$client->__getLastResponse()."<br>"; //echo 'REQUEST : ' . $client->__getLastRequest()."<br>"; } catch (SoapFault $fault) { print_r($fault); throw new Exception($fault->getMessage()); } var_dump($Res); ?> |
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é
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> <col01 type="C">Libellé</col01> <col02 type="M">Valeur</col02> </header> <recs> <rec> <col01>Code client</col01> <col02>WS00000001</col02> </rec> <rec> <col01>Nom</col01> <col02>Colin</col02> </rec> <rec> <col01>Adresse</col01> <col02>Chaussée de Tubize 483<br>BE 1420 Braine l'alleud</col02> </rec> </recs> </headgroup> <headgroup code="L200VAT" description="Totaux"> <header> <ncol>2</ncol> <col01 type="C">Libellé</col01> <col02 type="M">Valeur</col02> </header> <recs> <rec> <col01>Htva</col01> <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
Cette fonction permet de récupérer les informations d'un contact.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <xmlresult> <artId>RADIATOR</artId> </xmlresult> </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 /> <name1>RADIATOR F-11 OIL.</name1> <name2>RADIATOR F-11 OIL</name2> <family /> <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> <nopaydisc>false</nopaydisc> <discount>0</discount> <buyvatpc>0</buyvatpc> <coeffinal>0</coeffinal> <pctarif1>0</pctarif1> <pcsalepric>0</pcsalepric> <options>false</options> <sleep>false</sleep> <buydelay>0</buydelay> <colrange /> <s_repdate /> <buyqty>0</buyqty> <buypack /> <saleqty>0</saleqty> <salepack /> <linkartid /> <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)
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <xmlresult> <email>test@test.be</email> </xmlresult> </VFPData> |
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <curres> <password>123</password> </curres> </VFPData> |
WsGetListQuery
Cette fonction renvoie la liste des requêtes d'un client.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <custid>0100000001</custid> </VFPData> |
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="ISO-8859-1" ?> <VFPData> <xmlreturnlist> <xqueryid>J200000002</xqueryid> <xlib>Historique par date</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> <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> |
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="ISO-8859-1" ?> <VFPData> <header> <ncol>12</ncol> <col01 type="C">jnl</col01> <col02 type="N" dec="0">nr</col02> <col03 type="D">date</col03> <col04 type="C">code</col04> <col05 type="C">couleur</col05> <col06 type="N" dec="1">qté</col06> <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> <col09>0</col09> <col10>30</col10> <col11>13500</col11> <col12 /> </rec> <rec> <col01>BCF</col01> <col02>1000</col02> <col03>28/03/03</col03> <col04>B0002</col04> <col05 /> <col06>405000</col06> <col07>405000</col07> <col08>40</col08> <col09>0</col09> <col10>40</col10> <col11>16200</col11> <col12 /> </rec> <rec> <col01>BLF</col01> <col02>2000</col02> <col03>28/03/03</col03> <col04>B0001</col04> <col05 /> <col06>450000</col06> <col07>0</col07> <col08>30</col08> <col09>0</col09> <col10>30</col10> <col11>13500</col11> <col12 /> </rec> <rec> <col01>BLF</col01> <col02>2000</col02> <col03>28/03/03</col03> <col04>B0002</col04> <col05 /> <col06>405000</col06> <col07>0</col07> <col08>40</col08> <col09>0</col09> <col10>40</col10> <col11>16200</col11> <col12 /> </rec> <rec> <col01>BCF</col01> <col02>3000</col02> <col03>28/03/03</col03> <col04>B0001</col04> <col05 /> <col06>30000</col06> <col07>0</col07> <col08>30</col08> <col09>0</col09> <col10>30</col10> <col11>900</col11> <col12 /> </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> <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 /> <custid>1000000002</custid> <name1>Jeans Remus</name1> <name2>Jeans Remus</name2> <family /> <category>28</category> <coef>1.40</coef> <currid /> <buyprice>24.15</buyprice> <buyprice1>24.15</buyprice1> <buyprice2>24.15</buyprice2> <buyprice3>24.15</buyprice3> ... |
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
Retourne le statut des commandes et notes d'envois d'un client.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <order> <dochead> <thirdid>toto</thirdid> <number>30</number> </dochead> </order> |
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Exemple d'XML reçu
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <xmlreturnstatus> <xdoctype>Order</xdoctype> <xdocnr>30</xdocnr> <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 /> <xartid>BRO2070N</xartid> <xartname>Brother 2070N</xartname> </xmlreturnstatus> <xmlreturnstatus> <xdoctype>Sending note</xdoctype> <xdocnr>4</xdocnr> <xdocorig>42</xdocorig> <xdate>21/04/09 11:59:33 AM</xdate> <xqty>1000</xqty> <xref /> <xartid>MAXHD500</xartid> <xartname>Disque dur 500 Go</xartname> </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
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> <query>SELECT NAME1 FROM ART</query> <table>art</table> </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</name1> </curres> <curres> <name1>MOLDED,VELCRO,ANCHORS 25 MM X 25 M</name1> </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> </curres> </VFPData> |
WsPrDoc
Disponible en Version 107, cette fonction vous donne la possibilité d'imprimer un document en PDF et de l'envoyer par Email.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="Windows-1252" standalone="yes" ?> <VFPData> <jnl>NEC</jnl> <!-- Indique le journal du document. --> <number1>65331</number1> <!-- 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> |
Code Block | ||||
---|---|---|---|---|
| ||||
a |
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> |
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> |
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.
Exemple d'XML envoyé
Code Block | ||||
---|---|---|---|---|
| ||||
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="WINDOWS-1252" standalone="true"?> <VFPData> <xmlresult> <Jnl>ECOM</Jnl> <Number>433</Number> <MailTo>gfau@winbooks.be</MailTo> <Subject>Sujet</Subject> <Body>Body</Body> </xmlresult> </VFPData> |
Code Block | ||||
---|---|---|---|---|
| ||||
a |
Exemple d'XML reçu
Code Block | ||
---|---|---|
| ||
<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?> <VFPData> <curxml> <jnl>ECOM</jnl> <number>433</number> <number1>433</number1> <number2>433</number2> <layoutnumber>0</layoutnumber> <mailto>gfau@winbooks.be</mailto> <subject>Sujet</subject> <body>Sujet</body> <printed>true</printed> </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'?>" & _ "<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) |