肥皂服务 zf2 return 无效 xml
soap service zf2 return invalid xml
我在 zend framework 2 中创建了一个 Soap Web 服务,这个 WS 作为一个模块工作,理论上工作正常,但我的客户无法读取或获得响应。
这是回复,我不确定这个回复是否可以,我的意思是为什么会这样显示?
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://evaluaciones.dev.com/soporte?wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getCountUserByNameResponse><return xsi:type="xsd:int">687</return></ns1:getCountUserByNameResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
这是一个工作正常的 WS 响应。
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tid.pruebas.com/webservice-soporte-portal" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:getCountUserByNameResponse>
<return xsi:type="xsd:int">1290</return>
</ns1:getCountUserByNameResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
在这一点上,我只想知道这种情况是否会影响客户端的响应解释?
两个响应的结构完全相同,只是第一个没有格式化。 PHP 在创建 XML 时通常不关心换行符和白色 space ,而在读取 XML 时它从不关心它。
所以,不,未格式化的 XMLs 永远不会影响客户的解释。
我在 zend framework 2 中创建了一个 Soap Web 服务,这个 WS 作为一个模块工作,理论上工作正常,但我的客户无法读取或获得响应。
这是回复,我不确定这个回复是否可以,我的意思是为什么会这样显示?
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://evaluaciones.dev.com/soporte?wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getCountUserByNameResponse><return xsi:type="xsd:int">687</return></ns1:getCountUserByNameResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
这是一个工作正常的 WS 响应。
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tid.pruebas.com/webservice-soporte-portal" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:getCountUserByNameResponse>
<return xsi:type="xsd:int">1290</return>
</ns1:getCountUserByNameResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
在这一点上,我只想知道这种情况是否会影响客户端的响应解释?
两个响应的结构完全相同,只是第一个没有格式化。 PHP 在创建 XML 时通常不关心换行符和白色 space ,而在读取 XML 时它从不关心它。
所以,不,未格式化的 XMLs 永远不会影响客户的解释。