javajax-wswsgen

Java JAX-WS, wsgen, Class as Parameter?


I use wsgen to generate Java SOAP stubs.

Using Java basic types or also collections is NO problem.

But if I try to use a custom class as a parameter I get an error from wsgen. javac I do before over the java-files is without error.

here my Interface.java as an example:

@WebService (targetNamespace = "TNS")
public class Interface
{
  public int foo (F f)
  {
    return 1;
  }
}

class F
{
}

The error from wsgen is "cannot find symbol : class F". I tried also packages, F in own file, etc.

The call of wsgen is: wsgen -cp . -wsdl Interface

any ideas?? thanks!


Solution

  • additional annotatoin solved the problem:

    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
    

    found out by looking at the code generated the other way (wsdl -> java) by wsimport.