Jump to content



Photo

SOAP Example


  • Please log in to reply
33 replies to this topic

#1 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 13 May 2007 - 07:00 PM

Simple SOAP Example

For those who don't know what SOAP (Simple Object Access Protocol) is.

SOAP is a simple XML-based protocol to let applications exchange information over HTTP, and is platform independend.
An advantage of SOAP is that program calls are much more likely to get through firewall servers that screen out requests other
than those for known applications (through the designated port mechanism). Since HTTP requests are usually allowed through
firewalls, programs using SOAP to communicate can be sure that they can communicate with programs anywhere.

In this SOAP example, you will learn what SOAP is, and how it uses XML to exchange information between applications.

The next step will be, how to turn AU3 into a Web Services server.

This is the SOAP CLIENT

AutoIt         
Dim $objHTTP Dim $strEnvelope Dim $strReturn Dim $objReturn Dim $dblTax Dim $strQuery Dim $value $value = InputBox("Testing", "Enter your new value here.", 10) ; Initialize COM error handler $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") $objHTTP = ObjCreate("Microsoft.XMLHTTP") $objReturn = ObjCreate("Msxml2.DOMdocument.3.0") ; Create the SOAP Envelope $strEnvelope = "<soap:envelope xmlns:soap=""urn:schemas-xmlsoap-org:soap.v1"">" & _ "<soap:header></soap:header>" & _ "<soap:body>" & _ "<m:getsalestax xmlns:m=""urn:myserver/soap:TaxCalculator"">" & _ "<salestotal>"&$value&"</salestotal>" & _ "</m:getsalestax>" & _ "</soap:body>" & _ "</soap:envelope>" ; Set up to post to our local server $objHTTP.open ("post", "<a href='http://localhost/soap.asp' class='bbc_url' title='External link' rel='norewrite nofollow external'>http://localhost/soap.asp"</a>, False) ; Set a standard SOAP/ XML header for the content-type $objHTTP.setRequestHeader ("Content-Type", "text/xml") ; Set a header for the method to be called $objHTTP.setRequestHeader ("SOAPMethodName", "urn:myserver/soap:TaxCalculator#getsalestax") ConsoleWrite("Content of the Soap envelope : "& @CR & $strEnvelope & @CR & @CR) ; Make the SOAP call $objHTTP.send ($strEnvelope) ; Get the return envelope $strReturn = $objHTTP.responseText ; ConsoleWrite("Debug : "& $strReturn & @CR & @CR) ; Load the return envelope into a DOM $objReturn.loadXML ($strReturn) ConsoleWrite("Return of the SOAP Msg : " & @CR & $objReturn.XML & @CR & @CR) ; Query the return envelope $strQuery = "SOAP:Envelope/SOAP:Body/m:getsalestaxresponse/salestax" $dblTax = $objReturn.selectSingleNode($strQuery) $Soap = $objReturn.Text MsgBox(0,"SOAP Response","The Sales Tax is : " & $Soap) Func MyErrFunc() $HexNumber=hex($oMyError.number,8) Msgbox(0,"COM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _              "err.description is: " & @TAB & $oMyError.description & @CRLF & _              "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _              "err.number is: " & @TAB & $HexNumber & @CRLF & _              "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _              "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _              "err.source is: " & @TAB & $oMyError.source & @CRLF & _              "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _              "err.helpcontext is: " & @TAB & $oMyError.helpcontext _             ) SetError(1) ; to check for after this function returns Endfunc


This is the SOAP SERVER

Plain Text         
<% Dim oNode Set objReq = Server.CreateObject("Msxml2.DOMdocument.3.0") 'Load the request into XML DOM objReq.Load Request 'Query the DOM for the input parameter ' Remember: xpath is case sensitive. "SalesTotal" is not the same as "salestotal" strQuery = "SOAP:Envelope/SOAP:Body/m:getsalestax/salestotal" 'varSalesTotal = objReq.SelectSingleNode(strQuery).Text Set oNode = Nothing Set oNode = objReq.SelectSingleNode(strQuery) if not oNode is Nothing Then varSalesTotal = oNode.Text else 'handle the error - save the xml to a file so you can look at it varSalesTotal = objReq.Text end if 'Calculate the sales tax varSalesTax = varSalesTotal * 0.04 'Prepare the return envelope strTmp = _ "<soap:envelope xmlns:soap=""urn:schemas-xmlsoap-org:soap.v1"">" & _ "<soap:header></soap:header>" & _ "<soap:body>" & _ "<m:getsalestaxresponse xmlns:m=""urn:myserver/soap:Taxcalc"">" & _ "<salestax>" & varSalesTax & "</salestax>" & _ "</m:getsalestaxresponse>" & _ "</soap:body>" & _ "</soap:envelope>" 'Write the return envelope Response.Write strTmp %>


Save the SOAP SERVER as SOAP.asp and put it in the root of your IIS server.

Run the client and see what happenes.

Enjoy !!

Regards

ptrex

Edited by ptrex, 14 September 2012 - 09:26 AM.






#2 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 13 May 2007 - 08:10 PM

@all

OK this is an Example connecting to a Web Service collecting the MS stock information.

AutoIt         
Dim $oMyError, $xmlFile, $oNode, $strReturn, $objReq $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") $xmlDoc= ObjCreate("Msxml2.DOMdocument.3.0") $SOAPClient = objcreate("MSSOAP.SOAPClient") $SOAPClient.mssoapinit ("<a href='http://www.webservicex.net/stockquote.asmx?WSDL' class='bbc_url' title='External link' rel='norewrite nofollow external'>http://www.webservicex.net/stockquote.asmx?WSDL"</a>) $strReturn = $SOAPClient.GetQuote("MSFT") ConsoleWrite( "MSFT : " & $strReturn & @CRLF & @CRLF) $xmlDoc.loadXML ($strReturn) $oNode = $xmlDoc.selectSingleNode("StockQuotes") ConsoleWrite($oNode.text & @CRLF & @CRLF) ;This is COM error handler Func MyErrFunc()   $HexNumber=hex($oMyError.number,8)   Msgbox(0,"COM Error Test","We intercepted a COM Error !"       & @CRLF  & @CRLF & _              "err.description is: "    & @TAB & $oMyError.description    & @CRLF & _              "err.windescription:"     & @TAB & $oMyError.windescription & @CRLF & _              "err.number is: "         & @TAB & $HexNumber              & @CRLF & _              "err.lastdllerror is: "   & @TAB & $oMyError.lastdllerror   & @CRLF & _              "err.scriptline is: "     & @TAB & $oMyError.scriptline     & @CRLF & _              "err.source is: "         & @TAB & $oMyError.source         & @CRLF & _              "err.helpfile is: "       & @TAB & $oMyError.helpfile       & @CRLF & _              "err.helpcontext is: "    & @TAB & $oMyError.helpcontext _             )   SetError(1)  ; to check for after this function returns Endfunc ƒo݊÷ Øg­XsˆJ)ߢ¹š¶*'jëhŠ×6Dim $oMyError $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") dim $SOAPClient $SOAPClient = ObjCreate("MSSOAP.SOAPClient") $SOAPClient.mssoapinit("<a href='http://www.webservicex.net/whois.asmx?wsdl' class='bbc_url' title='External link' rel='norewrite nofollow external'>http://www.webservicex.net/whois.asmx?wsdl"</a>)   if @error then     ConsoleWrite( $SOAPClient.faultString)     ConsoleWrite( $SOAPClient.detail)   Endif ConsoleWrite($SOAPClient.GetWhois("autoitscript.com"))   if @error then     ConsoleWrite($SOAPClient.faultString)     ConsoleWrite($SOAPClient.detail)   endif ;This is COM error handler Func MyErrFunc()   $HexNumber=hex($oMyError.number,8)   Msgbox(0,"COM Error Test","We intercepted a COM Error !"       & @CRLF  & @CRLF & _              "err.description is: "    & @TAB & $oMyError.description    & @CRLF & _              "err.windescription:"     & @TAB & $oMyError.windescription & @CRLF & _              "err.number is: "         & @TAB & $HexNumber              & @CRLF & _              "err.lastdllerror is: "   & @TAB & $oMyError.lastdllerror   & @CRLF & _              "err.scriptline is: "     & @TAB & $oMyError.scriptline     & @CRLF & _              "err.source is: "         & @TAB & $oMyError.source         & @CRLF & _              "err.helpfile is: "       & @TAB & $oMyError.helpfile       & @CRLF & _              "err.helpcontext is: "    & @TAB & $oMyError.helpcontext _             )   SetError(1)  ; to check for after this function returns Endfuncƒo݊÷ Ù8b²‰ÞŠÁž¶Ø§©e ‹§¶¸ž±«­¢+Ù¥´€˜ŒÀÌØí½5åÉɽÈ(˜ŒÀÌØí½5åÉɽȀô=‰©ٕ¹Ð ™ÅÕ½ÐíÕѽ%йÉɽșÅÕ½Ð찙ÅÕ½Ðí5åÉÉÕ¹Œ™ÅÕ½Ðì¤()‘¥´€˜ŒÀÌØíM=A ±¥•¹Ð(˜ŒÀÌØíM=A ±¥•¹Ð€ô=‰© ɕ…Ñ” ™ÅÕ½Ðí5MM=@¹M=A ±¥•¹Ð™ÅÕ½Ðì¤((˜ŒÀÌØíM=A ±¥•¹Ð¹µÍͽ…Á¥¹¥Ð ™ÅÕ½Ðí¡ÑÑÀè¼½ÝÝܹݕ‰Í•ÉÙ¥•๹•н½Õ¹ÑÉ久͵àýÝ͑°™ÅÕ½Ð준(€¥˜•Éɽȁѡ•¸(€€€ ½¹Í½±•]ɥє €˜ŒÀÌØíM=A ±¥•¹Ð¹™…Õ±ÑMÑÉ¥¹œ¤(€€€ ½¹Í½±•]ɥє €˜ŒÀÌØíM=A ±¥•¹Ð¹‘•Ñ…¥°¤(€¹‘¥˜) ½¹Í½±•]ɥє ˜ŒÀÌØíM=A ±¥•¹Ð¹•Ñ ½Õ¹ÑÉ¥•Ì ¤¤(€¥˜•Éɽȁѡ•¸(€€€ ½¹Í½±•]ɥє ˜ŒÀÌØíM=A ±¥•¹Ð¹™…Õ±ÑMÑÉ¥¹œ¤(€€€ ½¹Í½±•]ɥє ˜ŒÀÌØíM=A ±¥•¹Ð¹‘•Ñ…¥°¤(€•¹‘¥˜((íQ¡¥Ì¥Ì =4•Éɽȁ¡…¹‘±•È)Õ¹Œ5åÉÉÕ¹Œ ¤(€€˜ŒÀÌØí!•á9Õµ‰•Èõ¡•à ˜ŒÀÌØí½5åÉɽȹ¹Õµ‰•Ȱà¤(€5͝‰½à À°™ÅÕ½Ðí =4ÉɽȁQ•ÍЙÅÕ½Ð찙ÅÕ½Ðí]”¥¹Ñ•ɍ•Áѕ„ =4ÉɽȀ˜ŒÌÌì™ÅÕ½Ð쀀€€€€€™…µÀì I1€€™…µÀì I1€™…µÀì|($$$€™ÅÕ½Ðí•Éȹ‘•͍ɥÁÑ¥½¸¥Ì耙ÅÕ½Ð쀀€€™…µÀìQ€™…µÀ쀘ŒÀÌØí½5åÉɽȹ‘•͍ɥÁÑ¥½¸€€€€™…µÀì I1€™…µÀì|($$$€™ÅÕ½Ðí•Éȹݥ¹‘•͍ɥÁÑ¥½¸è™ÅÕ½Ð쀀€€€™…µÀìQ€™…µÀ쀘ŒÀÌØí½5åÉɽȹݥ¹‘•͍ɥÁÑ¥½¸€™…µÀì I1€™…µÀì|($$$€™ÅÕ½Ðí•Éȹ¹Õµ‰•ȁ¥Ì耙ÅÕ½Ð쀀€€€€€€€™…µÀìQ€™…µÀ쀘ŒÀÌØí!•á9Õµ‰•È€€€€€€€€€€€€€€™…µÀì I1€™…µÀì|($$$€™ÅÕ½Ðí•Éȹ±…Íё±±•Éɽȁ¥Ì耙ÅÕ½Ð쀀€™…µÀìQ€™…µÀ쀘ŒÀÌØí½5åÉɽȹ±…Íё±±•ÉɽȀ€€™…µÀì I1€™…µÀì|($$$€™ÅÕ½Ðí•Éȹ͍ɥÁѱ¥¹”¥Ì耙ÅÕ½Ð쀀€€€™…µÀìQ€™…µÀ쀘ŒÀÌØí½5åÉɽȹ͍ɥÁѱ¥¹”€€€€€™…µÀì I1€™…µÀì|($$$€™ÅÕ½Ðí•ÉȹͽÕɍ”¥Ì耙ÅÕ½Ð쀀€€€€€€€™…µÀìQ€™…µÀ쀘ŒÀÌØí½5åÉɽȹͽÕɍ”€€€€€€€€€™…µÀì I1€™…µÀì|($$$€™ÅÕ½Ðí•Éȹ¡•±Á™¥±”¥Ì耙ÅÕ½Ð쀀€€€€€™…µÀìQ€™…µÀ쀘ŒÀÌØí½5åÉɽȹ¡•±Á™¥±”€€€€€€€™…µÀì I1€™…µÀì|($$$€™ÅÕ½Ðí•Éȹ¡•±Á½¹Ñ•áЁ¥Ì耙ÅÕ½Ð쀀€€™…µÀìQ€™…µÀ쀘ŒÀÌØí½5åÉɽȹ¡•±Á½¹Ñ•áЁ|($$$¤(€M•ÑÉÉ½È Ä¤€€ìÑ¼¡•¬™½È…™Ñ•ȁѡ¥Ì™Õ¹Ñ¥½¸É•ÑÕɹÌ)¹‘™Õ¹Œ


Regards,

ptrex

Edited by ptrex, 14 May 2007 - 01:00 PM.


#3 Apzo

Apzo

    Adventurer

  • Active Members
  • PipPip
  • 117 posts

Posted 14 May 2007 - 10:39 AM

Awesome (once more), Ptrex !

Do you have any idea yet for the AU3 server part ?

Apzo.

#4 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 14 May 2007 - 12:37 PM

@Apzo

Thanks !!

Do you have any idea yet for the AU3 server part


Yes I do, but I need to find the time to do some more testing.
I got the framework up and running but I did not get the Client to communicate with the server yet.

I'll be in touch when I got a hit.

Regards

ptrex

#5 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 14 May 2007 - 01:02 PM

@all

I have added 2 new Web Services to the 2nd post.

Get WHOIS information and Get All Countries.

Just a mapper of example what it can do.

Regards,

ptrex

#6 BillLuvsU

BillLuvsU

    Useless Member

  • Active Members
  • PipPipPipPipPipPip
  • 1,560 posts

Posted 14 May 2007 - 02:43 PM

This is seriously awesome, great work man!

Posted Image

Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

#7 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 14 May 2007 - 04:28 PM

@fear1313

Thanks !!

Keep you all posted when I got more news.

regards

ptrex

#8 Jazkal

Jazkal

    Wayfarer

  • Active Members
  • Pip
  • 80 posts

Posted 01 November 2007 - 07:58 PM

Did you ever get anywhere with the AU3 server side?

#9 Toady

Toady

    Easy there turbo...

  • Active Members
  • PipPipPipPipPipPip
  • 698 posts

Posted 01 November 2007 - 08:10 PM

Wow very nice!

I can use this at work in testing my current project.
www.itoady.com (Go here to download the MacroGamer installer)

#10 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 03 November 2007 - 05:07 PM

@Jazkal

I started using the Soap Toolkit

But I didn't put a lot effort in this because it has be declared obsolete by MS.
These days they only support .NET webservices. And this is a different ballgame.

There are other ways of making a webservice server as well using for instance PHP. But I never used that.

Maybe some others like "Toady" can guide us in the better direction on what the best tool to start using the Server Side Webservices.


Regards,

ptrex

#11 Jazkal

Jazkal

    Wayfarer

  • Active Members
  • Pip
  • 80 posts

Posted 04 November 2007 - 02:28 AM

Thanks again for the info.

Maybe you know of something else that would meet my needs?

I'm looking to run an Autoit app on a 'server', and pass it commands or info (to do things with) from 'client' machines. Know of any UDF's or whatever that would handle this?

Thanks

#12 ConsultingJoe

ConsultingJoe

    ConsultingJoe.com

  • Active Members
  • PipPipPipPipPipPip
  • 1,667 posts

Posted 04 November 2007 - 04:05 AM

So can you use Microsoft.XMLHTTP to send http requests instead of HTTP.au3 where that uses tcpsend(). That way windows would manage the requests.

#13 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 13 November 2007 - 02:18 PM

@CyberZeroCool


Yes you can as shown in my first post and first example.

Look for
$objHTTP = ObjCreate("Microsoft.XMLHTTP")


But it is more labour intensive to do so. Because you have to assemble the SOAP message by hand.

regards,

ptrex

Edited by ptrex, 13 November 2007 - 02:19 PM.


#14 ConsultingJoe

ConsultingJoe

    ConsultingJoe.com

  • Active Members
  • PipPipPipPipPipPip
  • 1,667 posts

Posted 13 November 2007 - 02:23 PM

@CyberZeroCool


Yes you can as shown in my first post and first example.

Look for

$objHTTP = ObjCreate("Microsoft.XMLHTTP")


But it is more labour intensive to do so. Because you have to assemble the SOAP message by hand.

regards,

ptrex

thanks

#15 Toady

Toady

    Easy there turbo...

  • Active Members
  • PipPipPipPipPipPip
  • 698 posts

Posted 13 November 2007 - 08:59 PM

Here is a very basic example using .Net and XMLHTTP. No special SOAP syntax required. First is your VB ASP.NET page, see below.

MyService.aspx
<%@ Page Language="VB" %> <script runat="server">     Sub Page_Load()         Response.Expires = -1         Response.ContentType = "text/xml"         Dim strNL As String = Chr(13) & Chr(10)         Dim MyCompany As String = Request.QueryString("CompanyName")         Dim XMLContent As String = "<?xml version='1.0'?><MyCompany>" & strNL         XMLContent += "<Address>342 West Corban Ln</Address>" & strNL         XMLContent += "<Employees>" & strNL         XMLContent += "<Manager>Joe Smith</Manager>" & strNL         XMLContent += "<Programmer>Jane Smith</Programmer>" & strNL         XMLContent += "</Employees>" & strNL         XMLContent += "</MyCompany>" & strNL         Response.Write(XMLContent)         Response.End()     End Sub </script>


Then your AU3 code to make request and parse XML response.
This way you can pass a query string to the service to do database gathering if you like.
From this you can see how easily it can be expanded to something more extravagant.
I took out the MyErrFunc() to make it easier to read.

MyScript.au3
Dim $objXMLHTTP = ObjCreate("Microsoft.XMLHTTP") Dim $objReturn = ObjCreate("Msxml2.DOMdocument.3.0") Dim $XMLDoc, $itemsDoc $objReturn.async = "false" $objXMLHTTP.open("GET","<a href='http://localhost/MyService.aspx?CompanyName=McDonalds%22,true' class='bbc_url' title='External link' rel='nofollow external'>http://localhost/MyService.aspx?CompanyName=McDonalds",true</a>) $objXMLHTTP.send("") $strReturn = $objXMLHTTP.responseText $objReturn.loadXML($strReturn) $itemsDoc = $objReturn.documentElement MsgBox(0,"","Address=" & $itemsDoc.childNodes(0).childNodes(0).nodeValue & @CRLF & _             "Manager=" & $itemsDoc.childNodes(1).childNodes(0).childNodes(0).nodeValue & @CRLF & _             "Programmer=" & $itemsDoc.childNodes(1).childNodes(1).childNodes(0).nodeValue )

www.itoady.com (Go here to download the MacroGamer installer)

#16 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 14 November 2007 - 07:57 PM

@Toady

Thanks for your input.

But this example is not realy a SOAP example.
It just reads out some XML in a webpage. SOAP uses XML that's correct but there' s a bit more to it.

SOAP Syntax

Regards,

Patrick

#17 Toady

Toady

    Easy there turbo...

  • Active Members
  • PipPipPipPipPipPip
  • 698 posts

Posted 14 November 2007 - 08:02 PM

...

well just my 2 cents.
www.itoady.com (Go here to download the MacroGamer installer)

#18 Gigglestick

Gigglestick

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 501 posts

Posted 08 April 2008 - 05:29 PM

I have never used SOAP before, and it's been several years since I did anything with Sharepoint. I've been trying to figure this out in relation to Sharepoint, and I'm sure I'm just overthinking it. Has anyone used SOAP in AutoIt to interact with Sharepoint? Do you have any examples?

Basically, I'm trying to pull data from a Sharepoint database, such as a list of machine names to do something to, and possibly to push data back into another database in Sharepoint. I been using a SQL database for this, but the front end for this tool was designed in VB and is obsolete, and we do not have an approved SQL management tool, so I'm looking to either query the Sharepoint front end or possibly the SQL database behind it as long as that doesn't cause issues with the front end. Then Sharepoint could be used as the front end to the database.

Thoughts? Examples?
My UDFs: ExitCodes

#19 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 09 April 2008 - 06:52 AM

@c0deWorm

I have walked down that road to myself.

The first attempt was to use Some kind of translated Vbscript code, to access the sharepoint.
I never got far.

Anyhow you will have to use these two objects to start going :

Reporting Services Sharepoint

AutoIt         
$xmlHTTP=ObjCreate("MSXML2.xmlHTTP.3.0")   $objStream = ObjCreate("ADODB.Stream")ƒo݊÷ Ù8b²+#€=ìZš™^¶ˆ¶ËZ®×jëhŠ×6; Initialize COM error handler $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") $strEndPointURL = "https://your server/global/Lists/AllItems.aspx" $strListName = "{47327AF9-9E3F-4171-A48A-9F0CA4D467F6}" $strSoapAction="http://schemas.microsoft.com/sharepoint/soap/GetListItems"  $objSOAPConnector = ObjCreate("MSOSOAP.HttpConnector30") with $objSOAPConnector  .Property("EndPointURL") = $strEndPointURL  .Property("SoapAction") = $strSoapAction  .Connect() EndWith  $objSOAPSerializer = ObjCreate("MSOSoap.SoapSerializer30") with $objSOAPSerializer  .Init($objSOAPConnector.InputStream)  .startEnvelope()  .startBody()  .StartElement ("GetListItems", "http://schemas.microsoft.com/sharepoint/soap/")  .StartElement ("listName", "http://schemas.microsoft.com/sharepoint/soap/")  .WriteString($strListName)  .EndElement()  .StartElement ("rowLimit", "http://schemas.microsoft.com/sharepoint/soap/")  .WriteString("10")  .EndElement()  .EndElement()  .endBody()  .endEnvelope() EndWith $objSOAPConnector.EndMessage()  $objResponseReader = ObjCreate("MSOSOAP.SoapReader30") $objResponseReader.Load($objSOAPConnector.OutputStream) Consolewrite ($objResponseReader.Body.xml) Func MyErrFunc()   $HexNumber=hex($oMyError.number,8)   Msgbox(0,"COM Test","We intercepted a COM Error !"       & @CRLF  & @CRLF & _              "err.description is: "    & @TAB & $oMyError.description    & @CRLF & _              "err.windescription:"     & @TAB & $oMyError.windescription & @CRLF & _              "err.number is: "         & @TAB & $HexNumber              & @CRLF & _              "err.lastdllerror is: "   & @TAB & $oMyError.lastdllerror   & @CRLF & _              "err.scriptline is: "     & @TAB & $oMyError.scriptline     & @CRLF & _              "err.source is: "         & @TAB & $oMyError.source         & @CRLF & _              "err.helpfile is: "       & @TAB & $oMyError.helpfile       & @CRLF & _              "err.helpcontext is: "    & @TAB & $oMyError.helpcontext _             )   SetError(1)  ; to check for after this function returns Endfunc


You can make an AU3 script ,that accesses the Excel sheet that cantains that linked WSS list.
Using normal COM scripting.



I hope this saves you some time to get you going.

Regards,

ptrex

Edited by ptrex, 09 April 2008 - 07:02 AM.


#20 cloud9ine

cloud9ine

    Seeker

  • Active Members
  • 8 posts

Posted 15 December 2008 - 03:12 PM

I am fairly new to SOAP but have worked quite a bit on AutoIt. I have a possibly stupid question, but in your client, say, the MSFT Stock Quote client, the response string is:

CODE
MSFT : <StockQuotes><Stock><Symbol>MSFT</Symbol><Last>19.07</Last><Date>12/15/2008</Date><Time>9:53am</Time><Change>-0.29</Change><Open>19.33</Open><High>19.44</High><Low>19.01</Low><Volume>4317804</Volume><MktCap>171.2B</MktCap><PreviousClose>19.36</PreviousClose><PercentageChange>-1.50%</PercentageChange><AnnRange>17.50 - 36.72</AnnRange><Earns>1.892</Earns><P-E>10.23</P-E><Name>Microsoft Corpora</Name></Stock></StockQuotes>


What is the method other than manual parsing to get, say, just the earnings of the stock, or say, the percentage change. I mean, one of the lowest level items. How do I address down to one of these and get the data?

Anil




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users