Web services ASMX WebService未从xmlns:ns1子名称空间获取请求值(xmlns:ns1问题)
我已经从提供的WSDL.xml文件中使用WSDL.exe实用程序生成了.NET 4.6 ASMX WebService 启动后,它显示了正确的(据我所知)用法示例:Web services ASMX WebService未从xmlns:ns1子名称空间获取请求值(xmlns:ns1问题),web-services,Web Services,我已经从提供的WSDL.xml文件中使用WSDL.exe实用程序生成了.NET 4.6 ASMX WebService 启动后,它显示了正确的(据我所知)用法示例: POST/LSS3.asmx HTTP/1.1 主机:本地主机 内容类型:text/xml;字符集=utf-8 内容长度:长度 SOAPAction:“http://sap.com/xi/WebService/soap1.1" 一串 一串 一串 --------------------- 但当我通过客户提供的请求文本使用谷歌邮递员
POST/LSS3.asmx HTTP/1.1
主机:本地主机
内容类型:text/xml;字符集=utf-8
内容长度:长度
SOAPAction:“http://sap.com/xi/WebService/soap1.1"
一串
一串
一串
---------------------
但当我通过客户提供的请求文本使用谷歌邮递员进行测试时(他假设该文本必须在该服务中工作,并且没有其他方式…)
一串
一串
一串
WebService从不工作,它会崩溃并出现以下错误:
soap:服务器
System.Web.Services.Protocols.SoapException:服务器无法处理请求。--System.NullReferenceException:对象链接为空或未指向对象。
同步绑定中的设备外部StockRequest。同步中的外部StockRequest(StoreBalancerRequest StoreBalancerRequest)
---跟踪结束---
无法理解为什么在XML请求中看不到这些东西xmlns:ns1 请帮忙
POST /LSS3.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://sap.com/xi/WebService/soap1.1"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<StoreBalanceRequest xmlns="urn:sibur:po:a:store:Balance">
<Plant>string</Plant>
<Material>string</Material>
<PartyNumber>string</PartyNumber>
</StoreBalanceRequest>
</soap:Body>
</soap:Envelope>
---------------------
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:StoreBalanceRequest xmlns:ns1="urn:sibur:po:a:store:Balance">
<Plant>string</Plant>
<Material>string</Material>
<PartyNumber>string</PartyNumber>
</ns1:StoreBalanceRequest>
</soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>System.Web.Services.Protocols.SoapException: Server was not available to process request. ---> System.NullReferenceException: Object link is empty or doesnt point to an object.
в SiburSevice.ExternalStockRequest_In_SyncBinding.ExternalStockRequest_In_Sync(StoreBalanceRequest StoreBalanceRequest)
--- End of Trace ---</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>