2011-02-02 58 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> 
相關問題