Forum > Networking and Web Programming

Problem with wsdl importer in wst 0.7

(1/1)

calebs:
Hello all! Thanks for your help in advance!

I have 2 files i need to import. The first was created ok and gives no error when compiling but the second generates 3 files and an error when i try to compile.
Ill paste the files here, sorry for this long post, first the wsdl file and then the 3 files that generates the wizard in lazarus 2.0 with wst 0.7 installed from the online package manager included.
I'll remark where gives me the error. I have not much experience in objets nor xml but it seems that some declaration is missing in the third file (the proxy).
I don't know if its a bug in the importer, have tried many times varying checkboxes on wizard but always ends with this error.
I don't think the wsdl file is malformed, it's from the federal argentinian fiscal office (or something like that in english) is the file to negotiate the tokens for the electronic bill service.
Thanks again in advance for your help!

----------------------------- servwsaa.wsdl -----------------------------------

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions targetNamespace="https://wsaahomo.afip.gov.ar/ws/services/LoginCms" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="https://wsaahomo.afip.gov.ar/ws/services/LoginCms" xmlns:intf="https://wsaahomo.afip.gov.ar/ws/services/LoginCms" xmlns:tns1="http://wsaa.view.sua.dvadac.desein.afip.gov" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><!--WSDL created by Apache Axis version: 1.4Built on Apr 22, 2006 (06:55:48 PDT)--> <wsdl:types>  <schema elementFormDefault="qualified" targetNamespace="http://wsaa.view.sua.dvadac.desein.afip.gov" xmlns="http://www.w3.org/2001/XMLSchema">   <import namespace="https://wsaahomo.afip.gov.ar/ws/services/LoginCms"/>   <element name="loginCms">    <complexType>     <sequence>      <element name="in0" type="xsd:string"/>     </sequence>    </complexType>   </element>   <element name="loginCmsResponse">    <complexType>     <sequence>      <element name="loginCmsReturn" type="xsd:string"/>     </sequence>    </complexType>   </element>  </schema>  <schema elementFormDefault="qualified" targetNamespace="https://wsaahomo.afip.gov.ar/ws/services/LoginCms" xmlns="http://www.w3.org/2001/XMLSchema">   <complexType name="LoginFault">    <sequence/>   </complexType>   <element name="fault" type="impl:LoginFault"/>  </schema> </wsdl:types>    <wsdl:message name="loginCmsRequest">       <wsdl:part element="tns1:loginCms" name="parameters"/>    </wsdl:message>    <wsdl:message name="LoginFault">       <wsdl:part element="impl:fault" name="fault"/>    </wsdl:message>    <wsdl:message name="loginCmsResponse">       <wsdl:part element="tns1:loginCmsResponse" name="parameters"/>    </wsdl:message>    <wsdl:portType name="LoginCMS">       <wsdl:operation name="loginCms">          <wsdl:input message="impl:loginCmsRequest" name="loginCmsRequest"/>          <wsdl:output message="impl:loginCmsResponse" name="loginCmsResponse"/>          <wsdl:fault message="impl:LoginFault" name="LoginFault"/>       </wsdl:operation>    </wsdl:portType>    <wsdl:binding name="LoginCmsSoapBinding" type="impl:LoginCMS">       <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>       <wsdl:operation name="loginCms">          <wsdlsoap:operation soapAction=""/>          <wsdl:input name="loginCmsRequest">             <wsdlsoap:body use="literal"/>          </wsdl:input>          <wsdl:output name="loginCmsResponse">             <wsdlsoap:body use="literal"/>          </wsdl:output>          <wsdl:fault name="LoginFault">             <wsdlsoap:fault name="LoginFault" use="literal"/>          </wsdl:fault>       </wsdl:operation>    </wsdl:binding>    <wsdl:service name="LoginCMSService">       <wsdl:port binding="impl:LoginCmsSoapBinding" name="LoginCms">          <wsdlsoap:address location="https://wsaahomo.afip.gov.ar/ws/services/LoginCms"/>       </wsdl:port>    </wsdl:service> </wsdl:definitions> ---------------------------------- end of file -------------------------------

-------------------------------- servwsaa.pas -----------------------------

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{This unit has been produced by ws_helper.  Input unit name : "servwsaa".  This unit name  : "servwsaa".  Date            : "07/03/2019 01:34:23".}unit servwsaa;{$IFDEF FPC}  {$mode objfpc} {$H+}{$ENDIF}{$DEFINE WST_RECORD_RTTI}interface uses SysUtils, Classes, TypInfo, base_service_intf, service_intf,     http_wsaa_view_sua_dvadac_desein_afip_gov; const  sNAME_SPACE = 'https://wsaahomo.afip.gov.ar/ws/services/LoginCms';  sUNIT_NAME = 'servwsaa'; type   LoginFault = class;   fault = LoginFault;   LoginFault = class(TBaseComplexRemotable)  end;   LoginCMS = interface(IInvokable)    ['{3C1B7CC0-7982-47A3-B10F-29B586EF055D}']    function loginCms(      const  loginCmsParam : loginCms_Type    ):loginCmsResponse;  end;   procedure Register_servwsaa_ServiceMetadata(); Implementationuses metadata_repository, record_rtti, wst_types;  procedure Register_servwsaa_ServiceMetadata();var  mm : IModuleMetadataMngr;begin  mm := GetModuleMetadataMngr();  mm.SetRepositoryNameSpace(sUNIT_NAME, sNAME_SPACE);  mm.SetRepositoryCustomData(sUNIT_NAME, 'elementFormDefault', 'qualified');  mm.SetServiceCustomData(    sUNIT_NAME,    'LoginCMS',    'TRANSPORT_Address',    'https://wsaahomo.afip.gov.ar/ws/services/LoginCms'  );  mm.SetServiceCustomData(    sUNIT_NAME,    'LoginCMS',    'FORMAT_Style',    'document'  );  mm.SetOperationCustomData(    sUNIT_NAME,    'LoginCMS',    'loginCms',    '_E_N_',    'loginCms'  );  mm.SetOperationCustomData(    sUNIT_NAME,    'LoginCMS',    'loginCms',    'TRANSPORT_soapAction',    ''  );  mm.SetOperationCustomData(    sUNIT_NAME,    'LoginCMS',    'loginCms',    'FORMAT_Input_EncodingStyle',    'literal'  );  mm.SetOperationCustomData(    sUNIT_NAME,    'LoginCMS',    'loginCms',    'FORMAT_OutputEncodingStyle',    'literal'  );end;  var  typeRegistryInstance : TTypeRegistry = nil;initialization  typeRegistryInstance := GetTypeRegistry();   typeRegistryInstance.Register(sNAME_SPACE,TypeInfo(LoginFault),'LoginFault',[trioqualifiedElement]);   End. ---------------------------------- end of file -------------------------------

-------------------http_wsaa_view_sua_dvadac_desein_afip_gov.pas-------------------------

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{This unit has been produced by ws_helper.  Input unit name : "http_wsaa_view_sua_dvadac_desein_afip_gov".  This unit name  : "http_wsaa_view_sua_dvadac_desein_afip_gov".  Date            : "07/03/2019 01:34:23".}unit http_wsaa_view_sua_dvadac_desein_afip_gov;{$IFDEF FPC}  {$mode objfpc} {$H+}{$ENDIF}{$DEFINE WST_RECORD_RTTI}interface uses SysUtils, Classes, TypInfo, base_service_intf, service_intf; const  sNAME_SPACE = 'http://wsaa.view.sua.dvadac.desein.afip.gov';  sUNIT_NAME = 'http_wsaa_view_sua_dvadac_desein_afip_gov'; type   loginCms_Type = class;  loginCmsResponse = class;   loginCms_Type = class(TBaseComplexRemotable)  private    Fin0 : UnicodeString;  published    property in0 : UnicodeString read Fin0 write Fin0;  end;   loginCmsResponse = class(TBaseComplexRemotable)  private    FloginCmsReturn : UnicodeString;  published    property loginCmsReturn : UnicodeString read FloginCmsReturn write FloginCmsReturn;  end; Implementationuses metadata_repository, record_rtti, wst_types;  var  typeRegistryInstance : TTypeRegistry = nil;initialization  typeRegistryInstance := GetTypeRegistry();   typeRegistryInstance.Register(sNAME_SPACE,TypeInfo(loginCms_Type),'loginCms',[trioqualifiedElement]);  typeRegistryInstance.Register(sNAME_SPACE,TypeInfo(loginCmsResponse),'loginCmsResponse',[trioqualifiedElement]);   End. ---------------------------------- end of file -------------------------------

---------------------- servwsaa_proxy.pas------------------------------

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{This unit has been produced by ws_helper.  Input unit name : "servwsaa".  This unit name  : "servwsaa_proxy".  Date            : "07/03/2019 01:34:23".} Unit servwsaa_proxy;{$IFDEF FPC} {$mode objfpc}{$H+} {$ENDIF}Interface Uses SysUtils, Classes, TypInfo, base_service_intf, service_intf, servwsaa,     http_wsaa_view_sua_dvadac_desein_afip_gov; Type    TLoginCMS_Proxy=class(TBaseProxy,http_wsaa_view_sua_dvadac_desein_afip_gov.LoginCMS) [b][i]<<<<< servwsaa_proxy.pas(18,86) Error: Identifier not found "http_wsaa_view_sua_dvadac_desein_afip_gov"[/i][/b]  Protected    class function GetServiceType() : PTypeInfo;override;    function loginCms(      const  loginCmsParam : loginCms_Type    ):loginCmsResponse;  End;   Function wst_CreateInstance_LoginCMS(const AFormat : string = 'SOAP:'; const ATransport : string = 'HTTP:'; const AAddress : string = ''):LoginCMS; Implementationuses wst_resources_imp, metadata_repository;  Function wst_CreateInstance_LoginCMS(const AFormat : string; const ATransport : string; const AAddress : string):LoginCMS;Var  locAdr : string;Begin  locAdr := AAddress;  if ( locAdr = '' ) then    locAdr := GetServiceDefaultAddress(TypeInfo(LoginCMS));  Result := TLoginCMS_Proxy.Create('LoginCMS',AFormat+GetServiceDefaultFormatProperties(TypeInfo(LoginCMS)),ATransport + 'address=' + locAdr);End; { TLoginCMS_Proxy implementation } class function TLoginCMS_Proxy.GetServiceType() : PTypeInfo;begin  result := TypeInfo(http_wsaa_view_sua_dvadac_desein_afip_gov.LoginCMS);end; function TLoginCMS_Proxy.loginCms(  const  loginCmsParam : loginCms_Type):loginCmsResponse;Var  locSerializer : IFormatterClient;  locCallContext : ICallContext;  locStrPrmName : string;Begin  locCallContext := Self as ICallContext;  locSerializer := GetSerializer();  Try    locSerializer.BeginCall('loginCms', GetTarget(),locCallContext);      locSerializer.Put('loginCms', TypeInfo(loginCms_Type), loginCmsParam);    locSerializer.EndCall();     MakeCall();     locSerializer.BeginCallRead(locCallContext);      Result := Nil;      locStrPrmName := 'loginCmsResponse';      locSerializer.Get(TypeInfo(loginCmsResponse), locStrPrmName, Result);   Finally    locSerializer.Clear();  End;End;  initialization  {$i servwsaa.wst}   {$IF DECLARED(Register_servwsaa_ServiceMetadata)}  Register_servwsaa_ServiceMetadata();  {$IFEND}End. ---------------------------------- end of file -------------------------------

Navigation

[0] Message Index

Go to full version