bilgehanyildirim
asked on
Delphi 2005 and WSDL
Hi there,
I am looking for a sample code in Delphi 2005 which will use the following wsdl
http://gw1.aql.com/soap/sendservice.php?WSDL
thanks
Bill
I am looking for a sample code in Delphi 2005 which will use the following wsdl
http://gw1.aql.com/soap/sendservice.php?WSDL
thanks
Bill
Oh yeah, after creating the .NET WinForms application I right clicked the project, did add web reference, save the project an entered the WDSL address so the correct web service files are created.
Regards Jacco
Regards Jacco
ASKER
I tried that but whenever I tried to run it opened the
C:\Documents and Settings\Bill\My Documents\Borland Studio Projects\SMS\Web References\com.aql.gw1\com .aql.gw1.s endservice .pas
and went to line 40
[System.Xml.Serialization. XmlEnumAtt ribute('7' )]
and said
"E2029 Identifier Expected but '[' found"
Did it give the same error on your project?
C:\Documents and Settings\Bill\My Documents\Borland Studio Projects\SMS\Web References\com.aql.gw1\com
and went to line 40
[System.Xml.Serialization.
and said
"E2029 Identifier Expected but '[' found"
Did it give the same error on your project?
ASKER
and did you put
uses com.aql.gw1.sendservice;
after
implementation taq
?
uses com.aql.gw1.sendservice;
after
implementation taq
?
I commented them out. Probabbly not a good idea. Sorry, I forgot to mention that. It might not work then. Let me know because I think I know a way around that. Delphi doesn't seem to know about these attributes.
Regards Jacco
Regards Jacco
ASKER
which part did you comment out?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I changed the code a litte bit
procedure TWinForm.Button1_Click(sen der: System.Object; e: System.EventArgs);
var
Sms: gw11.sendservice.SendSmsSe rvice;
dest: array of string;
cb: callbackelement;
credit, desc: string;
begin
Sms := gw11.sendservice.SendSmsSe rvice.Crea te;
Sms.authValue := auth.Create;
Sms.authValue.username := 'xxx';
Sms.authValue.password := 'xxx';
SetLength(dest, 1);
dest[0] := '+xxxxx;
cb := callbackelement.Create;
cb.callbackurl := 'www.google.nl';
cb.callbacktype := callbacktypeoptions(none);
Sms.SoapSendSms(dest, '+xxxxx, 'Message from Delphi 2005!', gw11.sendservice.text, '1', System.DateTime.Now, True, cb, credit, desc);
TextBox1.Text := desc;
TextBox2.Text := credit;
Sms.Free;
end;
and it worked perfect!!!!
All points are yours.
thanks a lot!
procedure TWinForm.Button1_Click(sen
var
Sms: gw11.sendservice.SendSmsSe
dest: array of string;
cb: callbackelement;
credit, desc: string;
begin
Sms := gw11.sendservice.SendSmsSe
Sms.authValue := auth.Create;
Sms.authValue.username := 'xxx';
Sms.authValue.password := 'xxx';
SetLength(dest, 1);
dest[0] := '+xxxxx;
cb := callbackelement.Create;
cb.callbackurl := 'www.google.nl';
cb.callbacktype := callbacktypeoptions(none);
Sms.SoapSendSms(dest, '+xxxxx, 'Message from Delphi 2005!', gw11.sendservice.text, '1', System.DateTime.Now, True, cb, credit, desc);
TextBox1.Text := desc;
TextBox2.Text := credit;
Sms.Free;
end;
and it worked perfect!!!!
All points are yours.
thanks a lot!
I created a WinForms .NET application. On the form I added a button and two TextBox components.
The following code calls the webservice:
procedure TWinForm.Button1_Click(sen
var
Sms: com.aql.gw1.sendservice.Se
dest: array of string;
cb: callbackelement;
credit, desc: string;
begin
Sms := com.aql.gw1.sendservice.Se
Sms.authValue := auth.Create;
Sms.authValue.username := 'Jacco';
Sms.authValue.password := 'test';
SetLength(dest, 1);
dest[0] := '+yourphone';
cb := callbackelement.Create;
cb.callbackurl := 'www.google.nl';
cb.callbacktype := com.aql.gw1.sendservice.ca
Sms.SoapSendSms(dest, '+yourotherphone', 'Message from Delphi 2005!', com.aql.gw1.sendservice.te
TextBox1.Text := desc;
TextBox2.Text := credit;
Sms.Free;
end;
Replace +yourphone and +yourotherphone by valid phonenumbers
Replace the username and password with the ones you received aql.com
And it should work.
I got an error saying that my username and password were wrong.
Regards Jacco