我需要从 Taleo WS 获取实体列表。我有一个工作肥皂 xml 示例,但我不知道如何参数化 php soap 调用。谁能给我一个提示?
请求如下
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:find="http://www.taleo.com/ws/tee800/2009/01/find">
<soapenv:Header/>
<soapenv:Body>
<find:findPartialEntities>
<find:mappingVersion>http://www.taleo.com/ws/tee800/2009/01</find:mappingVersion>
<find:query>
<query:query alias="Find Open and Posted Requisitions" projectedClass="SourcingRequest" xmlns:query="http://itk.taleo.com/ws/query">
<query:projections>
<query:projection>
<query:field path="Requisition,ContestNumber"/>
</query:projection>
<query:projection>
<query:field locales="it" path="Requisition,JobInformation,Title" localeFiltering="customLocales"/>
</query:projection>
<query:projection>
<query:field locales = "it" path="Requisition,JobInformation,DescriptionExternalHTML" localeFiltering="customLocales"/>
</query:projection>
<query:projection>
<query:field locales = "it" path="Requisition,JobInformation,DescriptionInternalHTML" localeFiltering="customLocales"/>
</query:projection>
<query:projection>
<query:field path="Requisition,Number"/>
</query:projection>
<query:projection>
<query:field path="Requisition,State,Description"/>
</query:projection>
<query:projection>
<query:field locales="it" path="Requisition,JobInformation,JobField,Name" localeFiltering="customLocales"/>
</query:projection>
<query:projection>
<query:field locales="it" path="Requisition,JobInformation,Organization,Name" localeFiltering="customLocales"/>
</query:projection>
<query:projection>
<query:field locales="it" path="Requisition,JobInformation,Location,PrimaryLocation,Name" localeFiltering="customLocales"/>
</query:projection>
<query:projection>
<query:field locales="it" path="SourcingRequestStatus,Description" localeFiltering="customLocales"/>
</query:projection>
</query:projections>
<query:filterings>
<query:filtering>
<query:equal>
<query:field locales="it" path="SourcingRequestStatus,Description" localeFiltering="customLocales"/>
<query:string>Pubblicata</query:string>
</query:equal>
</query:filtering>
</query:filterings>
<query:sortings>
<query:sorting>
<query:field path="Requisition,ContestNumber"/>
</query:sorting>
</query:sortings>
</query:query>
</find:query>
<find:attributes/>
</find:findPartialEntities>
</soapenv:Body>
</soapenv:Envelope>
到目前为止,我制作了这段代码
$wsdlUrl = 'https://s01iit.taleo.net/enterprise/soap?ServiceName=FindService&wsdl';
$options = array(
'login' => 'myUsername',
'password' => 'myPassword'
);
try {
$client = new SoapClient($wsdlUrl, $options);
$params = array(
"mappingVersion"=>"http://www.taleo.com/ws/tee800/2009/01",
"query" => "",
"attributes" => ""
);
$result = $client->findPartialEntities($params);
die(var_dump($result));
我收到“没有为操作接收到足够的消息部分”。错误作为响应。
谢谢