cancel
Showing results for 
Search instead for 
Did you mean: 

Web Service's Return Data Type!

Former Member
0 Kudos

Hi.

I created my web service with NWDS7.1 and deploy it.

In this web service i create two method which return a String Type and a List Type.

But In VC, i can't use the method which return type is List.

Anyone can tell me , how i can return the data which selected from DataBase ?

I'm a beginner of this. Please help me!

Thanks.

Fan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Fan,

Something like this,


public List<Parts> getParts( @WebParam(name="sqlDb") final String pSqlDb, @WebParam(name="shipId") final String pShipId, @WebParam(name="engineId") final String pEngineId, @WebParam(name="partId") final String pPartId , @WebParam(name="desc") final String pDesc ) throws Exception
      {
            List<Parts> lRows= sqlBridgeSessionBean.getparts(pSqlDb, pShipId, pEngineId, pPartId, pDesc);
                  
            
            List<Parts> lList = new LinkedList<Parts>();
            for (int j=0; j < lRows.size(); j++) {
                   
                  lList.add( lRows.get(j) );
                  
           }
            
            
            return lList;

Which Database are you trying to connect?

Regards,

Dharmi

Edited by: Dharmi Tanna on May 8, 2008 3:45 PM

Answers (0)