PHP SOAP请求全部小写

PHP SOAP请求全部小写,php,xml,web-services,soap,Php,Xml,Web Services,Soap,我创建了一个web服务,并使用soapUI验证它是否正常工作。但是,PHP客户端在尝试访问它时遇到了致命错误 我有一个try/catch设置,这样我就可以查看输出SOAP请求并执行var\u dump。当我查看请求和var_dump时,它会将其显示为所有小写字母(甚至是我手动键入XML的自定义头) 我知道XML是区分大小写的,当我将请求放回soapUI并正确更改大小写时,我从web服务得到正确的响应 是什么导致SOAP请求将所有内容更改为小写 //The WSDL url $wsurl = "h

我创建了一个web服务,并使用soapUI验证它是否正常工作。但是,PHP客户端在尝试访问它时遇到了致命错误

我有一个try/catch设置,这样我就可以查看输出SOAP请求并执行
var\u dump
。当我查看请求和
var_dump
时,它会将其显示为所有小写字母(甚至是我手动键入XML的自定义头)

我知道XML是区分大小写的,当我将请求放回soapUI并正确更改大小写时,我从web服务得到正确的响应

是什么导致SOAP请求将所有内容更改为小写

//The WSDL url
$wsurl = "http://domain:port/mywebservice.wsdl";

//Custom header setup
$ws_username = 'myuser';
$ws_password = 'mypass';
$ws_authheader = '<wsse:Security soap:mustUnderstand="1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:UsernameToken>
        <wsse:Username>'.$ws_username.'</wsse:Username>
        <wsse:Password>'.$ws_password.'</wsse:Password>
    </wsse:UsernameToken>
</wsse:Security>';

//XML SOAP Security variable
$ws_authvars = new SoapVar($ws_authheader,XSD_ANYXML);

//SOAP Security header
$ws_header = new SoapHeader("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd","Security",$ws_authvars);

//SOAP client - trace is set to true so faults can be backtraced
$ws_client = new SoapClient($wsurl, array('trace'=>true));

//SOAP client parameters
$params = array('PARAM1'=>'123456',
                'PARAM2'=>'ABCDE',
                'PARAM3'=>'ABCD');

try {
    //SOAP response
    $messages = $ws_client->__soapCall('WSMETHOD',array('parameters'=>$params),NULL, $ws_header);
    //print_r($messages);
}
catch (SoapFault $fault) {
    echo "\n";
    print_r($ws_client->__getLastRequest());
    echo "\n";
    var_dump($ws_client);
}

它所指示的行(458)是$messages=$ws\u client->\uu soapCall

缺少致命错误的确切错误消息。SoapFault的消息也丢失了。此外,如果您还将最后一个soap请求的XML添加到您的问题中,这将非常有用。从您的代码到目前为止,还不清楚“所有内容都转换为小写”看起来有多像,也不清楚是什么导致了它。我添加了SoapFault和返回的XML。它现在不知怎么起作用了,但我仍然不知道过去两天为什么会发生这种情况。其他页面运行良好,但我发现它们并没有使用SOAP来处理web服务。现在这看起来更像是一个问题!听起来有点像SOAP服务器上的问题,就像返回意外的NULL。可能是服务不正常。并不是每个SOAP端点都会返回正确的错误消息。我知道SOAP服务器无法用小写字母解释XML,因为当我将_getLastRequest放入其中时,soapUI会给我相同的错误消息。我只是对我的soap客户机或soap服务器为什么以及如何将其全部更改为小写感到困惑。有一个类似的问题。Apache2.2PHP5.4。传出的soapclient请求在传输请求之前将所有字符强制转换为小写。Arg。
<!--?xml version="1.0" encoding="UTF-8"?-->
<soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="mynamespaceurl" xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <soap-env:header>
        <wsse:security soap:mustunderstand="1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:usernametoken>
                <wsse:username>myuser</wsse:username>
                <wsse:password>mypass</wsse:password>
            </wsse:usernametoken>
        </wsse:security>
    </soap-env:header>
    <soap-env:body>
        <ns1:wsmethod>
            <ns1:param1>123456</ns1:param1>
            <ns1:param2>ABCDE</ns1:param2>
            <ns1:param3>ABCD</ns1:param3>
        </ns1:wsmethod>
    </soap-env:body>
</soap-env:envelope>
SoapFault exception: [SOAP-ENV:Server] null in C:\inetpub\wwwroot\mydirs\mypage.php:458 
Stack trace:
#0 C:\inetpub\wwwroot\mydirs\mypage.php(458): SoapClient &gt;__soapCall('wsmeth...', Array, NULL, Object(SoapHeader)) 
#1 {main}