0

我搜索了示例等,但它不起作用。我不知道如何为我的 xml 消息创建一段“POST 代码”。我想我需要一个soapclient,但我不知道如何使用它。

WSDL 文件地址:https ://secure.intelly.nl/webservices/intellymodule001.asmx?WSDL

这是我创建的 xml 消息:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" 
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
        xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" 
        xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
        xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" 
        xmlns:tns="http://extranet.intelly.nl/module001/" 
        xmlns:s="http://www.w3.org/2001/XMLSchema" 
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" 
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<SOAP-ENV:Body>
    <tns:GetDomains xmlns:tns="http://extranet.intelly.nl/module001/">
        <tns:credentials>
            <ExternalProgramFunction>***</ExternalProgramFunction>
            <ExternalProgramID>***</ExternalProgramID>
            <Domain>***</Domain>
            <Username>***</Username>
            <Password>***</Password>
        </tns:credentials>
        <tns:message>
        </tns:message>
        <tns:message>
        </tns:message>
        <tns:searchParameters>
            <OnlyActive>True</OnlyActive>
        </tns:searchParameters>
    </tns:GetDomains>
</SOAP-ENV:Body>

4

1 回答 1

0

PHP 有一个本机SoapClient,下面是使用您的输入结构的示例:

$client = new SoapClient('https://secure.intelly.nl/webservices/intellymodule001.asmx?WSDL');

$params = array(
    'credentials' => array(
        'ExternalProgramFunction' => 'xxx',
        'ExternalProgramID' => 'xxx',
        'Domain' => 'xxx',
        'UserName' => 'xxx',
        'Password' => 'xxx'
    ),
    'message' => array(),
    'searchParameters' => array(
        'OnlyActive' => true
    )
);

$response = $client->GetDomains($params);

print_r($response);
于 2013-01-04T08:59:25.173 回答