2014-06-06 46 views
0

我用Axis2引擎(服務器和客戶端)創建SOAP Web服務時都使用這個link 它工作正常。客戶端的Eclipse插件(使用WSDL的代碼)創建了存根,回調處理程序,暴露的方法類等等。SOAP webservices:Axis2 1.6.2

我的一個朋友給了一些也包含使用axis2的客戶端的項目。這個項目,我可以看到一些文件,如下所示:

` 
import javax.xml.bind.annotation.XmlAccessType; 
import javax.xml.bind.annotation.XmlAccessorType; 
import javax.xml.bind.annotation.XmlRootElement; 
import javax.xml.bind.annotation.XmlType; 


/** 
* <p>Java class for anonymous complex type. 
* 
* <p>The following schema fragment specifies the expected content contained within this class. 
* 
* <pre> 
* &lt;complexType> 
* &lt;complexContent> 
*  &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 
*  &lt;sequence> 
*   &lt;element name="count" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> 
*  &lt;/sequence> 
*  &lt;/restriction> 
* &lt;/complexContent> 
* &lt;/complexType> 
* </pre> 
* 
* 
*/ 
@XmlAccessorType(XmlAccessType.FIELD) 
@XmlType(name = "", propOrder = { 
    "count" 
}) 
@XmlRootElement(name = "deleteMultipleResponse") 
public class DeleteMultipleResponse { 

    protected String count; 

    /** 
    * Gets the value of the count property. 
    * 
    * @return 
    *  possible object is 
    *  {@link String } 
    *  
    */ 
    public String getCount() { 
     return count; 
    } 

    /** 
    * Sets the value of the count property. 
    * 
    * @param value 
    *  allowed object is 
    *  {@link String } 
    *  
    */ 
    public void setCount(String value) { 
     this.count = value; 
    } 

} 
` 

有多個文件,我可以在其中看到和使用註釋。

` /** 
    * <p>Java class for anonymous complex type. 
    * 
    * <p>The following schema fragment specifies the expected content contained within this class. 
    * 
    * <pre> 
    * &lt;complexType> 
    * &lt;complexContent> 
    *  &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 
    *  &lt;sequence> 
    *   &lt;element name="count" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> 
    *  &lt;/sequence> 
    *  &lt;/restriction> 
    * &lt;/complexContent> 
    * &lt;/complexType> 
    * </pre> 
    * 
    * 
    */ 
` 

我已經使用這個link不產生任何這樣的文件和使用說明的任何文件創建的項目。

你能解釋一下這個區別嗎?

回答

0

你的朋友似乎使用JAXB數據綁定,而你顯然不是。

有可供AXIS2數據綁定(ADB,公理,JAXB等)幾個不同選項

你可能想看看Apache官方Axis2的教程,以獲得更深入的瞭解 http://axis.apache.org/axis2/java/core/docs/userguide-creatingclients.html#adb

+0

是它JAXB或jibx。當我試圖在eclipse中使用Axis2代碼gen插件從WSDL創建客戶端代碼時,我得到了數據綁定名稱中的g 4選項,即adb,xmlbeans,jibx,none。你在說這個'jibx'嗎? – VJS