cancel
Showing results for 
Search instead for 
Did you mean: 

WebService SOAP response problems

Former Member
0 Kudos

hey,

I'm developing a WebService, using EJB's. I have a session bean, which has several methods. One of them returns, say, a class like follows:

class TeamDTO implements Serializable {

private String name;

private Integer teamId;

//getters and setters ..

//..

}

I have several such methods returning various, very similar, classes. Now the problem is, when I try to test my application in the Web Services Navigator the response NEVER contains all the fields I wish. Why is that? Example of a response:

<SOAP-ENV:Envelope ...>

<SOAP-ENV:Body>

<rpl:getAllTeamsResponse ... >

<rpl:Response ...>

<pns:TeamDTO>

<pns:name>team0</pns:name>

</pns:TeamDTO>

</rpl:Response>

</rpl:getAllTeamsResponse>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

But the TeamDTO class has apart from a name field an teamId field as well. What happened?! The same happens to other classes, but there's no rule about the missing column (first I thought it's the PK, like in the above example, but that's not the case).

What am I doing wrong? Ah, the fields are definetely not null, since in the above case it's a PK.

--

regards,

Kornel

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

All type of Datatypes are not allowed in the Webservice.There is a certain limitaions. So check the data type of the unavailable fields.

Kind Regards

Mukesh

Former Member
0 Kudos

Hey,

thanks for your hint, but that's not the problem here - for the example I've posted above java.lang.Integer won't appear, and for another case java.lang.String (whereas in my example String appeared). I'm sure the problem is somewhere else.. What happens if the field is null, will the appropriate tag appear in the soap response?

--

regards,

Kornel

Former Member
0 Kudos

I've solved the problem.

The thing is, the attribute CANNOT have an underscore ('_') in its name. Hence a name like: team_id, some_name, etc are illegal.

I guess it's because of the xml, maybe the attributes cannot have _ in their name. Anyway, for me this is kind of a bug.