0
是否可以从Web服务中触发Web服务?Web服务触发另一个Web服务?
/**
* Web service operation
*/
@WebMethod(operationName = "bookFlight")
public String bookFlight(@WebParam(name = "destination")
String destination, @WebParam(name = "seats")
int seats) {
try {
String ret = composite.bookFlight(destination, seats);
if(composite.checkDistance(destination) > 15)
{
}
return ret;
} catch (FileNotFoundException_Exception ex) {
Logger.getLogger(compositeBookings.class.getName()).log(Level.SEVERE, null, ex);
} catch (InterruptedException_Exception ex) {
Logger.getLogger(compositeBookings.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
}
在空if函数体我需要触发另一个Web服务...
任何考生?
这里是Web服务,我需要从if语句推出
/**
* Web service operation
*/
@WebMethod(operationName = "bookHotel")
public String bookHotel(@WebParam(name = "destination")
String destination, @WebParam(name = "rooms")
int rooms) {
try {
String ret = composite.bookHotel(destination, rooms);
return ret;
} catch (myhotels.InterruptedException_Exception ex) {
Logger.getLogger(compositeBookings.class.getName()).log(Level.SEVERE, null, ex);
} catch (myhotels.FileNotFoundException_Exception ex) {
Logger.getLogger(compositeBookings.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
}
我有权访问代码,但它需要用户输入,就像父服务一样。 – 2011-01-11 17:39:28