Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要为一个本地部分插入 2 个前缀。在 SAAJ 我做到了
QName bodyName = new QName(url,"local1", "prefix1");
我需要同一个正文名称中的另一个前缀。它应该如下所示:
<prefix1:local1 xmlns:prefix1=”url1” xmlns:prefix2="url2">
有人能指出我正确的方向吗?
答案很简单:
SOAPBodyElement bodyElement; bodyElement.addNamespaceDeclaration("prefix2", "url2");