Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Return custom object  RSS feed

 
Vishal Kumar
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Folks -

In my method getVFDList, I would like to return a custom object List<UserVFDAccessProfile>.

However when I change the method signature to be public List<UserVFDAccessProfile> getVFDList(String userName) then I get the following errors when trying to generate the WSDL file inside WebLogic.

Module named 'safetEAR' failed to redeploy.
Child module of 'safetEAR' named 'safet' failed to redeploy.
weblogic.application.ModuleException:


import javax.jws.*;
import java.util.List;
import java.util.ArrayList;
import com.wellsfargo.safet.enrollment.dto.UserVFDAccessProfile;

@WebService
public class VFDListService {

@WebMethod
public List getVFDList(String userName)
{
List<UserVFDAccessProfile> vfdList = new ArrayList<UserVFDAccessProfile>();

UserVFDAccessProfile uvap1 = new UserVFDAccessProfile();
uvap1.setUserId("user1");
uvap1.setApplicationName("AAP");
uvap1.setFullyQualifiedPath("c:\\test2\\");
uvap1.setCanGet(true);
uvap1.setCanPut(true);
vfdList.add(uvap1);

UserVFDAccessProfile uvap2 = new UserVFDAccessProfile();
uvap2.setUserId("user2");
uvap2.setApplicationName("AAK");
uvap2.setFullyQualifiedPath("c:\\test2\\");
uvap2.setCanGet(true);
uvap2.setCanPut(false);
vfdList.add(uvap2);

return vfdList;
}

public static void main (String args[]) {
VFDListService test = new VFDListService();
List<UserVFDAccessProfile> vfdTest = test.getVFDList("user");
System.out.println("Value of Application Name is :" + vfdTest.get(0).getApplicationName());
System.out.println("Value of Application Name is :" + vfdTest.get(1).getApplicationName());

}

}

Any thoughts ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!