Re: Inheritance in axis2 possible? - WSDL2Java
> check the response with the wsdl. because what wsdl2java do is to check the > response > is valid according to the wsdl schema. that attribute must be xsi:type. I can't find the error. In the CobexSMServiceStub? - The firstname Element should be parsed. WSDL File -> www.snakedj.ch/axis2.zip -- if (reader.isStartElement() && new javax.xml.namespace.QName( "http://base.cobex.ch/xsd";, "firstname").equals( reader.getName())) { nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance";, "nil"); -- thanks, Corsin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Inheritance in axis2 possible? - WSDL2Java
Error Message: org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement firstname at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) 2008/1/9, Amila Suriarachchi <[EMAIL PROTECTED]>: > Did you generate the Service using the wsdl2java tool. i.e. you start with > the > wsdl file. or you generate the service with the classes i.e using POJOs. > > For former case it should work. > > thanks, > Amila. > > > On Jan 9, 2008 3:03 PM, Corsin Capol <[EMAIL PROTECTED]> wrote: > > > > Is the following possible with axis2? > > > > ClassA > > ClassB extends ClassA > > > > The service returns an object of ClassB...wsdl2java. > > > > I have tried something like this, but I just received an AxisFault. Ideas? > > > > org.apache.axis2.AxisFault: > org.apache.axis2.databinding.ADBException: > > Unexpected subelement > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > Amila Suriarachchi, > WSO2 Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Inheritance in axis2 possible? - WSDL2Java
> Did you generate the Service using the wsdl2java tool. i.e. you start with > the wsdl file. or you generate the service with the classes i.e using POJOs. I genereated the service client with the wsdl2java tool. This are my tcpmon data... POST /axis2/services/cobexSMService HTTP/1.1 Content-Type: application/soap+xml; charset=UTF-8; action="urn:getEmployee" User-Agent: Axis2 Host: 127.0.0.1: Transfer-Encoding: chunked 93 http://www.w3.org/2003/05/soap-envelope";> 0 -- HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: application/soap+xml; action="urn:getEmployeeResponse";charset=UTF-8 Transfer-Encoding: chunked Date: Wed, 09 Jan 2008 12:04:11 GMT 270 http://www.w3.org/2003/05/soap-envelope";> http://axis2.cobex.ch"; xmlns:ax21="http://servicemanagement.cobex.ch/xsd"; xmlns:ax22="http://base.cobex.ch/xsd";> IT - Software Engineering Software Architect Hans Example [EMAIL PROTECTED] 1 0 Any idea? thanks, Corsin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Inheritance in axis2 possible? - WSDL2Java
Is the following possible with axis2? ClassA ClassB extends ClassA The service returns an object of ClassB...wsdl2java. I have tried something like this, but I just received an AxisFault. Ideas? org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ADBException: Unexpected subelement - Inheritance
I have a problem with inheritance in my axis2 project. I have two classes, employee and person. If I call the service getEmployee i get the following error message. Does somebody have an idea? It's possible to have inheritance in axis2? --axisfault-- org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement firstname -- --person-- import javax.persistence.Column; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.Table; import javax.persistence.Entity; @Entity @Table(name = "\"tbl_Person\"") @Inheritance(strategy = InheritanceType.JOINED) public class Person { @Id @GeneratedValue @Column(name = "fld_perId") private Long personId; @Column(name = "fld_perFirstname") private String firstname; @Column(name = "fld_perLastname") private String lastname; @Column(name = "fld_perEmail") private String mail; //@Column(name = "fld_perUserId") //private User userId; public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } public String getMail() { return mail; } public void setMail(String email) { this.mail = email; } public Long getPersonId() { return personId; } public void setPersonId(Long personId) { this.personId = personId; } } -- --employee-- import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.PrimaryKeyJoinColumn; import javax.persistence.Table; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.AnnotationConfiguration; @Entity @Table(name = "\"tbl_Employee\"") @PrimaryKeyJoinColumn(name = "fld_empId") public class Employee extends Person { @Column(name = "fld_empDepartment") private String department; @Column(name = "fld_empJob") private String job; private static SessionFactory sessionFactory; public static Employee[] getEmployee() { Transaction tx = null; sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory(); Session session = sessionFactory.getCurrentSession(); tx = session.beginTransaction(); Query query = session.createQuery("SELECT emp " + "FROM Employee emp "); List empList = query.list(); Employee[] emp = (Employee[]) empList.toArray(new Employee[empList.size()]); tx.commit(); sessionFactory.close(); return emp; } public String getDepartment() { return department; } public void setDepartment(String department) { this.department = department; } public String getJob() { return job; } public void setJob(String job) { this.job = job; } } -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]