0

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!

chris01
  • 10,921
  • 9
  • 54
  • 93
  • 2
    I would guess that `F` not being public is a problem - the type isn't visible outside its package. – McDowell Oct 30 '12 at 09:41
  • After tried to do it top-down with an wsdl I found out the wsimport-java-generator puts a additional annotation in it. @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) – chris01 Oct 30 '12 at 11:41

1 Answers1

1

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.

chris01
  • 10,921
  • 9
  • 54
  • 93