|

楼主 |
发表于 2008-7-2 17:50:25
|
显示全部楼层
看了alang的帖子了,但是出现了一些问题。
执行第3步的时候出错。
以下是生成的pas接口文件的文本形式。附件是具体接口内容。
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://10.143.47.8:8081/ERPwebse ... finishWorkForm?wsdl
// Encoding : UTF-8
// Version : 1.0
// (2008-7-2 17:35:01 - $Revision: 1.9.1.0.1.0.1.9 $)
// ************************************************************************ //
unit finishWorkForm;
interface
uses InvokeRegistry, Types, XSBuiltIns;
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 or were referred
// to but never[!] declared in the document. The types from the latter category
// typically map to predefined/known XML or Borland types; however, they could also
// indicate incorrect WSDL documents that failed to declare or import a schema type.
// ************************************************************************ //
// !:string - "http://www.w3.org/2001/XMLSchema"
// ************************************************************************ //
// Namespace : http://localhost/ERPwebservice/finishWorkForm
// transport : http://schemas.xmlsoap.org/soap/http
// style : document
// binding : finishWorkFormHttpBinding
// service : finishWorkForm
// port : finishWorkFormHttpPort
// URL : http://10.143.47.8:8081/ERPwebservice/services/finishWorkForm
// ************************************************************************ //
finishWorkFormPortType = interface(IInvokable)
['{19E84984-5EDF-887A-EA3A-B1C2C7C13D55}']
function finishWorkForm(const gdh: String): String; stdcall;
end;
function GetfinishWorkFormPortType(UseWSDL: Boolean; Addr: string): finishWorkFormPortType;
implementation
uses SOAPHTTPClient;
function GetfinishWorkFormPortType(UseWSDL: Boolean; Addr: string): finishWorkFormPortType;
const
defWSDL = 'http://10.143.47.8:8081/ERPwebservice/services/finishWorkForm?wsdl';
defURL = 'http://10.143.47.8:8081/ERPwebservice/services/finishWorkForm';
defSvc = 'finishWorkForm';
defPrt = 'finishWorkFormHttpPort';
var
RIO: THTTPRIO;
begin
Result := nil;
if (Addr = '') then
begin
if UseWSDL then
Addr := defWSDL
else
Addr := defURL;
end;
RIO := THTTPRIO.Create(nil);
try
if UseWSDL then
begin
RIO.WSDLLocation := Addr;
RIO.Service := defSvc;
RIO.Port := defPrt;
end else
RIO.URL := Addr;
Result := (RIO as finishWorkFormPortType);
finally
if Result = nil then
RIO.Free;
end;
end;
initialization
InvRegistry.RegisterInterface(TypeInfo(finishWorkFormPortType), 'http://localhost/ERPwebservice/finishWorkForm', 'UTF-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(finishWorkFormPortType), '');
InvRegistry.RegisterInvokeOptions(TypeInfo(finishWorkFormPortType), ioDocument);
end. |
|