Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Data type problem? Calling SOAP WS in IOS 64-B Platform get AccessViolation


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Last Post: Aug 18, 2016 11:08 AM Last Post By: Luis Lopez
Luis Lopez

Posts: 11
Registered: 9/4/16
Data type problem? Calling SOAP WS in IOS 64-B Platform get AccessViolation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 17, 2016 9:56 AM
Hello

I have a web service client in a Firemonkey App, the SOAP web service works fine in the next platforms: Windows 32 and 64-bit, Android, IOS 32-bit. But when i try to execute the web service in a 9.3.2 64- bit IOS device i get an acces violation. This WS request some information to a server about clients and products. I think this may be a Data type problem but not 100% sure about this, i'm using RS Berlín. Hope someone can help me with this problem, Thanks.

Edited by: Luis Lopez on Aug 17, 2016 10:00 AM
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: Data type problem? Calling SOAP WS in IOS 64-B Platform get AccessViolation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 17, 2016 9:54 PM   in response to: Luis Lopez in response to: Luis Lopez
I have a web service client in a Firemonkey App, the SOAP web service works fine in the next platforms: Windows 32 and 64-bit, Android, IOS 32-bit. But when i try to execute the web service in a 9.3.2 64- bit IOS device i get an acces violation. This WS request some information to a server about clients and products. I think this may be a Data type problem but not 100% sure about this, i'm using RS Berlín. Hope someone can help me with this problem, Thanks.

Example code might help. Is the webservice on a public site? What's the endpoint URL?

--
Dave Nottage [TeamB]
Delphi Worlds blog: http://www.delphiworlds.com/blog
Jose Luis Rocha

Posts: 77
Registered: 1/11/02
Re: Data type problem? Calling SOAP WS in IOS 64-B Platform get AccessViolation [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 18, 2016 12:34 AM   in response to: Luis Lopez in response to: Luis Lopez
Maybe related to https://quality.embarcadero.com/browse/RSP-14897

--
J.L.Rocha [OfiPro]

Luis Lopez

Posts: 11
Registered: 9/4/16
Re: Data type problem? Calling SOAP WS in IOS 64-B Platform get AccessViolation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 18, 2016 11:08 AM   in response to: Luis Lopez in response to: Luis Lopez
The web service client receive data from a private server, the web service is made in .NET C#. I imported the wsdl with the WSDL wizard in RS, this automatically generated the unit with all the methods so in my main form i call "GetClients" with the next code.

VAR
vclientes:ArrayOfCLClient;
IMEI:String;
BEGIN
IMEI := 'IOS DEVICE';
vclientes := wsComercial.GetwsComercialSoap().GetClients(Trim('XXXXX-XXXXXXXX-XXXX-XXXX'), Trim('User'), Trim('password'),'', IMEI);
...
//Insert the obtained data in a SQLite Table here
...
end;

Next is my WS unit method of GetClients along with the initialization

CLClient = class; { "http://tempuri.org/"[GblCplx] }
ArrayOfClClient = array of clClient; { "http://tempuri.org/"[GblCplx] }

// ************************************************************************ //
// XML : CLClient, global, <complexType>
// Namespace : http://tempuri.org/
// ************************************************************************ //
CLClient = class(TRemotable)
private
FCIDCliente: Integer;
FClave: string;
FClave_Specified: boolean;
FNombre: string;
FNombre_Specified: boolean;
FLista: Integer;
FCNOMBRECALLE: string;
FCNOMBRECALLE_Specified: boolean;
FCNUMEROEXTERIOR: string;
FCNUMEROEXTERIOR_Specified: boolean;
FCNUMEROINTERIOR: string;
FCNUMEROINTERIOR_Specified: boolean;
FCCOLONIA: string;
FCCOLONIA_Specified: boolean;
FCCODIGOPOSTAL: string;
FCCODIGOPOSTAL_Specified: boolean;
FCTELEFONO1: string;
FCTELEFONO1_Specified: boolean;
FCTELEFONO2: string;
FCTELEFONO2_Specified: boolean;
FCTELEFONO3: string;
FCTELEFONO3_Specified: boolean;
FCEMAIL: string;
FCEMAIL_Specified: boolean;
FCDIRECCIONWEB: string;
FCDIRECCIONWEB_Specified: boolean;
FCPAIS: string;
FCPAIS_Specified: boolean;
FCESTADO: string;
FCESTADO_Specified: boolean;
FCCIUDAD: string;
FCCIUDAD_Specified: boolean;
FCMUNICIPIO: string;
FCMUNICIPIO_Specified: boolean;
FALIAS:string;
FALIAS_SPECIFIED:boolean;
FFrecuenciaVisita: Integer;
procedure SetClave(Index: Integer; const Astring: string);
function Clave_Specified(Index: Integer): boolean;
procedure SetNombre(Index: Integer; const Astring: string);
function Nombre_Specified(Index: Integer): boolean;
procedure SetCNOMBRECALLE(Index: Integer; const Astring: string);
function CNOMBRECALLE_Specified(Index: Integer): boolean;
procedure SetCNUMEROEXTERIOR(Index: Integer; const Astring: string);
function CNUMEROEXTERIOR_Specified(Index: Integer): boolean;
procedure SetCNUMEROINTERIOR(Index: Integer; const Astring: string);
function CNUMEROINTERIOR_Specified(Index: Integer): boolean;
procedure SetCCOLONIA(Index: Integer; const Astring: string);
function CCOLONIA_Specified(Index: Integer): boolean;
procedure SetCCODIGOPOSTAL(Index: Integer; const Astring: string);
function CCODIGOPOSTAL_Specified(Index: Integer): boolean;
procedure SetCTELEFONO1(Index: Integer; const Astring: string);
function CTELEFONO1_Specified(Index: Integer): boolean;
procedure SetCTELEFONO2(Index: Integer; const Astring: string);
function CTELEFONO2_Specified(Index: Integer): boolean;
procedure SetCTELEFONO3(Index: Integer; const Astring: string);
function CTELEFONO3_Specified(Index: Integer): boolean;
procedure SetCEMAIL(Index: Integer; const Astring: string);
function CEMAIL_Specified(Index: Integer): boolean;
procedure SetCDIRECCIONWEB(Index: Integer; const Astring: string);
function CDIRECCIONWEB_Specified(Index: Integer): boolean;
procedure SetCPAIS(Index: Integer; const Astring: string);
function CPAIS_Specified(Index: Integer): boolean;
procedure SetCESTADO(Index: Integer; const Astring: string);
function CESTADO_Specified(Index: Integer): boolean;
procedure SetCCIUDAD(Index: Integer; const Astring: string);
function CCIUDAD_Specified(Index: Integer): boolean;
procedure SetCMUNICIPIO(Index: Integer; const Astring: string);
function CMUNICIPIO_Specified(Index: Integer): boolean;

procedure SetALIAS(Index:Integer; const Astring:string);////////
function ALIAS_SPECIFIED(Index:Integer):boolean;////////////////

published
property CIDCliente: Integer read FCIDCliente write FCIDCliente;
property Clave: string Index (IS_OPTN) read FClave write SetClave stored Clave_Specified;
property Nombre: string Index (IS_OPTN) read FNombre write SetNombre stored Nombre_Specified;
property Lista: Integer read FLista write FLista;
property CNOMBRECALLE: string Index (IS_OPTN) read FCNOMBRECALLE write SetCNOMBRECALLE stored CNOMBRECALLE_Specified;
property CNUMEROEXTERIOR: string Index (IS_OPTN) read FCNUMEROEXTERIOR write SetCNUMEROEXTERIOR stored CNUMEROEXTERIOR_Specified;
property CNUMEROINTERIOR: string Index (IS_OPTN) read FCNUMEROINTERIOR write SetCNUMEROINTERIOR stored CNUMEROINTERIOR_Specified;
property CCOLONIA: string Index (IS_OPTN) read FCCOLONIA write SetCCOLONIA stored CCOLONIA_Specified;
property CCODIGOPOSTAL: string Index (IS_OPTN) read FCCODIGOPOSTAL write SetCCODIGOPOSTAL stored CCODIGOPOSTAL_Specified;
property CTELEFONO1: string Index (IS_OPTN) read FCTELEFONO1 write SetCTELEFONO1 stored CTELEFONO1_Specified;
property CTELEFONO2: string Index (IS_OPTN) read FCTELEFONO2 write SetCTELEFONO2 stored CTELEFONO2_Specified;
property CTELEFONO3: string Index (IS_OPTN) read FCTELEFONO3 write SetCTELEFONO3 stored CTELEFONO3_Specified;
property CEMAIL: string Index (IS_OPTN) read FCEMAIL write SetCEMAIL stored CEMAIL_Specified;
property CDIRECCIONWEB: string Index (IS_OPTN) read FCDIRECCIONWEB write SetCDIRECCIONWEB stored CDIRECCIONWEB_Specified;
property CPAIS: string Index (IS_OPTN) read FCPAIS write SetCPAIS stored CPAIS_Specified;
property CESTADO: string Index (IS_OPTN) read FCESTADO write SetCESTADO stored CESTADO_Specified;
property CCIUDAD: string Index (IS_OPTN) read FCCIUDAD write SetCCIUDAD stored CCIUDAD_Specified;
property CMUNICIPIO: string Index (IS_OPTN) read FCMUNICIPIO write SetCMUNICIPIO stored CMUNICIPIO_Specified;

property Alias: string Index (IS_OPTN) read FALIAS write setALIAS stored ALIAS_SPECIFIED;
property FrecuenciaVisita: Integer read FFrecuenciaVisita write FFrecuenciaVisita;
end;

function GetClients(const licencia: string; const usuario: string; const clave: string; const nombreCliente: string; const idDispositivo:string): ArrayOfClClient; stdcall;

function GetwsComercialSoap(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): wsComercialSoap;
const
defWSDL = 'http://www.domain.com.mx/iposws/wsComercial.asmx?WSDL';
defURL = 'http://www.domain.com.mx/iposws/wsComercial.asmx';

defSvc = 'wsComercial';
defPrt = 'wsComercialSoap';
var
RIO: THTTPRIO;
begin

Result := nil;
if (Addr = '') then
begin
if UseWSDL then
Addr := defWSDL
else
Addr := defURL;
end;
if HTTPRIO = nil then
RIO := THTTPRIO.Create(nil)
else
RIO := HTTPRIO;
try
if RIO is THTTPRIO then
begin
THTTPRIO(RIO).HTTPWebNode.ConnectTimeout := 300000;//5 Min
THTTPRIO(RIO).HTTPWebNode.SendTimeout := 300000; //5 Min
THTTPRIO(RIO).HTTPWebNode.ReceiveTimeout := 300000; //5 Min
end;

Result := (RIO as wsComercialSoap);
if UseWSDL then
begin
RIO.WSDLLocation := Addr;
RIO.Service := defSvc;
RIO.Port := defPrt;
end else
RIO.URL := Addr;
finally
if (Result = nil) and (HTTPRIO = nil) then
RIO.Free;
end;
end;

initialization
{ wsComercialSoap }
InvRegistry.RegisterInterface(TypeInfo(wsComercialSoap), 'http://tempuri.org/', 'utf-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(wsComercialSoap), 'http://tempuri.org/%operationName%');
InvRegistry.RegisterInvokeOptions(TypeInfo(wsComercialSoap), ioDocument);

{ wsComercialSoap.GetClients }
InvRegistry.RegisterMethodInfo(TypeInfo(wsComercialSoap), 'GetClients', '',
'[ReturnName="GetClientsResult"]', IS_OPTN);
InvRegistry.RegisterParamInfo(TypeInfo(wsComercialSoap), 'GetClients', 'GetClientsResult', '',
'[ArrayItemName="clClient"]');

RemClassRegistry.RegisterXSInfo(TypeInfo(ArrayOfClClient), 'http://tempuri.org/', 'ArrayOfClClient');
RemClassRegistry.RegisterXSClass(clClient, 'http://tempuri.org/', 'clClient');
end;

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02