我试图使用PHP SOAP连接到WSDL Web服务。现在我需要从发送的XML中删除SOAP元素。我现在拥有的是以下情况:如何从调用中删除SOAP名称空间
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://service.com">
<SOAP-ENV:Body>
<ns1:Calculate>
//Content
</ns1:Calculate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
我想是这样的:
<?xml version="1.0" encoding="UTF-8"?>
<ns1:Calculate xmlns:ns1="http://service.com">
//Content
</ns1:Calculate>
有没有办法做到这一点? SOAP是我需要发送这样的请求的人吗?
您要创建的XML不是有效的soap请求xml。原来的一个是。您可以通过用'soapenv'替换'SOAP-ENV'来尝试原始的xml。它在过去为我工作。 –
你能举个例子吗? – stixx