Java SOAP Web Service 开发环境:
1. Database: mysql 5
2. ApplicationServer : tomcat 4.1
3. SOAP Framework : XFire 1.2
4. Other Framework : spring , ibatis
5. Develop Tools : Eclipse 3.1.0 , MyEclipse 4.1.1GA Delphi 开发环境:
1. Delphi 7
2. 用到的主要构件:THTTRIO,VCLZip
1. Database: mysql 5
2. ApplicationServer : tomcat 4.1
3. SOAP Framework : XFire 1.2
4. Other Framework : spring , ibatis
5. Develop Tools : Eclipse 3.1.0 , MyEclipse 4.1.1GA Delphi 开发环境:
1. Delphi 7
2. 用到的主要构件:THTTRIO,VCLZip
通过向导生成接口文件:
unit LeagueManage1;interfaceuses InvokeRegistry, SOAPHTTPClient, 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.
// ************************************************************************ //
// !:int - "http://www.w3.org/2001/XMLSchema"
// !:boolean - "http://www.w3.org/2001/XMLSchema"
// ************************************************************************ //
// Namespace : http://192.168.0.13:8080/services/LeagueManage
// transport : http://schemas.xmlsoap.org/soap/http
// style : rpc
// binding : LeagueManageSoapBinding
// service : LeagueManageService
// port : LeagueManage
// URL : http://192.168.0.13:8080/services/LeagueManage
// ************************************************************************ //
LeagueManage = interface(IInvokable)
['{AF38C902-5079-6FF3-3C25-5A219C3283A5}']
function updatePositionAll(const year: Integer; const month: Integer): Boolean; stdcall;
function computeDeep(const year: Integer; const month: Integer): Boolean; stdcall;
end;function GetLeagueManage(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): LeagueManage;
implementationfunction GetLeagueManage(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): LeagueManage;
const
defWSDL = 'http://192.168.0.13:8080/services/LeagueManage?wsdl';
defURL = 'http://192.168.0.13:8080/services/LeagueManage';
defSvc = 'LeagueManageService';
defPrt = 'LeagueManage';
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 LeagueManage);
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
InvRegistry.RegisterInterface(TypeInfo(LeagueManage), 'http://192.168.0.13:8080/services/LeagueManage', 'UTF-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(LeagueManage), '');end. 调用:
function Tf_dm.DoDeepID(iYear, iMonth: integer): Boolean;
var
L: LeagueManage;
Addr: string;
begin
Result := False;
Addr := 'http://'+ ServerIP +':' + ServerPort + '/services/LeagueManage';
L := GetLeagueManage(False,Addr,Nil);
Result := L.computeDeep(iYear,iMonth);
end;
祝你好运!