soap请求xsi:type报错的解决方法

2019-02-26  本文已影响0人  憨人Zoe

使用soap请求服务时,如果xml中使用了xsi:type 属性,可能会遇到如下报错:

xsi:type http://www.w3.org/TR/1999/REC-xml-names-19990114#AttributePrefixUnbound

这是因为xml缺少xsi声明。

解决办法:在body标签上加上声明,如下:

<Body xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)">

即可。

上一篇 下一篇

猜你喜欢

热点阅读