Re: [xHarbour-developers] Com objects

2008-08-07 Thread Ron Pinkas
Luiz,

I can not test, because even the VBScript sample fails, with a  
Failed to resolve server name error. Please forward a functioning  
sample.

Ron

On Aug 5, 2008, at 5:09 AM, Luiz Rafael Culik Guimaraes wrote:

 Ron


 VBS

 dim e
 set e = CreateObject(PocketSOAP.Envelope.2)

 e.methodName = getQuote
 e.URI = urn:xmethods-delayed-quotes

 e.Parameters.Create symbol, MSFT

 dim t
 set t = CreateObject(PocketSOAP.HTTPTransport.2)
 t.SOAPAction = 
 t.Send http://services.xmethods.net/soap;, e.serialize
 e.parse t

 wscript.echo Stock quote for MSFT =   e.parameters.item(0).Value

 xharbour

 func main
 Local searchRes
 Local encode:=,ret

 Local  e,t,res,env
 altd()
 e := CreateObject(PocketSOAP.Envelope.2)

 e:methodName = getQuote
 e:URI = urn:xmethods-delayed-quotes

 e:Parameters:Create( symbol, MSFT)


 t := CreateObject(PocketSOAP.HTTPTransport)
 t:SOAPAction()
 env:=  e:serialize
 t:Send( http://services.xmethods.net/soap;, env)
 e:parse(t)

 ?stock =  + e:parameters:item(0):Value

 regards
 Luiz

 -- 
 ---
 This SF.Net email is sponsored by the Moblin Your Move Developer's  
 challenge
 Build the coolest Linux based applications with Moblin SDK  win  
 great prizes
 Grand prize is a trip for two to an Open Source event anywhere in  
 the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 xHarbour-developers mailing list
 xHarbour-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/xharbour-developers




-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers


Re: [xHarbour-developers] Com objects

2008-08-05 Thread Luiz Rafael Culik Guimaraes
Ron


VBS

dim e
set e = CreateObject(PocketSOAP.Envelope.2)

e.methodName = getQuote
e.URI = urn:xmethods-delayed-quotes

e.Parameters.Create symbol, MSFT

dim t
set t = CreateObject(PocketSOAP.HTTPTransport.2)
t.SOAPAction = 
t.Send http://services.xmethods.net/soap;, e.serialize
e.parse t

wscript.echo Stock quote for MSFT =   e.parameters.item(0).Value 

xharbour

func main
Local searchRes
Local encode:=,ret

Local  e,t,res,env
altd()
e := CreateObject(PocketSOAP.Envelope.2)

e:methodName = getQuote
e:URI = urn:xmethods-delayed-quotes

e:Parameters:Create( symbol, MSFT)


t := CreateObject(PocketSOAP.HTTPTransport)
t:SOAPAction()
env:=  e:serialize
t:Send( http://services.xmethods.net/soap;, env)
e:parse(t)

?stock =  + e:parameters:item(0):Value 

regards
Luiz

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers


Re: [xHarbour-developers] Com objects

2008-08-04 Thread Ron Pinkas
Luiz,

Please post a functioning, reduced, self contained, VBScript sample,  
as well as your xHarbour conversion.

Ron

On Aug 4, 2008, at 12:52 PM, Luiz Rafael Culik Guimaraes wrote:

 Dear Friends

 i has com object the need to recieve an Commvariant type as an  
 parameter to
 an method

 How to pass this type of parameter.

 here the code i've tryed

 #define true 1
 func main
 Local e
 altd()
 e:= GoogleSearch(pocketSOAP, 0, 10, true, , true, , ,  )

 Function GoogleSearch ( searchTerm,;
 start, ;
 maxResults, ;
 MatchFilter, ;
 restrict,  ;
 safeSearch, ;
 languageRestrict, ;
 inputEncoding, ;
 outputEncoding )
 Local e,t
  t := CreateObject(pocketsOAP.HTTPTransport)
//t:SetProxy( localhost, 7070)

 e := CreateObject(PocketSOAP.Envelope.2)
 e:SetMethod( doGoogleSearch, urn:GoogleSearch)

 e:Parameters:create( key,'xx')
 e:Parameters:create( q, searchTerm)
 e:Parameters:create( start, start)
 e:Parameters:create( maxResults, maxResults)
 e:Parameters:create( filter, MatchFilter)
 e:Parameters:create( restrict, restrict)
 e:Parameters:create( safeSearch, safeSearch)
 e:Parameters:create( lr, languageRestrict)
 e:Parameters:create( ie, inputEncoding)
 e:Parameters:create( oe, outputEncoding)


 t:SOAPAction ( urn:GoogleSearchAction)

 ? t:send( http://api.google.com/search/beta2;, e:serialize)
 e:Parse( t  )   // Samples i get in VB this is passed as e.Parse T

 Regards
 Luiz


 -- 
 ---
 This SF.Net email is sponsored by the Moblin Your Move Developer's  
 challenge
 Build the coolest Linux based applications with Moblin SDK  win  
 great prizes
 Grand prize is a trip for two to an Open Source event anywhere in  
 the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 xHarbour-developers mailing list
 xHarbour-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/xharbour-developers




-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers