I need to use XML-RPC protocol from FWH/xHarbour.
Any ideas?
EMG
XML-RPC
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: XML-RPC
Enrico,
This may help:
http://www.tutorialspoint.com/xml-rpc/index.htm
This is a small example of the XML to send to the server to invoque the remote procedure call:
Copied from the above url
This may help:
http://www.tutorialspoint.com/xml-rpc/index.htm
This is a small example of the XML to send to the server to invoque the remote procedure call:
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?>
<methodCall>
<methodName>sample.sum</methodName>
<params>
<param>
<value><int>17</int></value>
</param>
<param>
<value><int>13</int></value>
</param>
</params>
</methodCall>
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: XML-RPC
The server response:
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?>
<methodResponse>
<params>
<param>
<value><int>30</int></value>
</param>
</params>
</methodResponse>
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: XML-RPC
Someone created a class to read/write xml
I not remember but If you search you found
I not remember but If you search you found
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
Re: XML-RPC
Friends,
This simple sample show the PocketSOAP Activex use:
Download and install for http://www.pocketsoap.com
This simple sample show the PocketSOAP Activex use:
Code: Select all
// FiveWin ActiveX support demo - Using PocketSOAP Activex
// José Carlos da Rocha
#include "FiveWin.ch"
function Main(nSkin)
local oWnd, oActiveX
local cXML := "" + ;
"<S:Envelope" + ;
" S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'" + ;
" xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'" + ;
" xmlns:E='http://schemas.xmlsoap.org/soap/encoding/'" + ;
" xmlns:a='http://soap.address.org/'" + ;
" xmlns:b='http://www.w3.org/2001/XMLSchema-instance'" + ;
" xmlns:c='http://www.w3.org/2001/XMLSchema'>" + ;
"<clientes>" + ;
" <numero>123</numero>" + ;
" <rua>R Dr M.M.Mattoso,50</rua>" + ;
" <cidade>Sao Paulo</cidade>" + ;
" <estado>SP</estado>" + ;
" <cep>05171-340</cep>" + ;
" <telefone>" + ;
" <ddd>011</ddd>" + ;
" <numero>3534-3099</numero>" + ;
" </telefone>" + ;
"</clientes>" + ;
"</S:Envelope>"
DEFINE WINDOW oWnd //TITLE "FiveWin ActiveX Support"
oNFe := TOLEAuto():New( "PocketSOAP.Envelope.2" )
oNFe:SetMethod( "NFe", "http://www.portalfiscal.inf.br/nfe" )
oddress := oNFe:Parameters:Create( "clientes", "" )
oddress:Nodes:Create( "numero", "123" )
oddress:Nodes:Create( "rua", "R Dr M.M.Mattoso,50" )
oddress:Nodes:Create( "cidade", "Sao Paulo" )
oddress:Nodes:Create( "estado", "SP" )
oddress:Nodes:Create( "cep", "05171-340" )
oPhone := oddress:Nodes:Create( "telefone", "" )
oPhone:Nodes:Create( "ddd", "011" )
oPhone:Nodes:Create( "numero", "3534-3099" )
esr := oNFe:serialize() // Create a XML source
? "Result:",,esr
adr := oNFe:Parameters:Item(0):Value
? "Variable Cidade:",,adr:Nodes:ItemByName("cidade"):Value
ACTIVATE WINDOW oWnd //ON INIT CodeJockSkin_InitDlg( oDlg, nSkin )
return nil