Joe*_*ana 4 xml soap xml-namespaces
我是一个SOAP新手,并努力解决此错误消息,
{:错误,"500","未声明的名称空间前缀\"x \"\n在[row,col {unknown-source}]:[1,168]"}
对于下面的SOAP信封.由于我试图访问的主机系统的条款和条件,我已用"xxx"替换了识别URL和凭证信息,并删除了大多数对象.
<x:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:read="urn://xxx/sdk/ReadObject"
xmlns:obj="http://xxx/object">
<x:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>xxx</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxx</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</x:Header>
<x:Body>
<read:readEstimate>
<read:estimate>
<obj:id>38945</obj:id>
</read:estimate>
</read:readEstimate>
</x:Body>
</x:Envelope>
Run Code Online (Sandbox Code Playgroud)
要解决未声明的命名空间前缀(x:)的问题,请执行以下任一操作:
更换x:用soapenv:SOAP信封元素名称.
更改xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
到xmlns:x="http://schemas.xmlsoap.org/soap/envelope/".
通过更改xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
为SOAP信封元素名称xmlns="http://schemas.xmlsoap.org/soap/envelope/"并删除它来使用默认命名空间x:.
| 归档时间: |
|
| 查看次数: |
9179 次 |
| 最近记录: |