on 05-04-2007 12:16 PM
Hi All,
I have cerated an EJB Wihich fetches the vendor data from MDM database,this EJB I have exposed as a web service.
This Ejb returns an array of object of java class which contains 7 attributes,
Like Vendor number,
City,
country,
Name,
company code,
purchase organization.
Now when i debug the EJB it is returning proper values with all attribute.
But in the web services response am able to get same number of records but attribute list is less...like I am getting the value of only City ,country and Vendor Number although EJB is returning all the values.
If any one can help me with the problem.
Thanks in advance.
Shruti
Hai,
Is that returning java class is having setters and getters, and implementing serializable.
look like
public class beanToTest implements Serializable{
private String vendornumber=null;
private String city=null;
private String country=null;
private String name=null;
private String companyCode=null;
private String purchaseOrganization=null;
/**
@return
*/
public String getCity() {
return city;
}
/**
@return
*/
public String getCompanyCode() {
return companyCode;
}
/**
@return
*/
public String getCountry() {
return country;
}
/**
@return
*/
public String getName() {
return name;
}
/**
@return
*/
public String getPurchaseOrganization() {
return purchaseOrganization;
}
/**
@return
*/
public String getVendornumber() {
return vendornumber;
}
/**
@param string
*/
public void setCity(String string) {
city = string;
}
/**
@param string
*/
public void setCompanyCode(String string) {
companyCode = string;
}
/**
@param string
*/
public void setCountry(String string) {
country = string;
}
/**
@param string
*/
public void setName(String string) {
name = string;
}
/**
@param string
*/
public void setPurchaseOrganization(String string) {
purchaseOrganization = string;
}
/**
@param string
*/
public void setVendornumber(String string) {
vendornumber = string;
}
}
Regards,
naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai Sruthi,
In your Session bean Business Method. have you doing like this.
collection coll=getDatafromBackend();
Iterator itr=coll.iterator();
ReturnClass array[]=new ReturnClass[coll.size()];
int i=0;
while(itr.hasNext()){
ReturnClass cls=new ReturnClass ();
cls.setData(itr.next());
array<i>=cls;
}
Regards,
Naga
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.