Remoting not generating interface methods
earnest.dyke Jun 22, 2009 2:58 PMGreetings all,
I have the code listed below and for some reason I cannot determine it is NOT generating method stubs in javascript for the methods marked with @WebRemote. Any ideas why this would be happening?
Earnie!
<?xml version="1.0" encoding="UTF-8"?> <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:persistence="http://jboss.com/products/seam/persistence" xmlns:drools="http://jboss.com/products/seam/drools" xmlns:bpm="http://jboss.com/products/seam/bpm" xmlns:security="http://jboss.com/products/seam/security" xmlns:mail="http://jboss.com/products/seam/mail" xmlns:web="http://jboss.com/products/seam/web" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.1.xsd http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.1.xsd http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.1.xsd http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.1.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd"> <component name="org.jboss.seam.remoting.remoting"> <property name="debug">true</property> <property name="pollTimeout">2</property> <property name="pollInterval">1</property> </component> <core:init debug="true" jndi-pattern="@jndiPattern@" /> <core:manager concurrent-request-timeout="500" conversation-timeout="120000" conversation-id-parameter="cid" parent-conversation-id-parameter="pid" /> <web:hot-deploy-filter url-pattern="*.seam" /> <persistence:managed-persistence-context name="entityManager" auto-create="true" persistence-unit-jndi-name="java:/passTheTrashEntityManagerFactory" /> <drools:rule-base name="securityRules"> <drools:rule-files> <value>/security.drl</value> </drools:rule-files> </drools:rule-base> <security:rule-based-permission-resolver security-rules="#{securityRules}" /> <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true" /> <event type="org.jboss.seam.security.notLoggedIn"> <action execute="#{redirect.captureCurrentView}" /> </event> <event type="org.jboss.seam.security.loginSuccessful"> <action execute="#{redirect.returnToCapturedView}" /> </event> </components>
package com.x.y.session; import javax.ejb.Local; import com.x.y.entity.Game; import org.jboss.seam.annotations.remoting.WebRemote; @Local public interface GamePlay { @WebRemote String startNewGame(); public void allDone(); @WebRemote Game getGame(); }
package com.x.y.session; import static org.jboss.seam.ScopeType.CONVERSATION; import javax.ejb.Remove; import javax.ejb.Stateful; import org.jboss.seam.annotations.Destroy; import org.jboss.seam.annotations.Factory; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.Scope; import com.x.y.entity.Game; @Stateful @Name("gamePlayAction") @Scope(CONVERSATION) public class GamePlayAction implements GamePlay { private Game game; public Game getGame() { return game; } public String startNewGame() { game = new Game(); return "gameBoard"; } @Remove @Destroy public void allDone() { } }
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" template="layout/template.xhtml"> <ui:define name="body"> <script type="text/javascript" src="seam/resource/remoting/resource/remote.js" /> <script type="text/javascript" src="seam/resource/remoting/interface.js?gamePlayAction" /> <script type="text/javascript" src="game.js" /> <script type="text/javascript"> startNewGame(); </script> <rich:panel> <h:panelGrid columns="3"> <s:div id="r1_c1">R1C1</s:div> <s:div id="r1_c2">R1C2</s:div> <s:div id="r1_c3">R1C3</s:div> <s:div id="r2_c1">R2C1</s:div> <s:div id="r2_c2">R2C2</s:div> <s:div id="r2_c3">R2C3</s:div> <s:div id="r3_c1">R3C1</s:div> <s:div id="r3_c2">R3C2</s:div> <s:div id="r3_c3">R3C3</s:div> </h:panelGrid> </rich:panel> </ui:define> </ui:composition>