facebook

Problem with webservice + List resultset

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #282426 Reply

    prideu2
    Member

    Hi guys, I’m having a newbie problem with a webservice returning a list of objects.
    This is the code:

    
        public List<ExitService> example(String message) {
            
            List<ExitService> objList = new ArrayList<ExitService>();
            
            ExitService objExitService = new ExitService("text1","text2");
            objVector.add(objExitService);
            objExitService = new ExitService("text3","text4");
            objVector.add(objExitService);
            return objList;
        }
    

    This is the class:

    
    public class ExitService {
        String Texto;
        String Texto2;
        
        ExitService(String Texto,String Texto2) { this.Texto = Texto; this.Texto2=Texto2; }
    
    }
    

    And the resulting SOAP message

    
    - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <soap:Body>
    - <exampleResponse xmlns:ns1="http://helloPackage">
    - <ns1:out>
      <ns1:ExitService /> 
      <ns1:ExitService /> 
      </ns1:out>
      </exampleResponse>
      </soap:Body>
      </soap:Envelope>
    
    #282437 Reply

    prideu2
    Member

    Sorry to bother you guys 🙂 I forgot the setter and getter, now it works perfectly!!

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Problem with webservice + List resultset

You must be logged in to post in the forum log in