JAX WS:xmlns属性的重复位置

时间:2013-06-26 01:50:16

标签: xml soap jax-ws jaxp

JAX WS正在生成以下内容(仅显示一个片段):

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
  <ns2:capMessageResponse xmlns:ns2="http://www.########.com" xmlns:ns3="test:one:two:1.2" xmlns:ns4="test:one:two:three:1.1">
     <ns3:alert>
        <ns3:identifier>1247275</ns3:identifier>

以下是生成该方法的方法:

@WebMethod(operationName = "capMessage", action = "urn:getCapMessages")
@WebResult(name = "alert", targetNamespace="test:one:two:1.2")
public List<AlertType> getCapMessage(String messageIds,String uniqueId,boolean skipHtmlStrip) throws CommsMessageException {
    try {

我们需要做的还有xmlns:ns2 =“http://www.########.com”xmlns:ns3 =“test:one:two:1.2”xmlns:ns4 =“test:one:two:three:1.1”在ns3:alert标签上也可见。

有没有办法做到这一点?

0 个答案:

没有答案