java - 如何更改 JAXB 消息中的模式?
问题描述
我发送 JAXB 生成的消息(使用 WSDL 和 XSD):
...
<SOAP-ENV:Body>
<ns28:getClientsDetailRequest ...>
<ns28:ClientIdentifier>
<ns12:id>123</ns12:id>
<ns12:system>qwe</ns12:system>
<ns12:type>asd</ns12:type>
</ns28:ClientIdentifier>
<ns28:entitySet>zxc</ns28:entitySet>
<ns28:clientScope>rty</ns28:clientScope>
</ns28:getClientsDetailRequest>
</SOAP-ENV:Body>
...
但方案应该是“tns”和“idn”,像这样:
....
<SOAP-ENV:Body>
<tns:getClientsDetailRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:ClientIdentifier>
<idn:id>123</idn:id>
<idn:system>qwe</idn:system>
<idn:type>asd</idn:type>
</tns:ClientIdentifier>
<tns:entitySet>zxc</tns:entitySet>
<tns:clientScope>rty</tns:clientScope>
</tns:getClientsDetailRequest>
</SOAP-ENV:Body>
...
如何更改方案?
解决方案
推荐阅读
- c# - MVC 页面加载实例化多个具有共享资源的控制器
- react-native - 在 react native 中单击 DrawerNavigator 上的选项卡时,组件渲染一次
- laravel-5 - 如何修复错误迁移调用未定义的方法 Illuminate\Session\Store::getToken?
- python - Numpy 将两个 MaskedArrays 与 OR 操作结合起来
- java - 如何从 Android 的评级栏中删除填充?
- android - 如何通过firebase中的自定义键更改数据?
- html - 动画设置两次的元素看起来很奇怪
- sql-server - 如何将选择语句作为 XML 提取到表字段中
- swift - 具有垂直和水平能力的 NSCollectionView
- r - 为什么我在写 RMD 文件时会得到“要替换的项目数不是替换长度的倍数”?