问题描述
我已经有用PHP编写的soap服务,我正在Node中重写它们,我使用了已经存在的.wsdl并更改了tns和地址,.wsdl中的其他所有内容都相同,然后我使用了这个.wsdl在我的节点代码中。
当我使用wizdler扩展名运行api时,Node SOAP API正在工作,因为获取的值已在db中插入并更新。但是我得到的响应格式与现有格式不同,尽管使用了相同的.wsdl,并且我认为这使.net中的响应为null,如何才能以正确的格式获得响应?
收到的回复
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://localhost:3001/wsdl">
<soap:Body>
<tns:DDL_GetStoreLoginsResponse>
<tns:StoreLogins>
<StoreLogins>
<Username>user</Username>
<Password>password</Password>
</StoreLogins>
<StoreLogins>
<Username>manju</Username>
<Password>manjula</Password>
</StoreLogins>
</tns:StoreLogins>
</tns:DDL_GetStoreLoginsResponse>
</soap:Body>
</soap:Envelope>
必填项
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 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/" xmlns:tns="http://12.502.51.612/soap/service.PHP">
<SOAP-ENV:Body>
<ns1:DDL_GetStoreLoginsResponse xmlns:ns1="http://12.502.51.612/soap/service.PHP">
<return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:StoreLogin[2]">
<item xsi:type="tns:StoreLogin">
<Username xsi:type="xsd:string">user</Username>
<Password xsi:type="xsd:string">password</Password>
</item>
<item xsi:type="tns:StoreLogin">
<Username xsi:type="xsd:string">manju</Username>
<Password xsi:type="xsd:string">manjula</Password>
</item>
</return>
</ns1:DDL_GetStoreLoginsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
出于安全原因,我在发布问题时更改了IP地址。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)