[JBoss Seam] - GWT Integration
by rvkishore
I am trying to get a GWT widget to talk to my Seam application. I followed the example in the seam reference doc. But it looks like the Seam ServiceImpl component is not getting called at all.
I have a question specific to the setting of the service. In the example code
| private MyServiceAsync getService()
| {
| String endpointURL = GWT.getModuleBaseURL() + "seam/resource/gwt";
| MyServiceAsync svc = (MyServiceAsync) GWT.create(MyService.class);
| ((ServiceDefTarget) svc).setServiceEntryPoint(endpointURL);
| return svc;
| }
This says that the Seam service component is available to the gwt widget at the endpoint URL. I did not find any configuration being set on the server to make the Service component available at that endpoint URL.
What if there are multiple seam services to be invoked? Is there a pattern to the endpoint URL based on the seam service component?
I am using Jboss AS 4.2.1 / Seam 2.0.0 CR2
Thanks in advance
Kishore
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098908#4098908
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098908
18Â years, 6Â months
[JBoss Seam] - authentication method not called
by kgoedert
Hello,
I have used seam 2.0 successfully before with jboss 4.2 and jsf. Now I had downgrade do jboss 4.0.5 and seam 1.2.1.
I'm not being able to get the authentication method called. All I get is "Conversion error" from the faces (myfaces) validator.
Here are some config files:
in components.xml
| <security:identity authenticate-method="#{authenticator.authenticate}" />
|
My web.xml
| <?xml version="1.0" ?>
|
| <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
|
| <!-- Seam -->
| <listener>
| <listener-class>
| org.jboss.seam.servlet.SeamListener
| </listener-class>
| </listener>
| <!-- MyFaces -->
| <listener>
| <listener-class>
| org.apache.myfaces.webapp.StartupServletContextListener
| </listener-class>
| </listener>
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>client</param-value>
| </context-param>
| <servlet>
| <servlet-name>Faces Servlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
| <!-- Faces Servlet Mapping -->
| <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>*.fise</url-pattern>
| </servlet-mapping>
| <context-param>
| <param-name>javax.faces.CONFIG_FILES</param-name>
| <param-value>/WEB-INF/navigation.xml</param-value>
| </context-param>
| <context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
|
| </web-app>
|
In faces-config.xml
| <faces-config>
| <application>
| <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
| <locale-config>
| <default-locale>pt_BR</default-locale>
| </locale-config>
| </application>
|
| </faces-config>
|
My authentication method
| @In
| EntityManager entityManager;
| @In
| Identity identity;
|
| public boolean authenticate() {
| try {
| entityManager.createQuery("from User where username = :username and password = :password").setParameter("username", identity.getUsername()).setParameter("password",
| identity.getPassword()).getSingleResult();
|
| return true;
| } catch (NoResultException ex) {
| FacesMessages.instance().add("Invalid username/password");
| return false;
| }
|
| }
|
Can anybody help?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098905#4098905
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098905
18Â years, 6Â months