Home > Back-end >  DELPHI invokes the Java webservices
DELPHI invokes the Java webservices

Time:09-17

Receiving returns The Times wrong
Rased excepbon dass DCMLDofrror with message 'Element' file 'does not conbin a single text node'.

Emphasis should be on the line if we need to modify the
RemClassRegistry. RegisterExternalPropName (TypeInfo (cxfFileWrapper2), 'file_', '/ExtName="file");


DELPHI import the generated
 unit uploadFileService1; 

Interface

USES the Soap InvokeRegistry, Soap. SOAPHTTPClient System. The Types, Soap. XSBuiltIns;

Const
IS_OPTN=$0001;
IS_UNQL=$0008;


Type

//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
//The following types, referred to in The WSDL document are not being represented
//in this file. They are either aliases (@) of other types represented the or were referred
//to but never [!] Declared in the document. The types from the latter category
//typically map to a predefined/known XML or Embarcadero types; Or, they could also
//indicate incorrect WSDL documents that failed to declare the or import a schema type.
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
//! : base64Binary - "http://www.w3.org/2001/XMLSchema" (Gbl)
//! : string - "http://www.w3.org/2001/XMLSchema" (Gbl)

CxfFileWrapper2=class; {" http://webServices.taiyu.com/"[GblCplx]}
CxfFileWrapper=class; {" http://webServices.taiyu.com/"[GblElm]}



//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
//XML: cxfFileWrapper, global, & lt; ComplexType>
//Namespace: http://webServices.taiyu.com/
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
CxfFileWrapper2=class (TRemotable)
Private
FfileName: string;
FfileName_Specified: Boolean;
FfileExtension: string;
FfileExtension_Specified: Boolean;
FbatchNumber: string;
FbatchNumber_Specified: Boolean;
Fmsg: string;
Fmsg_Specified: Boolean;
Ffile_ : TByteDynArray;
Ffile__Specified: Boolean;
Procedure SetfileName (Index: Integer; Const Astring: string);
The function fileName_Specified (Index: Integer) : Boolean;
Procedure SetfileExtension (Index: Integer; Const Astring: string);
The function fileExtension_Specified (Index: Integer) : Boolean;
Procedure SetbatchNumber (Index: Integer; Const Astring: string);
The function batchNumber_Specified (Index: Integer) : Boolean;
Procedure Setmsg (Index: Integer; Const Astring: string);
The function msg_Specified (Index: Integer) : Boolean;
Procedure Setfile_ (Index: Integer; Const ATByteDynArray: TByteDynArray);
The function file__Specified (Index: Integer) : Boolean;
Published
The property fileName: string Index (IS_OPTN or IS_UNQL) read FfileName write SetfileName stored fileName_Specified;
The property fileExtension: string Index (IS_OPTN or IS_UNQL) read FfileExtension write SetfileExtension stored fileExtension_Specified;
The property batchNumber: string Index (IS_OPTN or IS_UNQL) read FbatchNumber write SetbatchNumber stored batchNumber_Specified;
The property of MSG: string Index (IS_OPTN or IS_UNQL) read Fmsg write Setmsg stored msg_Specified;
The property file_ : TByteDynArray Index (IS_OPTN or IS_UNQL) read Ffile_ write Setfile_ stored file__Specified;
The end;



//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
//XML: cxfFileWrapper, global, & lt; Element>
//Namespace: http://webServices.taiyu.com/
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
CxfFileWrapper=class (cxfFileWrapper2)
Private
Published
The end;


//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
//Namespace: http://webServices.taiyu.com/
//transport: http://schemas.xmlsoap.org/soap/http
//style: RPC
//use: literal
//binding: UploadFileServiceServiceSoapBinding
//service: UploadFileServiceService
//the port: UploadFileServicePort
//URL: http://192.168.0.130/dmsi/services/uploadFileService
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
UploadFileService=interface (IInvokable)
[' {77050 f0 b9a BC13-820 - b - 85-0822437 b1f4d} ']
Procedure isTransferFlag (const arg0: cxfFileWrapper); Stdcall;
The function getTransferDmsi (const arg0: cxfFileWrapper) : cxfFileWrapper; Stdcall;
The end;

The function GetUploadFileService (UseWSDL: Boolean=System. False. Addr: string='; HTTPRIO: THTTPRIO=nil) : UploadFileService;


Implementation
USES the System. The SysUtils;

The function GetUploadFileService (UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO) : UploadFileService;
Const
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related