Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 9 of 9 total |
Sample Web Service Project |
Tue, Dec 13 2011 7:03 AM | Permanent Link |
Chris Holland SEC Solutions Ltd. Team Elevate | I have uploaded a sample project to the binaries newsgroup that
demonstrates how to connect to a web service using EWB. Hope it helps. Chris Holland [Team Elevate] |
Tue, Dec 13 2011 10:05 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Chris,
<< I have uploaded a sample project to the binaries newsgroup that demonstrates how to connect to a web service using EWB. >> Cool, thanks very much. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Dec 13 2011 2:22 PM | Permanent Link |
Peter | Chris Holland wrote:
>> I have uploaded a sample project to the binaries newsgroup thanks a lot for sharing! I tested project1.html with my three browsers (see screenshot: http://h8.abload.de/img/ewbd859z.png) Google Chrome V15.0.874.121 (on the left side): There are no captions and after clicking the button an error-message appears IE 9 (in the middle): Everything seems to be OK Firefox 7.0.1 (on the right side) After clicking the button an error-message appears Greetings ... Peter --- Sorry for my weird english |
Tue, Dec 13 2011 3:22 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Peter,
<< Google Chrome V15.0.874.121 (on the left side): There are no captions and after clicking the button an error-message appears >> I'm looking into the caption issue. As for the error, see below. << Firefox 7.0.1 (on the right side) After clicking the button an error-message appears >> FireFox (and I assume WebKit also) has a "same-source-domain" policy for AJAX requests. What this means is that you cannot execute AJAX requests from an application that has been loaded directly from a file. IE doesn't have this restriction. This is also why the next build will have a local web server built into the IDE, so you can easily test against other browsers using localhost, and can send debug output from those browsers to the IDE "Messages" window. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Dec 13 2011 3:50 PM | Permanent Link |
Chris Holland SEC Solutions Ltd. Team Elevate | Hi,
I tried to add some exception handling to confirm what the error was but it throws an error on the line: on E : Exception do Complaining that it does not know what an Exception is. As a non Deplhi programmer I would gladly except an help as to what I have done wrong here. (My Delphi book is on order Complete code part is shown below ==================================== try ServerRequest1.URL := 'http://cypher1.co.uk/WebService/Cypher1Data.asmx'; ServerRequest1.Method := rmPost; ServerRequest1.RequestContent.Clear; ServerRequest1.RequestContent.Add('<?xml version="1.0" encoding="utf-8"?>'); ServerRequest1.RequestContent.Add('<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="'" name="http://schemas.xmlsoap.org/soap/envelope/">'">http://schemas.xmlsoap.org/soap/envelope/">'); ServerRequest1.RequestContent.Add('<soap:Body>'); ServerRequest1.RequestContent.Add('<UserLogon xmlns="Cypher1Data">'); ServerRequest1.RequestContent.Add('<userName>'+ UserNameEdit.Text + '</userName>'); ServerRequest1.RequestContent.Add('<userPassword>' + UserPasswordEdit.Text + '</userPassword>'); ServerRequest1.RequestContent.Add('</UserLogon>'); ServerRequest1.RequestContent.Add('</soap:Body>'); ServerRequest1.RequestContent.Add('</soap:Envelope>'); ServerRequest1.RequestHeaders.Clear; ServerRequest1.RequestHeaders.NameValueSeparator := '='; ServerRequest1.RequestHeaders.Add('Content-Type = text/xml; charset=utf-8'); ServerRequest1.RequestHeaders.Add('Content-Length =' + IntToStr(Length(ServerRequest1.RequestContent.Text))); ServerRequest1.RequestHeaders.Add('SOAPAction = "Cypher1Data/UserLogon"'); ServerRequest1.Execute; except on E : Exception do begin ResponseEdit.Text := E.ClassName + ' : ' + E.Message; end; end; Chris Holland [Team Elevate] On 13/12/2011 20:22, Tim Young [Elevate Software] wrote: > Peter, > > << Google Chrome V15.0.874.121 (on the left side): > There are no captions and after clicking the button an error-message > appears >> > > I'm looking into the caption issue. As for the error, see below. > > << Firefox 7.0.1 (on the right side) > After clicking the button an error-message appears >> > > FireFox (and I assume WebKit also) has a "same-source-domain" policy for > AJAX requests. What this means is that you cannot execute AJAX requests > from an application that has been loaded directly from a file. IE > doesn't have this restriction. > > This is also why the next build will have a local web server built into > the IDE, so you can easily test against other browsers using localhost, > and can send debug output from those browsers to the IDE "Messages" window. > |
Tue, Dec 13 2011 4:51 PM | Permanent Link |
Raul Team Elevate | Try something like this :
try //... you code here ... except ON E:TError do ResponseEdit.Text := E.ClassName + ' : ' + E.Message; end; Raul On 12/13/2011 3:50 PM, Chris Holland wrote: > Hi, > > I tried to add some exception handling to confirm what the error was but > it throws an error on the line: > > on E : Exception do > > Complaining that it does not know what an Exception is. > |
Tue, Dec 13 2011 4:53 PM | Permanent Link |
Raul Team Elevate | Sorry - copy pasted code from your sample and you need to remove the
classname as there is no such thing (e.message is still ok): try //... you code here ... except ON E:TError do ResponseEdit.Text := E.Message; end; On 12/13/2011 4:51 PM, Raul wrote: > Try something like this : > > try > //... you code here ... > except > ON E:TError do > ResponseEdit.Text := E.ClassName + ' : ' + E.Message; > end; > > > Raul > > On 12/13/2011 3:50 PM, Chris Holland wrote: >> Hi, >> >> I tried to add some exception handling to confirm what the error was but >> it throws an error on the line: >> >> on E : Exception do >> >> Complaining that it does not know what an Exception is. >> |
Tue, Dec 13 2011 5:06 PM | Permanent Link |
Chris Holland SEC Solutions Ltd. Team Elevate | Hi Raul,
Thanks for that, compiles now but the E.Message appears to be blank. I changed it to ResponseEdit.Text = 'Error:' + E.Message and it only shows as Error: Chris > Sorry - copy pasted code from your sample and you need to remove the > classname as there is no such thing (e.message is still ok): > > try > //... you code here ... > except > ON E:TError do > ResponseEdit.Text := E.Message; > end; > > > On 12/13/2011 4:51 PM, Raul wrote: >> Try something like this : >> >> try >> //... you code here ... >> except >> ON E:TError do >> ResponseEdit.Text := E.ClassName + ' : ' + E.Message; >> end; >> >> >> Raul >> >> On 12/13/2011 3:50 PM, Chris Holland wrote: >>> Hi, >>> >>> I tried to add some exception handling to confirm what the error was but >>> it throws an error on the line: >>> >>> on E : Exception do >>> >>> Complaining that it does not know what an Exception is. >>> > |
Wed, Dec 14 2011 8:55 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Chris,
<< Thanks for that, compiles now but the E.Message appears to be blank. >> As far as I can tell, it's purposefully left blank for this particular exception - FireFox just goes "Duh !" and leaves it at that, leaving one to spend an hour trying to figure out exactly what the hell is going on. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Friday, November 1, 2024 at 07:01 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |