Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-08

Parsing XML from MS SQL webservice using fpc

8 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Nataraj S Narayan

Hi

The following URL gives me a XML output in any browser , after validating username and password:-

http://"Some IP
address"/handheld?sql=select+*+from+branchdesc+for+xml+auto&root=my-mssql-database

This connects to a remote MS SQL server based web service , may be using MIcrosoft IIS server.

Can i use "fcl-xml" package to send the query and then parse the xml output?

regards

Nataraj

Reply by email

Nataraj S Narayan
to Graeme Geldenhuys

Hi Graeme

May I have a lttle help? Didn't find any examples in fpc/packages/fcl-xml.

Need to know if anything special needs to be done to connect to underlying SQL server? Or is it purely a webservice?

How do I specify username and password?

regards

Nataraj

Graeme Geldenhuys wrote 18 lines
Nataraj S Narayan wrote: > > Can i use "fcl-xml" package to send the query and then parse the xml output? If the return result is xml, I can't see why not. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Graeme Geldenhuys
to Nataraj S Narayan
Nataraj S Narayan wrote
May I have a lttle help? Didn't find any examples in fpc/packages/fcl-xml.

Oh, I wasn't sure if you simply wanted to parse the returned xml, or if you wanted to talk to Web Service. Anyway, here is some links you might want to take a look at.

http://wiki.lazarus.freepascal.org/Web_Service_Toolkit http://wiki.lazarus.freepascal.org/XML_Tutorial
http://wiki.lazarus.freepascal.org/Networking

Hope that helps.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Henry Vermaak
to Nataraj S Narayan: Hi The following URL gives me a XML output in any browser , after validating username…

2009/8/26 Nataraj S Narayan :

Show quoted text 12 lines
Hi The following URL gives me a XML output  in any browser , after validating username and password:-  http://"Some IP address"/handheld?sql=select+*+from+branchdesc+for+xml+auto&root=my-mssql-database This connects to a remote MS SQL server based web service , may be using MIcrosoft IIS server. Can i use "fcl-xml" package to send the query and then parse the xml output?

Why don't you query the sql server directly?

Henry

Reply by email

Nataraj S Narayan
to Henry Vermaak

Hi

The customer want it that way. May be don't like to expose Sql server to the world.
ITC of wrong validation, browser shows:-

ERROR: 401 Access Denied
HResult: 0x80046000
Source: Microsoft SQL isapi extension
Description: Access denied

regards

Nataraj

Henry Vermaak wrote 21 lines
2009/8/26 Nataraj S Narayan : > Hi > > The following URL gives me a XML output in any browser , after > validating username and password:- > > http://"Some IP > address"/handheld?sql=select+*+from+branchdesc+for+xml+auto&root=my-mssql-database > > This connects to a remote MS SQL server based web service , may be > using MIcrosoft IIS server. > > Can i use "fcl-xml" package to send the query and then parse the xml output? Why don't you query the sql server directly? Henry _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Nataraj S Narayan
to Nataraj S Narayan

Hi

I am getting the XML using

# curl -v -u pilot:pilot
"http://<remote-ip>/handheld?sql=select+*+from+branchdesc+for+xml+auto&root=clancor"

Next step is to parse and put it into a Sqlite database. Is it possible to bypass curl and do fully using fcl-xml?

regards

Nataraj

Nataraj S Narayan wrote 38 lines
Hi The customer want it that way. May be don't like to expose Sql server to the world. ITC of wrong validation, browser shows:- ERROR: 401 Access Denied HResult: 0x80046000 Source: Microsoft SQL isapi extension Description: Access denied regards Nataraj On Wed, Aug 26, 2009 at 5:57 PM, Henry Vermaak wrote: > 2009/8/26 Nataraj S Narayan : >> Hi >> >> The following URL gives me a XML output in any browser , after >> validating username and password:- >> >> http://"Some IP >> address"/handheld?sql=select+*+from+branchdesc+for+xml+auto&root=my-mssql-database >> >> This connects to a remote MS SQL server based web service , may be >> using MIcrosoft IIS server. >> >> Can i use "fcl-xml" package to send the query and then parse the xml output? > > Why don't you query the sql server directly? > > Henry > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal >

Reply by email

Michael Van Canneyt
to Nataraj S Narayan
Nataraj S Narayan wrote 9 lines
Hi I am getting the XML using # curl -v -u pilot:pilot "http://<remote-ip>/handheld?sql=select+*+from+branchdesc+for+xml+auto&root=clancor" Next step is to parse and put it into a Sqlite database. Is it possible to bypass curl and do fully using fcl-xml?

You can use synapse, lnet or Indy to download the data, and then parse it with fcl-xml.

Michael.

Show quoted text 48 lines
regards Nataraj On Wed, Aug 26, 2009 at 6:13 PM, Nataraj S Narayan wrote: > Hi > > The customer want it that way. May be don't like to expose Sql server > to the world. > ITC of wrong validation, browser shows:- > > ERROR: 401 Access Denied > HResult: 0x80046000 > Source: Microsoft SQL isapi extension > Description: Access denied > > regards > > Nataraj > > On Wed, Aug 26, 2009 at 5:57 PM, Henry Vermaak wrote: >> 2009/8/26 Nataraj S Narayan : >>> Hi >>> >>> The following URL gives me a XML output in any browser , after >>> validating username and password:- >>> >>> http://"Some IP >>> address"/handheld?sql=select+*+from+branchdesc+for+xml+auto&root=my-mssql-database >>> >>> This connects to a remote MS SQL server based web service , may be >>> using MIcrosoft IIS server. >>> >>> Can i use "fcl-xml" package to send the query and then parse the xml output? >> >> Why don't you query the sql server directly? >> >> Henry >> _______________________________________________ >> fpc-pascal maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-pascal >> > _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email