1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: 201: 202: 203: 204: 205: 206: 207: 208: 209: 210: 211: 212: 213: 214: 215: 216: 217: 218: 219: 220: 221: 222: 223: 224: 225: 226: 227: 228: 229: 230: 231: 232: 233: 234: 235: 236: 237: 238: 239: 240: 241: 242: 243: 244: 245: 246: 247: 248: 249: 250: 251: 252: 253: 254: 255: 256: 257: 258: 259: 260: 261: 262: 263: 264: 265: 266: 267: 268: 269: 270: 271: 272: 273: 274: 275: 276: 277: 278: 279: 280: 281: 282: 283: 284: 285: 286: 287: 288: 289: 290: 291: 292: 293: 294: 295: 296: 297: 298: 299: 300: 301: 302: 303: 304: 305: 306: 307: 308: 309: 310: 311: 312: 313: 314: 315: 316: 317: 318: 319: 320: 321: 322: 323: 324: 325: 326: 327: 328: 329: 330: 331: 332: 333: 334: 335: 336: 337: 338: 339: 340: 341: 342: 343: 344: 345: 346: 347: 348: 349: 350: 351: 352: 353: 354: 355: 356: 357: 358: 359: 360: 361: 362: 363: 364: 365: 366: 367: 368: 369: 370: 371: 372: 373: 374: 375: 376: 377: 378: 379: 380: 381: 382: 383: 384: 385: 386: 387: 388: 389: 390: 391: 392: 393: 394: 395: 396: 397: 398: 399: 400: 401: 402: 403: 404: 405: 406: 407: 408: 409: 410: 411: 412: 413: 414: 415: 416: 417: 418: 419: 420: 421: 422: 423: 424: 425: 426: 427: 428: 429: 430: 431: 432: 433:
|
unit Daten4;
interface
uses Soap.InvokeRegistry, Soap.SOAPHTTPClient, System.Types, Soap.XSBuiltIns;
const IS_OPTN = $0001; IS_UNBD = $0002; IS_ATTR = $0010; IS_REF = $0080;
type
Row = class; XacuteResponse = class; Rowset = class; XacuteRequest = class; InputParams = class;
Row = class(TRemotable) private published end;
Array_Of_Row = array of Row;
XacuteResponse = class(TRemotable) private FRowset: Rowset; FRowset_Specified: boolean; procedure SetRowset(Index: Integer; const ARowset: Rowset); function Rowset_Specified(Index: Integer): boolean; public constructor Create; override; destructor Destroy; override; published property Rowset: Rowset Index (IS_OPTN) read FRowset write SetRowset stored Rowset_Specified; end;
Rowset = class(TRemotable) private FMessage_: string; FMessage__Specified: boolean; FRow: Array_Of_Row; FRow_Specified: boolean; procedure SetMessage_(Index: Integer; const Astring: string); function Message__Specified(Index: Integer): boolean; procedure SetRow(Index: Integer; const AArray_Of_Row: Array_Of_Row); function Row_Specified(Index: Integer): boolean; public destructor Destroy; override; published property Message_: string Index (IS_ATTR or IS_OPTN) read FMessage_ write SetMessage_ stored Message__Specified; property Row: Array_Of_Row Index (IS_OPTN or IS_UNBD) read FRow write SetRow stored Row_Specified; end;
XacuteRequest = class(TRemotable) private FLoginName: string; FLoginName_Specified: boolean; FLoginPassword: string; FLoginPassword_Specified: boolean; FInputParams: InputParams; FInputParams_Specified: boolean; procedure SetLoginName(Index: Integer; const Astring: string); function LoginName_Specified(Index: Integer): boolean; procedure SetLoginPassword(Index: Integer; const Astring: string); function LoginPassword_Specified(Index: Integer): boolean; procedure SetInputParams(Index: Integer; const AInputParams: InputParams); function InputParams_Specified(Index: Integer): boolean; public constructor Create; override; destructor Destroy; override; published property LoginName: string Index (IS_OPTN) read FLoginName write SetLoginName stored LoginName_Specified; property LoginPassword: string Index (IS_OPTN) read FLoginPassword write SetLoginPassword stored LoginPassword_Specified; property InputParams: InputParams Index (IS_OPTN) read FInputParams write SetInputParams stored InputParams_Specified; end;
InputParams = class(TRemotable) private FbDebug: Boolean; FbDebug_Specified: boolean; FiDigits: Int64; FiDigits_Specified: boolean; FsMaterialNumbers: string; FsMaterialNumbers_Specified: boolean; FsResource: string; FsResource_Specified: boolean; FsSite: string; FsSite_Specified: boolean; FsWorkCenter: string; FsWorkCenter_Specified: boolean; procedure SetbDebug(Index: Integer; const ABoolean: Boolean); function bDebug_Specified(Index: Integer): boolean; procedure SetiDigits(Index: Integer; const AInt64: Int64); function iDigits_Specified(Index: Integer): boolean; procedure SetsMaterialNumbers(Index: Integer; const Astring: string); function sMaterialNumbers_Specified(Index: Integer): boolean; procedure SetsResource(Index: Integer; const Astring: string); function sResource_Specified(Index: Integer): boolean; procedure SetsSite(Index: Integer; const Astring: string); function sSite_Specified(Index: Integer): boolean; procedure SetsWorkCenter(Index: Integer; const Astring: string); function sWorkCenter_Specified(Index: Integer): boolean; published property bDebug: Boolean Index (IS_OPTN) read FbDebug write SetbDebug stored bDebug_Specified; property iDigits: Int64 Index (IS_OPTN) read FiDigits write SetiDigits stored iDigits_Specified; property sMaterialNumbers: string Index (IS_OPTN) read FsMaterialNumbers write SetsMaterialNumbers stored sMaterialNumbers_Specified; property sResource: string Index (IS_OPTN) read FsResource write SetsResource stored sResource_Specified; property sSite: string Index (IS_OPTN) read FsSite write SetsSite stored sSite_Specified; property sWorkCenter: string Index (IS_OPTN) read FsWorkCenter write SetsWorkCenter stored sWorkCenter_Specified; end;
XacuteWSSoap = interface(IInvokable) ['{918641B2-4942-255C-305D-E7206E249D09}']
function Xacute(const parameters: XacuteRequest): XacuteResponse; stdcall; end;
function GetXacuteWSSoap(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): XacuteWSSoap;
implementation uses System.SysUtils;
function GetXacuteWSSoap(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): XacuteWSSoap; const defWSDL = 'C:\Development\temp\18stellig\Daten.wsdl'; defURL = 'https://sapeiq.blanc-fischer.com:51001/XMII/SOAPRunner/G_MII_INTERFACE/CoreFunctions/Material/getMaterialByTranslatedNumberTransaction'; defSvc = 'XacuteWS'; defPrt = 'XacuteWSSoap'; 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 Result := (RIO as XacuteWSSoap); 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;
constructor XacuteResponse.Create; begin inherited Create; FSerializationOptions := [xoLiteralParam]; end;
destructor XacuteResponse.Destroy; begin System.SysUtils.FreeAndNil(FRowset); inherited Destroy; end;
procedure XacuteResponse.SetRowset(Index: Integer; const ARowset: Rowset); begin FRowset := ARowset; FRowset_Specified := True; end;
function XacuteResponse.Rowset_Specified(Index: Integer): boolean; begin Result := FRowset_Specified; end;
destructor Rowset.Destroy; var I: Integer; begin for I := 0 to System.Length(FRow)-1 do System.SysUtils.FreeAndNil(FRow[I]); System.SetLength(FRow, 0); inherited Destroy; end;
procedure Rowset.SetMessage_(Index: Integer; const Astring: string); begin FMessage_ := Astring; FMessage__Specified := True; end;
function Rowset.Message__Specified(Index: Integer): boolean; begin Result := FMessage__Specified; end;
procedure Rowset.SetRow(Index: Integer; const AArray_Of_Row: Array_Of_Row); begin FRow := AArray_Of_Row; FRow_Specified := True; end;
function Rowset.Row_Specified(Index: Integer): boolean; begin Result := FRow_Specified; end;
constructor XacuteRequest.Create; begin inherited Create; FSerializationOptions := [xoLiteralParam]; end;
destructor XacuteRequest.Destroy; begin System.SysUtils.FreeAndNil(FInputParams); inherited Destroy; end;
procedure XacuteRequest.SetLoginName(Index: Integer; const Astring: string); begin FLoginName := Astring; FLoginName_Specified := True; end;
function XacuteRequest.LoginName_Specified(Index: Integer): boolean; begin Result := FLoginName_Specified; end;
procedure XacuteRequest.SetLoginPassword(Index: Integer; const Astring: string); begin FLoginPassword := Astring; FLoginPassword_Specified := True; end;
function XacuteRequest.LoginPassword_Specified(Index: Integer): boolean; begin Result := FLoginPassword_Specified; end;
procedure XacuteRequest.SetInputParams(Index: Integer; const AInputParams: InputParams); begin FInputParams := AInputParams; FInputParams_Specified := True; end;
function XacuteRequest.InputParams_Specified(Index: Integer): boolean; begin Result := FInputParams_Specified; end;
procedure InputParams.SetbDebug(Index: Integer; const ABoolean: Boolean); begin FbDebug := ABoolean; FbDebug_Specified := True; end;
function InputParams.bDebug_Specified(Index: Integer): boolean; begin Result := FbDebug_Specified; end;
procedure InputParams.SetiDigits(Index: Integer; const AInt64: Int64); begin FiDigits := AInt64; FiDigits_Specified := True; end;
function InputParams.iDigits_Specified(Index: Integer): boolean; begin Result := FiDigits_Specified; end;
procedure InputParams.SetsMaterialNumbers(Index: Integer; const Astring: string); begin FsMaterialNumbers := Astring; FsMaterialNumbers_Specified := True; end;
function InputParams.sMaterialNumbers_Specified(Index: Integer): boolean; begin Result := FsMaterialNumbers_Specified; end;
procedure InputParams.SetsResource(Index: Integer; const Astring: string); begin FsResource := Astring; FsResource_Specified := True; end;
function InputParams.sResource_Specified(Index: Integer): boolean; begin Result := FsResource_Specified; end;
procedure InputParams.SetsSite(Index: Integer; const Astring: string); begin FsSite := Astring; FsSite_Specified := True; end;
function InputParams.sSite_Specified(Index: Integer): boolean; begin Result := FsSite_Specified; end;
procedure InputParams.SetsWorkCenter(Index: Integer; const Astring: string); begin FsWorkCenter := Astring; FsWorkCenter_Specified := True; end;
function InputParams.sWorkCenter_Specified(Index: Integer): boolean; begin Result := FsWorkCenter_Specified; end;
initialization InvRegistry.RegisterInterface(TypeInfo(XacuteWSSoap), 'http://www.sap.com/xMII', ''); InvRegistry.RegisterDefaultSOAPAction(TypeInfo(XacuteWSSoap), 'http://www.sap.com/xMII'); InvRegistry.RegisterInvokeOptions(TypeInfo(XacuteWSSoap), ioDocument); InvRegistry.RegisterInvokeOptions(TypeInfo(XacuteWSSoap), ioLiteral); RemClassRegistry.RegisterXSClass(Row, 'http://www.sap.com/xMII', 'Row'); RemClassRegistry.RegisterXSInfo(TypeInfo(Array_Of_Row), 'http://www.sap.com/xMII', 'Array_Of_Row'); RemClassRegistry.RegisterXSClass(XacuteResponse, 'http://www.sap.com/xMII', 'XacuteResponse'); RemClassRegistry.RegisterSerializeOptions(XacuteResponse, [xoLiteralParam]); RemClassRegistry.RegisterXSClass(Rowset, 'http://www.sap.com/xMII', 'Rowset'); RemClassRegistry.RegisterExternalPropName(TypeInfo(Rowset), 'Message_', '[ExtName="Message"]'); RemClassRegistry.RegisterXSClass(XacuteRequest, 'http://www.sap.com/xMII', 'XacuteRequest'); RemClassRegistry.RegisterSerializeOptions(XacuteRequest, [xoLiteralParam]); RemClassRegistry.RegisterXSClass(InputParams, 'http://www.sap.com/xMII', 'InputParams');
end. |