1

Tomcat で Web サービスを実行すると、次のエラーが発生します。

 HTTP Status 404 -

type Status report

message

description The requested resource () is not available.

Apache Tomcat/6.0.32

エラーが発生しているコードは次のとおりです。

@SuppressWarnings("unchecked")
@WebMethod(operationName = "getTransactionDetails")
public List<MyTransactionWSBean> getTransactionDetails(
    @WebParam(name = "sessionId") long sessionId,
    @WebParam(name = "customerId") long customerId) throws PayboxFault {

MyTransactionWSBean bean = null;
List<MyTransactionWSBean> beanresponse = null;
WSAttribute response = null;
try {
    if (LOG.isInfoEnabled()) {
    LOG.info("Inside updateCustomerRole Service");
    }
    bean = new MyTransactionWSBean();
    WSAttribute wsAttribute = new WSAttribute();
    wsAttribute.setSessionID(sessionId);
    bean.setCustomerId(customerId);
    wsAttribute.setBeanObject(bean);
    wsAttribute.setOperationName("getTransactionDetails");
    IRequestHandler iRequestHandler = HBLUtil
        .getRequestHandler(RequestHandlerType.getTransactionDetailsRHandler);
    response = iRequestHandler.handleRequest(wsAttribute);

    if(wsAttribute.isSuccess())
    {
        beanresponse = (List<MyTransactionWSBean>) response.getBeanObject();
    }

} catch (Exception e) {
    throw handleException("getTransactionDetails", e);
}
return beanresponse;
} 

上記のコードはハンドラーを呼び出しており、ハンドラーは永続性を呼び出して結果をこのサービスに返しています。永続化のための私のコードは次のとおりです。

public class getTransactionDetailsPersistenceImpl extends BasePersistenceService {

protected final static Log LOG = LogFactory
        .getLog(getTransactionDetailsPersistenceImpl.class);

@Override
public WSAttribute createObject(WSAttribute wsAttribute) {

    LOG.info("Inside getTransactionDetailsPersistenceImpl");

    MyTransactionWSBean bean = null;
    String query = null;
    Session session = null;
    WSAttribute response = null;

    try
    {
        session = getHibernateSession();
    response = new WSAttribute();
    bean = (MyTransactionWSBean) wsAttribute.getBeanObject();
    long customerId = bean.getCustomerId();
    long sessionId = wsAttribute.getSessionID();

     query= "select id_txn,id_use_case,amnt_amount,str_text,id_payee,id_payer," +
            "(select str_identification from PBXMOB.customers_identifications " +
            "where ID_customer =" + customerId + " and ID_identification_type = 0) as payer_mobnum ," +
            "(select str_identification from PBXMOB.customers_identifications where " +
            "ID_customer = " + customerId + " and ID_identification_type = 8) as payer_sva " +
            "from pbxmon.mon_txns where id_payer = " + customerId;       

     @SuppressWarnings("unchecked")
     List<MyTransactionWSBean> resultList = session.createSQLQuery(query).list();
     LOG.info("after executing query");
     if(resultList.size() > 0)
     {
         LOG.info("Inside resultList.size()");
         response.setSuccess(true);
         response.setBeanObject(resultList);
     } 

    }
    catch (Exception e) {
        e.printStackTrace();
        LOG.error("Error while Updating Customer Role", e);
    }
    return response;

}
4

0 に答える 0