0

JAX WS is generating the following (only a snippet shown):

<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>

Here is the method that generates that:

@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 {

What we need want to do is also have xmlns:ns2="http://www.########.com" xmlns:ns3="test:one:two:1.2" xmlns:ns4="test:one:two:three:1.1" also visible on the ns3:alert tag.

Is there any way to do this?

NRaf
  • 7,407
  • 13
  • 52
  • 91
  • Out of curiosity, why do you need the namespace declaration on a child if it's already on the parent element? – austin Jun 26 '13 at 02:07
  • The CAP standard validator is rejecting it without the namespace declaration. – NRaf Jun 26 '13 at 02:29
  • possible duplicate of [JAX WS: Change location of xmlns attribute](http://stackoverflow.com/questions/14270079/jax-ws-change-location-of-xmlns-attribute) – austin Jun 26 '13 at 02:48
  • I asked that question - this one is similar but not a duplicate. – NRaf Jun 26 '13 at 03:35

0 Answers0