views:

137

answers:

0

My web services kept prompt me null input after I add in the implementation class. Below is my schema file.

<xsd:complexType name="module">
     <xsd:annotation>
     <xsd:appinfo>
        <jaxb:class name="Module"
                    implClass="packageA.ModuleImpl"/>
     </xsd:appinfo>
  </xsd:annotation>
  <xsd:sequence>
     <xsd:element name="moduleId" type="xsd:int" minOccurs="0"/>
     <xsd:element name="moduleName" type="xsd:string" minOccurs="0"/>
     <xsd:element name="student" type="lns:student" minOccurs="0"/>
  </xsd:sequence>

<xsd:complexType name="student">
     <xsd:annotation>
     <xsd:appinfo>
        <jaxb:class name="Student"
                    implClass="packageA.StudentImpl"/>
     </xsd:appinfo>
  </xsd:annotation>
  <xsd:sequence>
     <xsd:element name="studentId" type="xsd:int" minOccurs="0"/>
     <xsd:element name="studentName" type="xsd:string" minOccurs="0"/>
  </xsd:sequence>

inside Module class I have these attributes :

private Integer moduleId;
private String moduleName;
private Student student;

inside ModuleImpl class I have this constructor "

public ModuleImpl(Module mo){
   this.moduleId = mo.moduleId;
   this.moduleName = mo.moduleName;
   this.student = mo.student;
}

My implementation class will extends the based class. When I called to web services to cretae a record

public String createModule(Module module){
      proxy.createModule(new ModuleImpl(module));
}

Now the problem i hits is that the studentId kept return me null, I not sure why after I add in implClass then studentId became null.