on 06-06-2005 6:50 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
I was saying that now again try to create Web Service
afresh from your class.
Refer these links(may be you already doing same)
http://help.sap.com/saphelp_erp2004/helpdata/en/f7/af60f2e04d0848888675a800623a81/frameset.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/2b/a6888f335a6d48b968ffdd59a25d1b/frameset.htm
Regards,
Narinder Hartala
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
Everything in this class seems ok.
plz share WSDL file for this web service.
Also visit this link....
http://help.sap.com/saphelp_erp2004/helpdata/en/9f/471a40251e2402e10000000a1550b0/frameset.htm
Regards,
Narinder Hartala
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
I think problem lies with the class StatusDTO,
plz post code of that class, so that i can try to sort
out the problem.
To learn about XML and XML schema visit following link..
http://www.w3schools.com/schema/default.asp
Regards,
Narinder Hartala
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.