繁体   English   中英

SOAP Web服务:Axis2 1.6.2

[英]SOAP webservices : Axis2 1.6.2

我已经使用此链接使用Axis2引擎(服务器和客户端)创建了SOAP Web服务。它工作正常。 用于客户端的Eclipse插件(使用WSDL的代码生成)创建了存根,回调处理程序,公开的方法类等。到目前为止一切正常。

我的一位朋友给了一个项目,该项目还包含使用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>
     * 
     * 
     */
`

我使用此链接创建的项目未生成任何此类文件和任何使用注释的文件。

你能解释一下区别吗?

您的朋友似乎使用了JAXB数据绑定,而您显然没有。

AXIS2数据绑定有几种不同的选项(ADB,Axiom,Jaxb等)。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM