Good Day
I am busy writing an application in Delphi 7 which needs to communicate with a Web Service
My problem is too do with the way delphi is sending Complex Types to the methods on the WebService I think
The particular method that I am using on the WebService has the following definition
function queryMSISDN(const user: PCRUser; const msisdn: WideString): MSISDNInfo; stdcall;
I get the following error when calling this method:
Invalid Property Element
My Delphi Code looks like follows:
var
iXML : MSISDNRegistrationServiceSoapBindingImpl;
AUser : PCRUser;
APassword : Password;
RMSISDNInfo : MSISDNInfo;
begin
iXMl := GetMSISDNRegistrationServiceSoapBindingImpl;
try
AUser := PCRUser.Create;
AUser.groupName := '';
APassword := Password.Create;
APassword.Text := '';
AUser.password := APassword;
AUser.Agent := '';
AUser.OperatorID := '';
RMSISDNInfo := ixml.queryMSISDN(AUser,'0832873201');
finally
FreeAndNil(AUser);
ixml := nil;
end;
Now the problem I think has to do with the PCRUser parameter to this method
The structure of this class is as follows:
PCRUser = class(TRemotable)
private
FgroupName: WideString;
Fpassword: Password;
FAgent: WideString;
Fnetwork: WideString;
FoperatorID: WideString;
You will note in the structure above that there is a "FPassword" field of type "Password". Hence I have a nested class, PCRUser which contains Password. I am thinking the problem is with how this XML is sent by Delphi to the Webservice
I am not sure how to view the XML that delphi is sending, is there a freeware tool available for this
Also I am unable to access the Web Services code as this is maintained by another company. I have requested that they see what XML they are receiving from me though
If I use another method of the webservice such as
function pingService(const user: WideString): ResultCode; stdcall;
which only requires a widestring as a parameter then this returns a result no problem
Any help with this problem would be greatly appreciated
Thanks
Mark
I am busy writing an application in Delphi 7 which needs to communicate with a Web Service
My problem is too do with the way delphi is sending Complex Types to the methods on the WebService I think
The particular method that I am using on the WebService has the following definition
function queryMSISDN(const user: PCRUser; const msisdn: WideString): MSISDNInfo; stdcall;
I get the following error when calling this method:
Invalid Property Element
My Delphi Code looks like follows:
var
iXML : MSISDNRegistrationServiceSoapBindingImpl;
AUser : PCRUser;
APassword : Password;
RMSISDNInfo : MSISDNInfo;
begin
iXMl := GetMSISDNRegistrationServiceSoapBindingImpl;
try
AUser := PCRUser.Create;
AUser.groupName := '';
APassword := Password.Create;
APassword.Text := '';
AUser.password := APassword;
AUser.Agent := '';
AUser.OperatorID := '';
RMSISDNInfo := ixml.queryMSISDN(AUser,'0832873201');
finally
FreeAndNil(AUser);
ixml := nil;
end;
Now the problem I think has to do with the PCRUser parameter to this method
The structure of this class is as follows:
PCRUser = class(TRemotable)
private
FgroupName: WideString;
Fpassword: Password;
FAgent: WideString;
Fnetwork: WideString;
FoperatorID: WideString;
You will note in the structure above that there is a "FPassword" field of type "Password". Hence I have a nested class, PCRUser which contains Password. I am thinking the problem is with how this XML is sent by Delphi to the Webservice
I am not sure how to view the XML that delphi is sending, is there a freeware tool available for this
Also I am unable to access the Web Services code as this is maintained by another company. I have requested that they see what XML they are receiving from me though
If I use another method of the webservice such as
function pingService(const user: WideString): ResultCode; stdcall;
which only requires a widestring as a parameter then this returns a result no problem
Any help with this problem would be greatly appreciated
Thanks
Mark