0
웹 서비스 내에서 웹 서비스를 트리거 할 수 있습니까? 빈에서다른 웹 서비스를 트리거하는 웹 서비스?
/**
* 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 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;
}
코드에 액세스 할 수 있지만 부모 서비스처럼 사용자 입력이 필요합니다 ... –
'그러나 부모 서비스처럼 사용자 입력이 필요합니다. '이 시점을 얻지 못하면 서비스가 매개 변수를 사용하고 있습니까? 이것이 당신이 의미하는 것보다 간단한 자바 메서드처럼 직접 매개 변수를 전달할 수 있습니다. –
예, 매개 변수를 사용하지 않습니다. 사용자 정의, 첫 번째와 동일 - @ WebParam의 –