• 고객센터
  • 교육
  • 매뉴얼
  • 데모
  • 제품소개
조회 수 : 7683
2013.05.14 (16:37:36)

게시판을 이용해 주셔서 감사합니다.
다음양식에 맞게 입력해주세요.

* 고객시스템명 :
* InnoXync 버전 : 2.2.1.6
* WAS 종류(WebLogic 등등) : Tomcat
* DB 종류 : Oracle
* 문의 유형(질문/요청/참조) : 질문
* 내용 :

  public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
    throws Exception
  {
    this.request = request;
    this.response = response;

    IXyncOutputStream ios = null;
    IXyncInputStream iis = null;
    try {

 

/**********************************************************************
      iis = ((HttpIXyncRequest)request).getIXyncInputStream();
      ios = ((HttpIXyncResponse)response).getIXyncOutputStream();     

**********************************************************************/


    } catch (ClassCastException cce) {
      try {
        IXyncConnection iconn = (IXyncConnection)request.getAttribute("IXyncConnection");
        System.out.println("rrrrrrrrrrrrrrr");
        iis = iconn.getHttpIXyncRequest().getIXyncInputStream();
        System.out.println("eeeeeeeeeeeeeee");
        ios = iconn.getHttpIXyncResponse().getIXyncOutputStream();
      } catch (Exception e) {
        throw e;
      }
    }
    handleIXyncRequest(iis, ios);

    return null;
  }

----------------------------------------------------------------------------------------------------------------------------------

Spring과 이노싱크를 연동하여 사용하려 하는데

이노싱크 CAST 에러가 납니다.

제가 ************************************ 로 나눠놓은 부분

iis = ((HttpIXyncRequest)request).getIXyncInputStream();
ios = ((HttpIXyncResponse)response).getIXyncOutputStream();

 

이 부분인데요..  GAUCE쪽 QnA를 보니 비슷한 질문이 많던데

xml에서 필터 설정이라든지 이 부분에는 이상이 없는 것으로 보입니다.

 

현재는 메뉴얼에 따라 저 부분을 컨트롤러에서 extends 해서 사용하고 있는데

그렇게 하지 않고 컨트롤러에서 직접 작성하여 돌려도 같은 에러가 납니다.

 

무슨 이유에서 CAST가 되지 않는지 답변을 주시면 감사하겠습니다.

스프링은 3.0 버전이며 톰캣은 6.0 자바는 1.6 입니다.

 

 


 

2013.05.15 (16:34:36)
shift

넘어오는 패킷에 따라 둘다 사용할 수 있도록 하기 위해 추가된 로직입니다.

 

Innoxync-default.xml에 기술하는 Request 부분에 HttpIXyncRequestWrapper 로 설정하게 되면

iis = ((HttpIXyncRequest)request).getIXyncInputStream(); 로직이 정상적으로 수행되는게 맞습니다.

하지만 web.xml에 다른 필터를 등록 (Sprint,structure등) 다른 필터가 등록되어 있으면 해당 로직에서 에러가 나고 catch 내에 있는  IXyncConnection iconn = (IXyncConnection)request.getAttribute("IXyncConnection");로직을 수행하여 처리를 하게 됩니다. (HttpStrucureRequestWrapper 로 설정)

 

이는 여러 상황에서 발생할 수 있는 에러를 미연에 방지하고자 추가한 로직으로 전자전부프레임웤 등 여러곳에서 사용하고 있습니다.

 

사용자가 수정하여 사용할 수는 있으나 권장하지는 않습니다.

 

감사합니다.

(*.124.184.58)
 
Tag List
XE Login