Php 这两个soap头是相同的吗?

Php 这两个soap头是相同的吗?,php,soap,soapheader,Php,Soap,Soapheader,我被告知我的soap头必须如下所示: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ws="http://ws.dgpys.deloitte.com"> <soap:Header> <axis2:ServiceGroupId xmlns:axis2="http://ws.apache.org/namespaces/axis2"> urn

我被告知我的soap头必须如下所示:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ws="http://ws.dgpys.deloitte.com">
<soap:Header>
    <axis2:ServiceGroupId xmlns:axis2="http://ws.apache.org/namespaces/axis2">
        urn:uuid:FA7EB13C84D91BC34B1373986557015
    </axis2:ServiceGroupId>
</soap:Header>
<soap:Body>
    ...
</soap:Body>

urn:uuid:FA7EB13C84D91BC34B1373986557015
...

我的soap头是:

<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns1=\"http://ws.dgpys.deloitte.com\">
<SOAP-ENV:Header>
    <ns1:ServiceGroupId>
        urn:uuid:FA7EB13C84D91BC34B1373986557015
    </ns1:ServiceGroupId>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
    ...
</SOAP-ENV:Body>

urn:uuid:FA7EB13C84D91BC34B1373986557015
...


我的坏了。我寻找解决办法,但什么也找不到。我怎样才能解决这个问题?或者我应该学习哪些主题?

不,你的
http://schemas.xmlsoap.org/soap/envelope/
is和request is
http://www.w3.org/2003/05/soap-envelope/
,名称空间

不要被
soap
/
soap-ENV
axis
/
ns1
弄糊涂,它们只是名称空间前缀

另外,您的第一条消息似乎缺少
axis2
名称空间前缀的声明,但我认为
xmlns:ws=”http://ws.dgpys.deloitte.com“
用于读取
xmlns:axis2=”http://ws.dgpys.deloitte.com“

如果提供程序要求您发送SOAP 1.2,则使用SOAP 1.2命名空间和消息格式。这就是问题中应包含相关代码的原因,但您需要:


你试过制作人建议的那个吗?没有,我无法生成制作人的标题。我使用php和setSoapHeaders($header);它创造了我的soapheaderMuhammed,你如何解决这个问题?请看我的问题:。我无法解决这个问题。创建标记而不是标记不会有任何问题吗?不,那只是。
$client = new SoapClient("some.wsdl", array('soap_version' => SOAP_1_2));