Skip to Content
author's profile photo Former Member
Former Member

XML deserialization error

Hi all,

I am following the SAP WEBAS 6.4 tutorials to create the Customer web service and eventually use it in a webdynpro. when I execute the register method I get the following error message:

"Deserializing fails. Nested message: XML Deserialization Error. Can not create instance of class [com.sap.demo.customer.common.CustomerDTO] when deserializing XML type [urn:com.sap.demo.customer.common][CustomerDTO]..

I tried adding an empty constructor to the CustomerDTO class. this removes the error but the register method fails to insert data into the customer table.

Please help

Thanks,

Jay

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2005 at 04:56 AM

    Hi,

    Check this post !

    webservice-exception

    Regards

    Bharathwaj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2005 at 01:01 PM

    Hi Bharathwaj,

    Thanks for the reply. I tried to rebuild the web service model, but i still get the same result.

    Here is the code for CustomerDTO:

    package com.sap.demo.customer.common;

    import java.io.Serializable;

    public class CustomerDTO implements Serializable {

    private String form;

    private String name;

    private String street;

    private String zip;

    private String city;

    private String country;

    private String phone;

    private String email;

    private String username;

    private String password;

    // Constructor

    public CustomerDTO(String form,

    String name,

    String street,

    String zip,

    String city,

    String country,

    String phone,

    String email,

    String username,

    String password)

    {

    this.form = form;

    this.name = name;

    this.street = street;

    this.zip = zip;

    this.city = city;

    this.country = country;

    this.phone = phone;

    this.email = email;

    this.username = username;

    this.password = password;

    }

    public CustomerDTO() {}

    /**

    • @return

    */

    public String getCity() {

    return city;

    }

    /**

    • @return

    */

    public String getCountry() {

    return country;

    }

    /**

    • @return

    */

    public String getEmail() {

    return email;

    }

    /**

    • @return

    */

    public String getForm() {

    return form;

    }

    /**

    • @return

    */

    public String getName() {

    return name;

    }

    /**

    • @return

    */

    public String getPassword() {

    return password;

    }

    /**

    • @return

    */

    public String getPhone() {

    return phone;

    }

    /**

    • @return

    */

    public String getStreet() {

    return street;

    }

    /**

    • @return

    */

    public String getUsername() {

    return username;

    }

    /**

    • @return

    */

    public String getZip() {

    return zip;

    }

    /**

    • @param string

    */

    public void setCity(String string) {

    city = string;

    }

    /**

    • @param string

    */

    public void setCountry(String string) {

    country = string;

    }

    /**

    • @param string

    */

    public void setEmail(String string) {

    email = string;

    }

    /**

    • @param string

    */

    public void setForm(String string) {

    form = string;

    }

    /**

    • @param string

    */

    public void setName(String string) {

    name = string;

    }

    /**

    • @param string

    */

    public void setPassword(String string) {

    password = string;

    }

    /**

    • @param string

    */

    public void setPhone(String string) {

    phone = string;

    }

    /**

    • @param string

    */

    public void setStreet(String string) {

    street = string;

    }

    /**

    • @param string

    */

    public void setUsername(String string) {

    username = string;

    }

    /**

    • @param string

    */

    public void setZip(String string) {

    zip = string;

    }

    }

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.