- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://BookSrv">
- <xsd:complexType name="ArrayOfBook">
- <xsd:sequence>
  <xsd:element maxOccurs="unbounded" minOccurs="0" name="Book" nillable="true" type="ns1:Book" /> 
  </xsd:sequence>
  </xsd:complexType>
- <xsd:complexType name="Book">
- <xsd:sequence>
  <xsd:element minOccurs="0" name="author" nillable="true" type="xsd:string" /> 
  <xsd:element minOccurs="0" name="isbn" nillable="true" type="xsd:string" /> 
  <xsd:element minOccurs="0" name="title" nillable="true" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="BookException" /> 
  <xsd:element name="BookFault" type="ns1:BookException" /> 
  </xsd:schema>
  </wsdl:types>

解决方案 »

  1.   

    相应的**.aegis.xml没加到工程,加了报了两个相同的错:XSD:   Type   reference   'http://BookSrv#Book'   is   unresolved 
    package BookSrv;//import org.codehaus.xfire.aegis.type.java5.XmlType;
    //import org.codehaus.xfire.aegis.type.java5.XmlElement;//@XmlType(namespace="http://Book")
    public class Book
    {
        private String title;
        private String isbn;
        private String author;
      
        //@XmlElement(name="isbn", namespace="http://Book")
        public String getIsbn()
        {
            return isbn;
        }    public void setIsbn(String isbn)
        {
            this.isbn = isbn;
        }
        
        //@XmlElement(name="title", namespace="http://Book")
        public String getTitle()
        {
            return title;
        }    public void setTitle(String title)
        {
            this.title = title;
        }
     
        //@XmlElement(name="author", namespace="http://Book")
        public String getAuthor()
        {
            return author;
        }    public void setAuthor(String author)
        {
            this.author = author;
        }
    }