4 Replies Latest reply: Oct 3, 2013 12:19 PM by user10981010 RSS

    Does any one implemented solution for httpservlet request/response object in IWSDLInterceptor implemented class?

    user10981010

      I am trying to handle Producer not available situation in which I am using Interceptor IWSDLInterceptor in WLP 10.3.4. I am able to retrieve exception using onWSDLException but from here if I have to forward my pageURL object I need httpservlet request and response. I tried my own filter class to have its own customize request and also tried it out all other Interceptor to see if any one can handle IOException. I did manage to throw my own Customize exception but  that also did not work out as Page does not have any backing file or any supportive Controller class.

       

      Does any one implemented solution for httpservlet request/response object in IWSDLInterceptor implemented class? or do we have any specific documentation in regards to this? As I am not able to find much martial on IWSDLInterceptor except Java API from Oracle and article defining Two way SSL handshake Producer.

       

      Any kind of help is appreciated.

       

      Thanks

      PT

        • 1. Re: Does any one implemented solution for httpservlet request/response object in IWSDLInterceptor implemented class?
          User10656774-Oracle

          Hello,

           

          HttpServletRequest & HttpServletResponse objest are available from wsrp interceptors as shown here :

           

          responseContext.render(requestContext.getHttpServletRequest(),  requestContext.getHttpServletResponse(),  "/redirectTarget/myTarget.jsp");

           

           

          Emmanuel

          • 2. Re: Does any one implemented solution for httpservlet request/response object in IWSDLInterceptor implemented class?
            user10981010

            Thanks Emmanuel for your response but render behavior is not available for IWSDLRequestContext/IWDSLResponseContext object which IWSDLInterceptor uses for implementation.

             

            Let me put my question in little simpler manner. May be my approach to the problem is not proper.

             

            Problem : Handle Producer Not available (no application exists on server) on consumer side.

             

            So far tried approach : Producer is not running then I am able to handle that TransportException at IInitCookieInterceptor/IHandleEventInterceptor onFault behaviour but in the case of Producer not even exists Consumer try to get WSDL fetch operation and failed with FileNotFoundException.

             

            To handle this exception, I used IWSDLInterceptor which is available under IWSDLInterceptor.OnWSDLException (Oracle Fusion Middleware Java API for Oracle WebLogic Portal)

             

            I am able to catch the exception but problem arise when application needs to forward at specific page/render portlet for this situation. For that it required request/response object but IWSDLInterceptor does not give any kind of instances to redirect request as there is no direct access to HTTPServlet request/response object.

             

            I tried my custom request object to use there. I tried out custom filter object of IWSDLrequestContext. nothing works.

             

            One approach works is to put producer WSDL file at consumer level. But in that, you need to handle different producer files for different environment. Which I don't think its a good approach.

             

            eAny one Let me know if my approach to the problem/scenario is wrong. Or if I am missing out any other supporting interface which also required to handle this scenario. or I am using wrong interface for this scenario.

             

            Thanks for your help in advance.

             

            PT.

            • 3. Re: Does any one implemented solution for httpservlet request/response object in IWSDLInterceptor implemented class?
              User10656774-Oracle

              as far as i remember this situation can not be handled using wsrp interceptors. It's a king of lake in the interceptor chain.

               

              You have 2 solutions :

              1.Override the jsp /framework/features/proxyportleterror.jsp provided with WLP. It is the jsp that will be fired in this situation.

              2."Move" the wsdl file on the consumer side and register the producer from that wsdl, not the one provided by the producer application.


              The first solution is the best i think.

               

              Emmanuel

              • 4. Re: Does any one implemented solution for httpservlet request/response object in IWSDLInterceptor implemented class?
                user10981010

                Thanks again for your response. I was suspecting that answer because of yours and Kevin's response in a past

                https://forums.oracle.com/thread/853851

                 

                But can you or anyone else tell me what is the purpose & use of IWSDLInterceptor and why it does not have request response object in its request/response context.

                 

                Let say because of framework design it does not have that then there must be some way you can get request object. Because all other subsequent request (like forwarding to page or disabling producer portlet rendering at other location) required that and when I was using my custom request it was actually using my custom request instead of normal httpservlet request. So there must be something which allows you to redirect user on specific page instead of handling error in proxyportleterror.jsp.

                 

                Emmanuel, Your answer is really helpful and will tag it helpful. if I don't find proper logical answer to my above question then will mark it as correct answer.

                 

                I am trying to understand why request context for this interface implemented differently then other interceptor and if its a framework limitation then why there is not way to get httpservlet request in this interface so that IOException can be handle on consumer side.

                 

                Thanks

                PT.