2011-02-02 52 views
1

有没有人遇到过这个?基本上,我从SUN jre切换到IBM,由于wsdl2java没有编译必要的setter方法,编译失败。WSDL2JAVA不会生成setter方法

在此先感谢。

+0

`wsdl2java`是一个Sun JDK工具。如果在IBM JDK中有相同名称的东西,它的行为可能完全不同。这些工具不是标准的。 – skaffman 2011-02-02 15:01:57

+0

你确定吗?我会说这是一个Axis工具,它的限定名是org.apache.axis.wsdl.WSDL2Java。另请参阅http://axis.apache.org/axis/java/reference.html – heeboir 2011-02-02 15:06:57

回答

2

您使用jaxb吗?

生成的代码是否有类似这样的内容?

/** 
    * Gets the value of the parameter property. 
    * 
    * <p> 
    * This accessor method returns a reference to the live list, 
    * not a snapshot. Therefore any modification you make to the 
    * returned list will be present inside the JAXB object. 
    * This is why there is not a <CODE>set</CODE> method for the parameter property. 
    * 
    * <p> 
    * For example, to add a new item, do as follows: 
    * <pre> 
    * getParameter().add(newItem); 
    * </pre> 
相关问题