我使用本地SoapClient类发出请求。
如何从响应中获取Soap标头?
例如,响应为:
<soap-env:Envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0" soap-env:mustUnderstand="1">
</eb:MessageHeader>
<wsse:Security
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">security token text</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<SessionCreateRS
xmlns="http://www.opentravel.org/OTA/2002/11" version="1" status="Approved">
<ConversationId></ConversationId>
</SessionCreateRS>
</soap-env:Body>
如何在页眉块中获取wsse:BinarySecurityToken
标签的内容?
除了通过SoapClient::__getLastResponse()
检索原始XML并进行解析之外,还有什么明确的方法吗?