0

I have a jax-ws project that is using Enunciate with Maven to build into a war file. When I deploy it to my app-server, I get weird namespace issues when trying to test with SoapUI. The xml request will have the correct namespace prefix for my complex-type, but when the request is submitted to the server, the object is always null.

Here is my web service interface:

@WebService(targetNamespace = "http://namespace.com/dog/service")
public interface DogSoapService {
    @WebMethod
    public Dog submit(
        @WebParam(name = "dog")
        Dog dog) throws MyWebFault;

This builds fine with enunciate, but when I try to make a request via SoapUI, the 'dog' object comes over to the server as null.

If I disable enunciate's 'assemble' goal in maven, and I add the 'targetNamespace' to my dog WebParam, then the request works perfectly with SoapUI.

@WebService(targetNamespace = "http://namespace.com/dog/service")
public interface DogSoapService {
    @WebMethod
    public Dog submit(
        @WebParam(name = "dog", targetNamespace = "http://namespace.com/dog/model")
        Dog dog) throws MyWebFault;

However, if I try to build my project with the 'assemble' goal, the deployment fails with this error:

javax.xml.ws.WebServiceException: class com.myproject.dog.ws.jaxws.Submit do not have a property of the name {http://namespace.com/dog/model}dog
at com.sun.xml.ws.server.sei.EndpointArgumentsBuilder$DocLit.<init>(EndpointArgumentsBuilder.java:513)
...
Caused by: javax.xml.bind.JAXBException: {http://namespace.com/dog/model}dog is not a valid property on class com.myproject.dog.ws.jaxws.Submit
...
Caused By: javax.xml.bind.JAXBException: {http://namespace.com/dog/model}dog is not a valid property on class com.myproject.dog.ws.jaxws.Submit
...
Truncated. see log file for complete stacktrace

I see that there is some sort of disconnect between the enunciate generated 'Submit' request wrapper class and my 'Dog' object, but for the life of me, I cannot solve it. Please help! Thanks in advance.

Jean-Rémy Revy
  • 5,607
  • 3
  • 39
  • 65

1 Answers1

0

What happens when you disable the jaxws-support module?

  <enunciate>
     ...
     <modules>
       ...
       <jaxws-support disabled="true"/>
     </modules>
  </enunciate>
Ryan Heaton
  • 1,173
  • 7
  • 11