Help to access Web Service
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
Help to access Web Service
Hi friends,
I'm trying to access Web Services using fivewin, but I receive an error in OLE creation:
---cut---
local oSoapClient, cBuf
oSoapClient := Win_OleCreateObject( "MSSOAP.SoapClient30" )
oSoapClient:msSoapInit( "https://www.nfp.sp.gov.br/ws" )
---cut---
The manual for WS that I need access is this: http://www.nfp.fazenda.sp.gov.br/pdf/webservice.pdf
Any hint please ?
Thanks and best regards,
Toninho.
I'm trying to access Web Services using fivewin, but I receive an error in OLE creation:
---cut---
local oSoapClient, cBuf
oSoapClient := Win_OleCreateObject( "MSSOAP.SoapClient30" )
oSoapClient:msSoapInit( "https://www.nfp.sp.gov.br/ws" )
---cut---
The manual for WS that I need access is this: http://www.nfp.fazenda.sp.gov.br/pdf/webservice.pdf
Any hint please ?
Thanks and best regards,
Toninho.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Help to access Web Service
Toninho,
Try using CreateObject():
CreateObject( "MSSOAP.SoapClient30" )
Try using CreateObject():
CreateObject( "MSSOAP.SoapClient30" )
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
Re: Help to access Web Service
Hi Antonio.
Same error, in mssoapinit. IMHO is time to FWH goes to web. FWH is a powerfull product but we live in a time that web is required for a lot of transactions. Web Services in more and more used and soap was replaced by net framework. Is my dream a day that FWH have a TWeb class...
Thank you and best regards,
Toninho.
Same error, in mssoapinit. IMHO is time to FWH goes to web. FWH is a powerfull product but we live in a time that web is required for a lot of transactions. Web Services in more and more used and soap was replaced by net framework. Is my dream a day that FWH have a TWeb class...
Thank you and best regards,
Toninho.
Re: Help to access Web Service
Toninho, i agree... can we try to make one? (im from brazil too). i need webservices too.
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
-
- Posts: 310
- Joined: Mon Oct 10, 2005 5:10 am
Re: Help to access Web Service
static function Convert(oPo)
Local oSoap := Mcs_OleObj("MSSOAP.SoapClient30")
Local nRate := nil,nAmount := 0,cTo := 'AUD',cCurr := '',nCurrRate := 0,lCont := TRUE
nCurrRate := oPo:rate()
if nCurrRate <> 0
if ! MsgNoYes('Changing Rate - Are You Sure ?')
lCont := FALSE
endif
endif
if lCont
nAmount := oPo:us
cCurr := oPo:curr
CursorWait()
oSoap:MsSoapInit("http://www.webservicex.net/CurrencyConvertor.asmx?WSDL")
oSoap:ClientProperty("ServerHTTPRequest")
nRate := oSoap:ConversionRate(substr(cCurr,1,3),substr(cTo,1,3))
oSoap := nil
nAmount := nAmount * nRate
oPo:aud := nAmount
oPo:rate := nRate
oPo:save()
SndPlaySound("Ding",1)
CursorArrow()
endif
Return nil
//--------------------------------------------------------------------------------------------------------//
Please note the code relating to SOAP came from Byron - form Matrix Software ( from memory)
Local oSoap := Mcs_OleObj("MSSOAP.SoapClient30")
Local nRate := nil,nAmount := 0,cTo := 'AUD',cCurr := '',nCurrRate := 0,lCont := TRUE
nCurrRate := oPo:rate()
if nCurrRate <> 0
if ! MsgNoYes('Changing Rate - Are You Sure ?')
lCont := FALSE
endif
endif
if lCont
nAmount := oPo:us
cCurr := oPo:curr
CursorWait()
oSoap:MsSoapInit("http://www.webservicex.net/CurrencyConvertor.asmx?WSDL")
oSoap:ClientProperty("ServerHTTPRequest")
nRate := oSoap:ConversionRate(substr(cCurr,1,3),substr(cTo,1,3))
oSoap := nil
nAmount := nAmount * nRate
oPo:aud := nAmount
oPo:rate := nRate
oPo:save()
SndPlaySound("Ding",1)
CursorArrow()
endif
Return nil
//--------------------------------------------------------------------------------------------------------//
Please note the code relating to SOAP came from Byron - form Matrix Software ( from memory)
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
Re: Help to access Web Service
Hi James,
Thanks for your hint. I'm playing with WinInet for some days, but instead InternetReadFile(), I think that I need InternetWriteFile(), but it is not so easy to use, please see at msdn and another problem, I need use SOAP protocol, or ws will reject my request...
Regards,
Toninho.
Thanks for your hint. I'm playing with WinInet for some days, but instead InternetReadFile(), I think that I need InternetWriteFile(), but it is not so easy to use, please see at msdn and another problem, I need use SOAP protocol, or ws will reject my request...
Regards,
Toninho.
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
Re: Help to access Web Service
Hi Colin,
I'm trying your sample, thanks a lot.
Toninho.
I'm trying your sample, thanks a lot.
Toninho.
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
Re: Help to access Web Service
I think that I found the problem, I need access a HTTPS...
oSoapClient:msSoapInit( "https://www.nfp.fazenda.sp.gov.br/ws/ar ... .asmx?WSDL" )
Anybody know if MSSOAP access HTTPS ???
Thanks and best regards,
Toninho.
oSoapClient:msSoapInit( "https://www.nfp.fazenda.sp.gov.br/ws/ar ... .asmx?WSDL" )
Anybody know if MSSOAP access HTTPS ???
Thanks and best regards,
Toninho.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 161
- Joined: Tue Oct 18, 2005 10:01 am
Re: Help to access Web Service
Thanks Antonio,
I'll review it.
Regards,
Toninho.
I'll review it.
Regards,
Toninho.