如何使用php调用java web服务


How to call to java web service using php

我有一个使用java编写的web服务,它的返回strcut类型

当我调用一个$OutResult = $client->__getFunctions();时,它的返回如下

Array ( [0] => PPMAccesibilityResult getPPMAccesibility(EmployeeDetails $parameters) [1] => ProjectProgressResult getProjectProgressStatusForEmployee(EmployeeYearDetails $parameters) [2] => ProjectCountForLocationResult getProjectCountForLocation(LocationYearDetails $parameters) [3] => CircularSummaryInfo getCircularSummaryInfo(DeptYearDetails $parameters) [4] => BeneficiaryProjectDetailsResult getProjectDetailsOfBeneficiary(BeneficiaryDetails $parameters) ) 1

当我调用$OutResult = $client->__getTypes();时,它将返回以下

Array ( [0] => struct EmployeeDetails { string employeeId; } [1] => struct EmployeeYearDetails { string employeeId; string financialYear; } [2] => struct PPMWebServiceException { string message; } [3] => struct PPMAccesibilityResult { string response; } [4] => struct ProjectProgressResult { ImplementationProject projectList; } [5] => struct ImplementationProject { string charterCode; string title; string titleSinhala; string titleTamil; string completionPercentage; string deptId; string financialYear; } [6] => struct LocationYearDetails { string locationId; string financialYear; } [7] => struct ProjectCountForLocationResult { ImplementationProjectCount projectCountList; } [8] => struct ImplementationProjectCount { string programId; string programName; string programNameSinhala; string programNameTamil; string impProjectCount; } [9] => struct DeptYearDetails { string deptId; string financialYear; } [10] => struct CircularSummaryInfo { string circularId; string circularName; string introduction; string objective; string goal; string projectExecution; string projectTimeline; string contactDetails; string proposalApprovalCriteria; ProjectDetails projectList; } [11] => struct ProjectDetails { string projectId; string projectName; string indicatorName; } [12] => struct BeneficiaryDetails { string beneficiaryId; string financialYear; } [13] => struct BeneficiaryProjectDetailsResult { ImplementationProject projectList; } ) 1

现在当试图使用这个$OutResult =$client->getPPMAccesibility("6");呼叫它的获取错误无法找到主机,但我的web服务工作正常

如何使用php正确调用此webservice

检查一下您的web服务是否可以使用这个链接。

http://www.service-repository.com/client/start

:)