1 Reply Latest reply on Feb 7, 2009 3:35 PM by Harihara Vinyakaram

    Accessing a JSF view from Web Services

    Harihara  Vinyakaram Newbie

        I am using facelets for rendering a page . This page displays the statistics for my application . Since this is a xhtml and hence well formed xml I would like to make this page available via the WebServices method also .I am doing this because I want to make sure that the web page and the page available to the Web Service show the same data.
      I have tried the following and it does not work

      In the WebServices Implementation I tried

      Renderer renderer = Renderer.instance();

      This throws a NullPointer Exception while trying to render the page.

      Caused by: java.lang.NullPointerException: 
              at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:80)
              at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
              at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
              at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
              at org.jboss.el.parser.AstNotEqual.getValue(AstNotEqual.java:21)
              at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
              at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)
              at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:114)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:832)
              at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:175)
              at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
              at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:214)
              at org.jboss.seam.ui.facelet.FaceletsRenderer$1.process(FaceletsRenderer.java:166)
              at org.jboss.seam.ui.facelet.FaceletsRenderer$RenderingContext.run(FaceletsRenderer.java:79)
              at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:175)

      I have set the standard-jaxws-endpoint-config.xml and I have enabled debug statements for the SOAP Handler and have seen that this is invoked.  From my understanding I think the Seam Filter is not invoked for the request. should I add a context in the web.xml for these requests

      Let me know where I have gone wrong



        • 1. Re: Accessing a JSF view from Web Services
          Harihara  Vinyakaram Newbie

            I have managed to debug some more . The problem seems to be with the El Expressions in the xhtml page. The mypage.xhtml contains the following

          <h:outputText value="#{component.description}"
          <h:dataTable value="#{component.list} var="item">
            <h:columm> <h:outputText value="#{item.description}" /> </h:column>

          I find that the component.description El Expression is evaluated properly while the item.description throws the Null Pointer Exception thrown above.

          Is there some additional EL Resolvers I need to add for the Web Service to resolve the var in the 2nd ElExpression

          All help will be appreciated