View Single Post
  #2 (permalink)  
Old 07-06-2007, 04:38 PM
Eric Eric is offline
Senior Member
 
Join Date: Jun 2007
Posts: 111
Eric is on a distinguished road
This is an example about calling a WS using Axis with password and user
Code:
Call call = null; Service service = new Service(); try { call = (Call) service.createCall(); call.setTargetEndpointAddress("URL"); call.setUsername("user"); call.setPassword("pass")); call.setOperationName( new QName ("name of the webservice", "service")); org.w3c.dom.Element test = (org.w3c.dom.Element) call.invoke(array of objects) } catch (ServiceException e) { e.printstacktrace(); System.err.println("Algo malo pasó"); }
you have to write in url, user,pass,name of the webservice, service,array of objects your proper information
Reply With Quote