尽管调用不同的函数,PHP SoapServer 始终调用相同的函数

发布于 2024-11-15 20:02:57 字数 12813 浏览 1 评论 0原文

我的 SOAP 服务器(打算)设置为三个操作:登录、注销和版本。

登录函数的代码目前正在“伪造”它,接受两个参数,即用户名和密码,通过将它们存储在函数类的私有用户名和密码变量中来自动“验证”它们。我在 Web 服务操作的入口点启动了一个会话,并且在初始化期间在 SoapServer 中设置函数类时,我将按如下方式保持连接:

       $this->setClass('WebSvcSoapFunctions');
       $this->setPersistence(SOAP_PERSISTENCE_SESSION); 

当我创建 SOAP CLIENT 并调用我的服务时,无论使用哪个函数被调用时,看起来总是执行 version() 函数而不是被调用的函数。我想这可能是由于我的 WSDL 的编写方式造成的,但我看不到问题(我是新的)....

我通过 PHP SoapServer 监听以下 WSDL:

<?xml version="1.0" encoding="UTF-8"?>

<wsdl:types>

    <schema xmlns:rns="http://soap.jrimer-amp64/" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soap.jrimer-amp64/" version="1.0.0" elementFormDefault="unqualified" attributeFormDefault="unqualified">

        <complexType name="versionRequest">
        </complexType>

        <complexType name="versionResponse">
            <sequence>
                <element name="result" type="string" minOccurs="1"/>
            </sequence>
        </complexType>

        <complexType name="loginRequest">
            <sequence>
                <element name="username" type="string" use="required"/>
                <element name="password" type="string" use="required"/>
            </sequence>
        </complexType>

        <complexType name="loginResponse">
            <sequence>
                <element name="result" type="string" minOccurs="1"/>
            </sequence>
        </complexType>

        <complexType name="logoutRequest">
        </complexType>

        <complexType name="logoutResponse">
            <sequence>
                <element name="result" type="string" minOccurs="1"/>
            </sequence>
        </complexType>

    </schema>

</wsdl:types>


<wsdl:service name="XxxxxxSvc">

    <wsdl:port name="XxxxxxSvc-Endpoint0" binding="tns:XxxxxxSvc-Endpoint0Binding">
        <soap:address location="http://soap.jrimer-amp64/"/>
    </wsdl:port>

</wsdl:service>


<wsdl:portType name="portType">

    <wsdl:operation name="version">
        <wsdl:input message="tns:versionRequest"/>
        <wsdl:output message="tns:versionResponse"/>
    </wsdl:operation>
    <wsdl:operation name="login">
        <wsdl:input message="tns:loginRequest"/>
        <wsdl:output message="tns:loginResponse"/>
    </wsdl:operation>
    <wsdl:operation name="logout">
        <wsdl:input message="tns:logoutRequest"/>
        <wsdl:output message="tns:logoutResponse"/>
    </wsdl:operation>

</wsdl:portType>


<wsdl:binding name="XxxxxxSvc-Endpoint0Binding" type="tns:portType">

    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="version">
        <soap:operation style="document" soapAction="http://soap.jrimer-amp64/"/>
        <wsdl:input>
            <soap:body use="literal" parts="parameters"/>
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" parts="parameters"/>
        </wsdl:output>
    </wsdl:operation>

    <wsdl:operation name="login">
        <soap:operation style="document" soapAction="http://soap.jrimer-amp64/"/>
        <wsdl:input>
            <soap:body use="literal" parts="parameters"/>
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" parts="parameters"/>
        </wsdl:output>
    </wsdl:operation>

    <wsdl:operation name="logout">
        <soap:operation style="document" soapAction="http://soap.jrimer-amp64/"/>
        <wsdl:input>
            <soap:body use="literal" parts="parameters"/>
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" parts="parameters"/>
        </wsdl:output>
    </wsdl:operation>

</wsdl:binding>


<wsdl:message name="versionRequest">
    <wsdl:part name="parameters" element="ns0:versionRequest"/>
</wsdl:message>


<wsdl:message name="versionResponse">
    <wsdl:part name="parameters" element="ns0:versionResponse"/>
</wsdl:message>

<wsdl:message name="loginRequest">
    <wsdl:part name="parameters" element="ns0:loginRequest"/>
</wsdl:message>


<wsdl:message name="loginResponse">
    <wsdl:part name="parameters" element="ns0:loginResponse"/>
</wsdl:message>

<wsdl:message name="logoutRequest">
    <wsdl:part name="parameters" element="ns0:logoutRequest"/>
</wsdl:message>

<wsdl:message name="logoutResponse">
    <wsdl:part name="parameters" element="ns0:logoutResponse"/>
</wsdl:message>

我的 SOAP 函数类如下(通过 setClass() 包含在我的 SOapServer 中):

class WebSvcSoapFunctions
{
    private $username = ''; // username provided by the client during login() request
    private $password = ''; // password provided by the client during login() request

    /**
    * Handle a login request
    * 
    * @param string $user - Client's Username
    * @param string $pass - Client's Password
    */
    public function login($user,$pass)
    {
        $this->username = $user;
        $this->password = $pass;

        // should check for validity here, but for testing, return true.
        return 'Successful Login. Welcome, '.$user;
    }

    /**
    * Logs the client out.
    * 
    */
    public function logout()
    {
        $this->username = '';
        $this->password = '';
        $_SESSION = array();
        session_destroy();
        return 'Logged Out Successfully.';
    }
        /**
    * checks if the client has logged in successfully
    * 
    * @return bool - true=logged in, false = unauthenticated
    */
    private function isAuthenticated()
    {
        if (isset($this->username) && $this->username != '')
        {
            return true;
        }
        else
        {
            return false;
        }
    }

    /**
    * Returns the version of the SOAP Server to the requesting client
    * 
    */
    public function version()
    {
        if ($this->isAuthenticated())
        {
            return 'Affinegy Service v1.0.0';
        }
        else
        {
            return 'NOT AUTHORIZED.';
        }
    }   
}

我的 SOAP CLIENT 测试类如下:

ini_set("soap.wsdl_cache_enabled", "0");  
define('WSDL_URL','http://soap.jrimer-amp64/?wsdl');   
try
{ 
    $client = new SoapClient(WSDL_URL, array('trace'=>true));

    $request = 'version';
    $args = array();
    $SOAPResult = $client->$request($args); // call the SOAP Server's "version" function
    OutputLastRequestResponse($client, $request, $args, $SOAPResult);

    $request = 'login';
    $args['username'] = 'testuser';
    $args['password'] = '1234';
    $SOAPResult = $client->$request($args); // call the SOAP Server's "login" function
    OutputLastRequestResponse($client, $request, $args, $SOAPResult);

    $request = 'version';
    $args = array();
    $SOAPResult = $client->$request($args); // call the SOAP Server's "version" function
    OutputLastRequestResponse($client, $request, $args, $SOAPResult);

    $request = 'logout';
    $args = array();
    $SOAPResult = $client->$request($args); // call the SOAP Server's "logout" function
    OutputLastRequestResponse($client, $request, $args, $SOAPResult);

    $request = 'version';
    $SOAPResult = $client->$request($args); // call the SOAP Server's "version" function
    OutputLastRequestResponse($client, $request, $args, $SOAPResult);

}
catch (Exception $e)
{
    echo '<pre>FAILED: '.print_r($e,1).'</pre>'; // dump the client exception to screen

    OutputLastRequestResponse($client);
}

/**
* Displays the request and response of the test service call
* 
* @param SoapServer $client - Object of type SoapClient that does the request
* @param string $requested - name of the SOAP function called
* @param array $args - Arguments sent to the SOAP function
* @param string $returned - PHP readable value returned by the client calling the provided SOAP function
*/
function OutputLastRequestResponse($client, $requested = '', $args=array(), $returned='')
{
    echo '<h1>XXXXXXXX SERVICE SOAP SERVER TEST</h1>';
    echo 'Request: <pre>'.$requested.'</pre>';
    echo 'Request Arguments: <pre>'.print_r($args,1).'</pre>';
    echo 'Returned: <pre>'.$returned.'</pre>';
    echo 'Raw Request: <pre>'.htmlspecialchars($client->__getLastRequestHeaders());
    echo htmlspecialchars($client->__getLastRequest()).'</pre>';
    echo 'Raw Response: <pre>'.htmlspecialchars($client->__getLastResponseHeaders())."\n";
    echo htmlspecialchars($client->__getLastResponse()).'</pre>';
}

测试类运行的结果如下... 注意“未授权”。是对所有内容的响应,表明仅 WebSvcSoapFunctions::version() 函数正在运行

Xxxxxx 服务 SOAP 服务器测试 请求:

版本

请求参数:

数组 ( )

返回:

未经授权。

原始请求:

POST / HTTP/1.1 主机: Soap.jrimer-amp64 连接: 保持活动的用户代理:PHP-SOAP/5.2.10 内容类型:text/xml;字符集=utf-8 SOAP 操作: “http://soap.jrimer-amp64/” 内容长度:227

原始响应:

HTTP/1.1 200 OK 日期:2011 年 6 月 16 日,星期四 19:43:32 GMT 服务器:Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.10 设置 Cookie: PHPSESSID=scbuin269990ahfargfq7k0972; path=/ 到期时间: 1981 年 11 月 19 日,星期四 08:52:00 GMT 缓存控制:无存储, 无缓存,必须重新验证, 后检查=0,预检查=0 指令: 无缓存内容长度:209 连接:关闭内容类型: 文本/xml;字符集=utf-8

不是 已授权。

Xxxxxx 服务 SOAP 服务器测试 请求:

登录

请求参数:

数组( [用户名] =>杰里默 [密码] =>第1234章

返回:

未经授权。

原始请求:

POST / HTTP/1.1 主机: Soap.jrimer-amp64 连接: 保持活动的用户代理:PHP-SOAP/5.2.10 内容类型:text/xml;字符集=utf-8 SOAP 操作: “http://soap.jrimer-amp64/” 内容长度:298 Cookie: PHPSESSID=scbuin269990ahfargfq7k0972;

用户名jrimer密码1234

原始响应:

HTTP/1.1 200 OK 日期:2011 年 6 月 16 日,星期四 19:43:32 GMT 服务器:Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.10 到期时间: 1981 年 11 月 19 日星期四 08:52:00 GMT 缓存控制:无存储、无缓存、 必须重新验证,后检查=0, pre-check=0 编译指示:无缓存 内容长度:209 连接:关闭 内容类型:text/xml;字符集=utf-8

不是 已授权。

Xxxxxx 服务 SOAP 服务器测试 请求:

版本

请求参数:

数组 ( )

返回:

未经授权。

原始请求:

POST / HTTP/1.1 主机: Soap.jrimer-amp64 连接: 保持活动的用户代理:PHP-SOAP/5.2.10 内容类型:text/xml;字符集=utf-8 SOAP 操作: “http://soap.jrimer-amp64/” 内容长度:227 Cookie: PHPSESSID=scbuin269990ahfargfq7k0972;

原始响应:

HTTP/1.1 200 OK 日期:2011 年 6 月 16 日,星期四 19:43:32 GMT 服务器:Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.10 到期时间: 1981 年 11 月 19 日星期四 08:52:00 GMT 缓存控制:无存储、无缓存、 必须重新验证,后检查=0, pre-check=0 编译指示:无缓存 内容长度:209 连接:关闭 内容类型:text/xml;字符集=utf-8

不是 已授权。

Xxxxxx 服务 SOAP 服务器测试 请求:

退出

请求参数:

数组 ( )

返回:

未经授权。

原始请求:

POST / HTTP/1.1 主机: Soap.jrimer-amp64 连接: 保持活动的用户代理:PHP-SOAP/5.2.10 内容类型:text/xml;字符集=utf-8 SOAP 操作: “http://soap.jrimer-amp64/” 内容长度:227 Cookie: PHPSESSID=scbuin269990ahfargfq7k0972;

原始响应:

HTTP/1.1 200 OK 日期:2011 年 6 月 16 日,星期四 19:43:32 GMT 服务器:Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.10 到期时间: 1981 年 11 月 19 日星期四 08:52:00 GMT 缓存控制:无存储、无缓存、 必须重新验证,后检查=0, pre-check=0 编译指示:无缓存 内容长度:209 连接:关闭 内容类型:text/xml;字符集=utf-8

不是 已授权。

Xxxxxx 服务 SOAP 服务器测试 请求:

版本

请求参数:

数组 ( )

返回:

未经授权。

原始请求:

POST / HTTP/1.1 主机: Soap.jrimer-amp64 连接: 保持活动的用户代理:PHP-SOAP/5.2.10 内容类型:text/xml;字符集=utf-8 SOAP 操作: “http://soap.jrimer-amp64/” 内容长度:227 Cookie: PHPSESSID=scbuin269990ahfargfq7k0972;

原始响应:

HTTP/1.1 200 OK 日期:2011 年 6 月 16 日,星期四 19:43:32 GMT 服务器:Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.10 到期时间: 1981 年 11 月 19 日星期四 08:52:00 GMT 缓存控制:无存储、无缓存、 必须重新验证,后检查=0, pre-check=0 编译指示:无缓存 内容长度:209 连接:关闭 内容类型:text/xml;字符集=utf-8

不是 已授权。

有什么想法吗?

注意:我注意到,如果我简单地注释掉 WSDL 中 VERSION 函数的定义,则下一个定义的函数将成为“始终调用”函数(登录)...我在该 WSDL 中配置了什么错误?

My SOAP server is (intended to be) setup with three operations: login, logout, and version.

The login function's code is currently "faking" it at the moment, accepting two parameters, a username and password, automatically "authenticating" them by storing them in the function class' private username and password variables. I have a session started at the entry point of the web service action, and when setting the function class in the SoapServer during initialization, I'm persisting connections as follows:

       $this->setClass('WebSvcSoapFunctions');
       $this->setPersistence(SOAP_PERSISTENCE_SESSION); 

When I create a SOAP CLIENT and call my service, regardless of which function is called, it appears that the version() function is always executed rather than the one called. I imagine this is probably due to the way my WSDL is written, but I can't see a problem (i'm new)....

I have the following WSDL listening via a PHP SoapServer:

<?xml version="1.0" encoding="UTF-8"?>

<wsdl:types>

    <schema xmlns:rns="http://soap.jrimer-amp64/" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soap.jrimer-amp64/" version="1.0.0" elementFormDefault="unqualified" attributeFormDefault="unqualified">

        <complexType name="versionRequest">
        </complexType>

        <complexType name="versionResponse">
            <sequence>
                <element name="result" type="string" minOccurs="1"/>
            </sequence>
        </complexType>

        <complexType name="loginRequest">
            <sequence>
                <element name="username" type="string" use="required"/>
                <element name="password" type="string" use="required"/>
            </sequence>
        </complexType>

        <complexType name="loginResponse">
            <sequence>
                <element name="result" type="string" minOccurs="1"/>
            </sequence>
        </complexType>

        <complexType name="logoutRequest">
        </complexType>

        <complexType name="logoutResponse">
            <sequence>
                <element name="result" type="string" minOccurs="1"/>
            </sequence>
        </complexType>

    </schema>

</wsdl:types>


<wsdl:service name="XxxxxxSvc">

    <wsdl:port name="XxxxxxSvc-Endpoint0" binding="tns:XxxxxxSvc-Endpoint0Binding">
        <soap:address location="http://soap.jrimer-amp64/"/>
    </wsdl:port>

</wsdl:service>


<wsdl:portType name="portType">

    <wsdl:operation name="version">
        <wsdl:input message="tns:versionRequest"/>
        <wsdl:output message="tns:versionResponse"/>
    </wsdl:operation>
    <wsdl:operation name="login">
        <wsdl:input message="tns:loginRequest"/>
        <wsdl:output message="tns:loginResponse"/>
    </wsdl:operation>
    <wsdl:operation name="logout">
        <wsdl:input message="tns:logoutRequest"/>
        <wsdl:output message="tns:logoutResponse"/>
    </wsdl:operation>

</wsdl:portType>


<wsdl:binding name="XxxxxxSvc-Endpoint0Binding" type="tns:portType">

    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="version">
        <soap:operation style="document" soapAction="http://soap.jrimer-amp64/"/>
        <wsdl:input>
            <soap:body use="literal" parts="parameters"/>
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" parts="parameters"/>
        </wsdl:output>
    </wsdl:operation>

    <wsdl:operation name="login">
        <soap:operation style="document" soapAction="http://soap.jrimer-amp64/"/>
        <wsdl:input>
            <soap:body use="literal" parts="parameters"/>
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" parts="parameters"/>
        </wsdl:output>
    </wsdl:operation>

    <wsdl:operation name="logout">
        <soap:operation style="document" soapAction="http://soap.jrimer-amp64/"/>
        <wsdl:input>
            <soap:body use="literal" parts="parameters"/>
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" parts="parameters"/>
        </wsdl:output>
    </wsdl:operation>

</wsdl:binding>


<wsdl:message name="versionRequest">
    <wsdl:part name="parameters" element="ns0:versionRequest"/>
</wsdl:message>


<wsdl:message name="versionResponse">
    <wsdl:part name="parameters" element="ns0:versionResponse"/>
</wsdl:message>

<wsdl:message name="loginRequest">
    <wsdl:part name="parameters" element="ns0:loginRequest"/>
</wsdl:message>


<wsdl:message name="loginResponse">
    <wsdl:part name="parameters" element="ns0:loginResponse"/>
</wsdl:message>

<wsdl:message name="logoutRequest">
    <wsdl:part name="parameters" element="ns0:logoutRequest"/>
</wsdl:message>

<wsdl:message name="logoutResponse">
    <wsdl:part name="parameters" element="ns0:logoutResponse"/>
</wsdl:message>

My SOAP function class is as follows (included in my SOapServer via setClass()):

class WebSvcSoapFunctions
{
    private $username = ''; // username provided by the client during login() request
    private $password = ''; // password provided by the client during login() request

    /**
    * Handle a login request
    * 
    * @param string $user - Client's Username
    * @param string $pass - Client's Password
    */
    public function login($user,$pass)
    {
        $this->username = $user;
        $this->password = $pass;

        // should check for validity here, but for testing, return true.
        return 'Successful Login. Welcome, '.$user;
    }

    /**
    * Logs the client out.
    * 
    */
    public function logout()
    {
        $this->username = '';
        $this->password = '';
        $_SESSION = array();
        session_destroy();
        return 'Logged Out Successfully.';
    }
        /**
    * checks if the client has logged in successfully
    * 
    * @return bool - true=logged in, false = unauthenticated
    */
    private function isAuthenticated()
    {
        if (isset($this->username) && $this->username != '')
        {
            return true;
        }
        else
        {
            return false;
        }
    }

    /**
    * Returns the version of the SOAP Server to the requesting client
    * 
    */
    public function version()
    {
        if ($this->isAuthenticated())
        {
            return 'Affinegy Service v1.0.0';
        }
        else
        {
            return 'NOT AUTHORIZED.';
        }
    }   
}

My SOAP CLIENT test class is as follows:

ini_set("soap.wsdl_cache_enabled", "0");  
define('WSDL_URL','http://soap.jrimer-amp64/?wsdl');   
try
{ 
    $client = new SoapClient(WSDL_URL, array('trace'=>true));

    $request = 'version';
    $args = array();
    $SOAPResult = $client->$request($args); // call the SOAP Server's "version" function
    OutputLastRequestResponse($client, $request, $args, $SOAPResult);

    $request = 'login';
    $args['username'] = 'testuser';
    $args['password'] = '1234';
    $SOAPResult = $client->$request($args); // call the SOAP Server's "login" function
    OutputLastRequestResponse($client, $request, $args, $SOAPResult);

    $request = 'version';
    $args = array();
    $SOAPResult = $client->$request($args); // call the SOAP Server's "version" function
    OutputLastRequestResponse($client, $request, $args, $SOAPResult);

    $request = 'logout';
    $args = array();
    $SOAPResult = $client->$request($args); // call the SOAP Server's "logout" function
    OutputLastRequestResponse($client, $request, $args, $SOAPResult);

    $request = 'version';
    $SOAPResult = $client->$request($args); // call the SOAP Server's "version" function
    OutputLastRequestResponse($client, $request, $args, $SOAPResult);

}
catch (Exception $e)
{
    echo '<pre>FAILED: '.print_r($e,1).'</pre>'; // dump the client exception to screen

    OutputLastRequestResponse($client);
}

/**
* Displays the request and response of the test service call
* 
* @param SoapServer $client - Object of type SoapClient that does the request
* @param string $requested - name of the SOAP function called
* @param array $args - Arguments sent to the SOAP function
* @param string $returned - PHP readable value returned by the client calling the provided SOAP function
*/
function OutputLastRequestResponse($client, $requested = '', $args=array(), $returned='')
{
    echo '<h1>XXXXXXXX SERVICE SOAP SERVER TEST</h1>';
    echo 'Request: <pre>'.$requested.'</pre>';
    echo 'Request Arguments: <pre>'.print_r($args,1).'</pre>';
    echo 'Returned: <pre>'.$returned.'</pre>';
    echo 'Raw Request: <pre>'.htmlspecialchars($client->__getLastRequestHeaders());
    echo htmlspecialchars($client->__getLastRequest()).'</pre>';
    echo 'Raw Response: <pre>'.htmlspecialchars($client->__getLastResponseHeaders())."\n";
    echo htmlspecialchars($client->__getLastResponse()).'</pre>';
}

The results from the test class runs are as follows... Notice "NOT AUTHORIZED." is the response to everything, indicating that ONLY the WebSvcSoapFunctions::version() function is running

Xxxxxx SERVICE SOAP SERVER TEST
Request:

version

Request Arguments:

Array ( )

Returned:

NOT AUTHORIZED.

Raw Request:

POST / HTTP/1.1 Host:
soap.jrimer-amp64 Connection:
Keep-Alive User-Agent: PHP-SOAP/5.2.10
Content-Type: text/xml; charset=utf-8
SOAPAction:
"http://soap.jrimer-amp64/"
Content-Length: 227

Raw Response:

HTTP/1.1 200 OK Date: Thu, 16 Jun 2011
19:43:32 GMT Server: Apache/2.2.3
(CentOS) X-Powered-By: PHP/5.2.10
Set-Cookie:
PHPSESSID=scbuin269990ahfargfq7k0972;
path=/ Expires: Thu, 19 Nov 1981
08:52:00 GMT Cache-Control: no-store,
no-cache, must-revalidate,
post-check=0, pre-check=0 Pragma:
no-cache Content-Length: 209
Connection: close Content-Type:
text/xml; charset=utf-8

NOT
AUTHORIZED.

Xxxxxx SERVICE SOAP SERVER TEST
Request:

login

Request Arguments:

Array (
[username] => jrimer
[password] => 1234 )

Returned:

NOT AUTHORIZED.

Raw Request:

POST / HTTP/1.1 Host:
soap.jrimer-amp64 Connection:
Keep-Alive User-Agent: PHP-SOAP/5.2.10
Content-Type: text/xml; charset=utf-8
SOAPAction:
"http://soap.jrimer-amp64/"
Content-Length: 298 Cookie:
PHPSESSID=scbuin269990ahfargfq7k0972;

usernamejrimerpassword1234

Raw Response:

HTTP/1.1 200 OK Date: Thu, 16 Jun 2011
19:43:32 GMT Server: Apache/2.2.3
(CentOS) X-Powered-By: PHP/5.2.10
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache,
must-revalidate, post-check=0,
pre-check=0 Pragma: no-cache
Content-Length: 209 Connection: close
Content-Type: text/xml; charset=utf-8

NOT
AUTHORIZED.

Xxxxxx SERVICE SOAP SERVER TEST
Request:

version

Request Arguments:

Array ( )

Returned:

NOT AUTHORIZED.

Raw Request:

POST / HTTP/1.1 Host:
soap.jrimer-amp64 Connection:
Keep-Alive User-Agent: PHP-SOAP/5.2.10
Content-Type: text/xml; charset=utf-8
SOAPAction:
"http://soap.jrimer-amp64/"
Content-Length: 227 Cookie:
PHPSESSID=scbuin269990ahfargfq7k0972;

Raw Response:

HTTP/1.1 200 OK Date: Thu, 16 Jun 2011
19:43:32 GMT Server: Apache/2.2.3
(CentOS) X-Powered-By: PHP/5.2.10
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache,
must-revalidate, post-check=0,
pre-check=0 Pragma: no-cache
Content-Length: 209 Connection: close
Content-Type: text/xml; charset=utf-8

NOT
AUTHORIZED.

Xxxxxx SERVICE SOAP SERVER TEST
Request:

logout

Request Arguments:

Array ( )

Returned:

NOT AUTHORIZED.

Raw Request:

POST / HTTP/1.1 Host:
soap.jrimer-amp64 Connection:
Keep-Alive User-Agent: PHP-SOAP/5.2.10
Content-Type: text/xml; charset=utf-8
SOAPAction:
"http://soap.jrimer-amp64/"
Content-Length: 227 Cookie:
PHPSESSID=scbuin269990ahfargfq7k0972;

Raw Response:

HTTP/1.1 200 OK Date: Thu, 16 Jun 2011
19:43:32 GMT Server: Apache/2.2.3
(CentOS) X-Powered-By: PHP/5.2.10
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache,
must-revalidate, post-check=0,
pre-check=0 Pragma: no-cache
Content-Length: 209 Connection: close
Content-Type: text/xml; charset=utf-8

NOT
AUTHORIZED.

Xxxxxx SERVICE SOAP SERVER TEST
Request:

version

Request Arguments:

Array ( )

Returned:

NOT AUTHORIZED.

Raw Request:

POST / HTTP/1.1 Host:
soap.jrimer-amp64 Connection:
Keep-Alive User-Agent: PHP-SOAP/5.2.10
Content-Type: text/xml; charset=utf-8
SOAPAction:
"http://soap.jrimer-amp64/"
Content-Length: 227 Cookie:
PHPSESSID=scbuin269990ahfargfq7k0972;

Raw Response:

HTTP/1.1 200 OK Date: Thu, 16 Jun 2011
19:43:32 GMT Server: Apache/2.2.3
(CentOS) X-Powered-By: PHP/5.2.10
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache,
must-revalidate, post-check=0,
pre-check=0 Pragma: no-cache
Content-Length: 209 Connection: close
Content-Type: text/xml; charset=utf-8

NOT
AUTHORIZED.

Any ideas what's going on?

NOTE: I notice that if I simply comment out the definition in the WSDL for the VERSION function that the next defined function becomes the "always called" function (login)... What do I have configured wrong in that WSDL?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

葬シ愛 2024-11-22 20:02:57

是的,这是 WSDL,我完全错误定义了它...重构了 WSDL,它现在可以正确地处理请求...

Yeah, it was the WSDL, I completely have it misdefined... Restructured the WSDL and it fields requests correctly now...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文