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

Deserialization Error

Hi there,

I'Ve a surely very simple question...

After deploying and testing my webservice I always get following error:

XML Deserialization Error. XML is not valid. Node <item> child of <status> not described in Schema

If added an extra java class besides my beans called:

SystemStatusTableDTO

With the created WebService I want to return objects of that class containing a container of the also created StatusDTO class (shall be returned as array).

So what ever I do, I'm not able to get the class function with the StatusDTO Array. But I'm able to return single StatusDTO Objects.

Here is my code of the SystemStatusTableDTO class:

package com.dcx.mcg.itp.aa.projects.eeim.data;

import java.io.Serializable;


public class SystemStatusTableDTO implements Serializable
{
    
	protected	UsersDTO		user;
	protected	SystemsDTO		system;
	protected	StatusDTO[]		status;
    

	public SystemStatusTableDTO()
	{
	    
	}		  	

	
	public SystemsDTO getSystem()
	{
		return system;
	}

	public UsersDTO getUser()
	{
		return user;
	}

	

	public void setSystem(SystemsDTO systemsDTO)
	{
		system = systemsDTO;
	}

	public void setUser(UsersDTO usersDTO)
	{
		user = usersDTO;
	}

	public StatusDTO[] getStatus()
	{
		return status;
	}

	public void setStatus(StatusDTO[] statusDTOs)
	{
		status = statusDTOs;
	}

}

Where do I have to define the array?

Regards

Daniel

Add a comment
10|10000 characters needed characters exceeded

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2005 at 11:17 AM

    Hi again,

    thanks for your posts again 😊

    I don't know excactly what you mean.

    But nevermind, I think all was built correctly.

    I thought about another possibility of the error:

    After deploying my webservice the webserver will create a standard test proxy. With this test proxy the web service can be tested before the final uddi publish. Is this right?

    And if so, might it be possible, that the test proxy won't be created complete again after further deployments?

    I also deployed a deployable proxy a long time ago, but deleted it again in the visual administrator (Services->Deploy->WebServices). Maybe this proxy wasn't deleted completly? Are deployed proxies used through the web portal test enviroment?

    Regards

    Daniel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2005 at 08:53 AM

    Hi again,

    thanks for your link, but I know about the XML technology and about XML schemas, I just don't know where I can find the corresponding file in my project 😊

    Here is the code of the StatusDTO class, but there shouldn't be a problem, cause there are only getter and setter:

    public class StatusDTO implements Serializable
    {
    	protected	long		id;
    	protected	String		name;
    	protected	String		description;
    	protected	String		picture;
        
    	public StatusDTO()
    	{
    	    
    	}
    
    
     
        /**
         * Returns the id .
         * 
         * @return The ID.
         */
        public long getId( )
        {
        	return this.id;
        }
    
    
    
        
        /**
         * Returns the name.
         * 
         * @return The name.
         */
        public String getName( )
        {
        	return name;
        }
    
        
            
        /**
         * Sets Id.
         * 
         * @param	ID 	ID to set.
         */
        public void setId( final long id )
        {
        	this.id=id;
        }
    
    
        /**
         * Sets name.
         * 
         * @param	name	Name of the object.
         */
        public void setName( final String name )
        {
        	this.name=name;
        }
    	 
        
    	/**
    	 * Returns complete object as String.
    	 * 
    	 * @return String containing the object data.
    	 */
    	public String toString()
    	{
    	    return this.getId() + " " + this.getName();
    	}
    	
    	
    	public String getDescription()
    	{
    		return description;
    	}
    
    	public String getPicture()
    	{
    		return picture;
    	}
    
    	public void setDescription(String string)
    	{
    		description = string;
    	}
    
    	public void setPicture(String string)
    	{
    		picture = string;
    	}
    
    }

    Strange is, that when I'm setting a StatusDTO object with my Session bean, I'm able to set the picture and the descriptionb variable. But when I'm returning a StatusDTO object from the session Bean I only get the id and the name variable.

    So I think that is excactly my problem:

    I don't know, where I can change these settings. Where is the schema information? In my webservice definition file? But no matter if I'm creating a new definition file, I always get the same errors. And the description and the picture variables are still missing.

    Regards

    Daniel

    Regards

    Daniel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2005 at 09:31 AM

    Hi again,

    sorry but the webservice isn't reachable from the internet and I've also not published the ws yet.

    Maybe it has something to do that I'm always running the ws in a test enviroment of the test portal. I think that the test portal isn't creating new class references each time.

    Maybe the types used for testing are persitent and are not renewed after a deployment.

    See:

    response (test.types.p1.GetSystemStatusAsObjectResponse)

    Response (test.types.SystemStatusTableDTO)

    status (test.types.StatusDTO[])

    (test.types.StatusDTO)

    Could that be?

    Cause I remember:

    as I deployed the webservice for the first time, my StatusDTO class contained only the two fields id and name. Finally I added two new variables and deployed the ws again. But the changes have never been taken.

    Do you know how I can reset the test enviroment?

    Or do you know what I've to delete to get the origin state?

    Regards

    Daniel

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Daniel,

      After changing the StatusDTO, have you followed the

      complete path to create a Web Service? If not, try that

      also. It may be possible that WSD was not updated after

      changes.

      Regards,

      Narinder Hartala

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2005 at 04:02 AM

    Hi Daniel,

    We have to define XML tags is XML schema, in your case

    Node <item> is not described there, so describe that node

    there.

    You can define array of StatusDTO as

    StatusDTO[] status = new StatusDTO[ArraySize].

    or

    StatusDTO[] status.

    status = new StatusDTO[ArraySize].

    put this statement in constructor of your class.

    status = new StatusDTO[ArraySize].

    Hope it clear.

    Regards,

    Narinder Hartala

    Message was edited by: Narinder Hartala

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2005 at 07:25 AM

    Hi Narinder,

    thanks for your post.

    But where do I find this XML Schema.

    Sorry for my stupid questions but I've just started working with the j2ee technology.

    After I've init the array my WebService was running correctly, but after adding an additional variable I got an error again. I still don't get the background of the error.

    My class:

    public class SystemStatusTableDTO implements Serializable
    {
        
    	protected	UsersDTO		user;
    	protected	SystemsDTO		system;
    	protected	StatusDTO		status;
    	protected	StatusDTO[]		statusTable	= new StatusDTO[100];
    ...
    

    Error-Message:

    XML Deserialization Error. Node [urn:com.dcx.mcg.itp.aa.projects.eeim.data][id] not described in Schema.

    As I said, without

    protected	StatusDTO		status;

    all goes right.

    Why?

    Hope somebody can help me

    Regards

    Daniel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2005 at 12:59 PM

    Thanks Narinder for your posts.

    I've created a new class of the SystemStatusTableDTO and called it SystemStatusDTO now. All goes nicely now.

    I still don't know the exact problem, but nevermind.

    Thanks again for helping me and writing so much responses.

    Bye

    Regards

    Daniel

    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.