[JBossWS] - Help on running jbossws sample
by brian069
Hi,
I am new to jboss. When I tried to run the test case shipped with jbossws, I got the following error. Any idea what was happening.
The test method (public void testTrivialAccess() throws Exception) is in the
TrivialServiceRpcTestCase, but the testcase report says the operation name is unknown.
Your help is greatly appreciated.
brian
=====output from running ant=========
ant -Dtest=org.jboss.test.ws.samples.rpcstyle.TrivialServiceRpcTestCase one-test
Buildfile: build.xml
init:
[echo] jboss.home = D:/Program Files/jboss-4.0.4.GA
[echo] tomcat.home = C:/jakarta-tomcat-5.0.19
[echo] java.home = c:\j2sdk1.4.2_04\jre
[echo] node0 = xxxxx
one-test:
[junit] Running org.jboss.test.ws.samples.rpcstyle.TrivialServiceRpcTestCase
[junit] java.lang.IllegalStateException: Unsupported target server
[junit] at org.jboss.test.ws.JBossWSTestHelper.getDeployer(JBossWSTestHe
lper.java:91)
[junit] at org.jboss.test.ws.JBossWSTestHelper.deploy(JBossWSTestHelper.
java:45)
[junit] at org.jboss.test.ws.JBossWSTestSetup.setUp(JBossWSTestSetup.jav
a:70)
[junit] at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
[junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] at junit.extensions.TestSetup.run(TestSetup.java:25)
[junit] Tests run: 0, Failures: 0, Errors: 1, Time elapsed: 0.032 sec
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
run(JUnitTestRunner.java:297)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
launch(JUnitTestRunner.java:672)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
main(JUnitTestRunner.java:567)
[junit] Test org.jboss.test.ws.samples.rpcstyle.TrivialServiceRpcTestCase FA
ILED
[junitreport] Transform time: 6156ms
========testcase report==========
java.lang.IllegalStateException: Unsupported target server
at org.jboss.test.ws.JBossWSTestHelper.getDeployer(JBossWSTestHelper.java:91)
at org.jboss.test.ws.JBossWSTestHelper.undeploy(JBossWSTestHelper.java:53)
at org.jboss.test.ws.JBossWSTestSetup.setUp(JBossWSTestSetup.java:75)
at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
at junit.extensions.TestSetup.run(TestSetup.java:25)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975295#3975295
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975295
18 years, 1 month
[JBoss Seam] - DataModelSelection and Outjection confusion
by segue.guy
I know I'm making some obvious mistake below, and it's driving me to distraction....
I have a page which displays a list and allows selection to go to a detailed view of the selected item:
| @Stateful
| @Scope(SESSION)
| @Name("dataSourceList")
| @LoggedIn
| public class DataSourceListAction implements DataSourceList, Serializable
| {
| ...
|
| @DataModel
| private List<DataSource> dataSources;
| @DataModelSelection
| @In(required=false)
| @Out(scope=SESSION, required=false)
| private DataSource dataSource;
|
| @Factory
| @Observer("createDataSourceConfirmed")
| public void getDataSources()
| {
| dataSources = em.createQuery("from DataSource s where s.user.username = :username")
| .setParameter("username", user.getUsername())
| .getResultList();
| }
|
| public String selectDataSource()
| {
| log.info("get datasource: #0 for #{user.username}", dataSource.getId());
| dataSource = em.find(DataSource.class, dataSource.getId());
| log.info("got datasource: #0 for #{user.username}", dataSource.getName());
| events.raiseEvent("selectDataSource");
| return "datasource";
| }
|
| public void delete()
| {
| dataSources.remove(dataSource);
| em.remove(dataSource);
| dataSource=null;
| }
|
| @Destroy @Remove
| public void destroy() {}
|
| }
|
I want the selection outjected to drive a detailed view page, which among other things displays an attribute which is a list of objects using a @DataModel and dataTable. The backing code looks like:
| @Stateful
| @Scope(SESSION)
| @Name("dataSourceView")
| @LoggedIn
| public class DataSourceViewAction implements DataSourceView, Serializable
| {
| ...
|
| @In(scope=SESSION, required=true)
| private DataSource dataSource;
|
| @DataModelSelection(value="dataFields")
| @Out(scope=SESSION, required=false)
| private DataField dataField;
|
| @DataModel(value="dataFields")
| @Observer("selectDataSource")
| public List<DataField> getDataFields()
| {
| log.info("in new getDataFields for #0", dataSource == null ? "null" : dataSource.getName());
| return dataSource.getDataFields();
| }
|
| public String selectDataField()
| {
| log.info("get dataField: #0", dataField.getName());
| return "dataviewer";
| }
|
| @Destroy @Remove
| public void destroy() {}
|
| }
|
I'm confused over the behavior. I create two items in the list in other code. When I select the first item in the list, it shows the simple attributes of the first item, but the list attribute contains the values from the second, most recently created item. Similarly if I subsequently select the second item from the list, it shows the simple attributes from the second item, but the list attrbute from the first. If I select the second item again, everything looks fine. The debugging statements in the observer do show that the dataSource object I expect to be selected is the previously outjected one.
I'm missing something clear and simple in the lifecycle here - anyone have any advice?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975290#3975290
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975290
18 years, 1 month
[JBossWS] - EJB3.0 as webservices/ error in geneerating wsdl
by MmarcoM
hi all,
i am trying to generate a wsdl file for my Stateless SessioinBean that i want to expose as a webservice.
here's bean code
| @WebService (name="EndpointInterface",
| targetNamespace="http://org.jboss.ws/samples/jsr181ejb",
| serviceName="TestFacade")
|
| @Stateless
| @Remote ( {WSFacade.class})
| @RemoteBinding( jndiBinding="/ejb3/WSFacade")
|
| public class TestFacade implements WSFacade{
| ...
|
whenever i run wstools ant task, i got back following exception
| org.jboss.ws.WSException: A service endpoint interface should extend Remote
| at org.jboss.ws.tools.metadata.ToolsUnifiedMetaDataBuilder.buildMetaDa
| (ToolsUnifiedMetaDataBuilder.java:82)
| at org.jboss.ws.tools.metadata.ToolsUnifiedMetaDataBuilder.<init>(Tool
| nifiedMetaDataBuilder.java:69)
| at org.jboss.ws.tools.JavaToWSDL.generate(JavaToWSDL.java:298)
| at org.jboss.ws.tools.helpers.ToolsHelper.handleJavaToWSDLGeneration(T
| lsHelper.java:122)
| at org.jboss.ws.tools.WSTools.process(WSTools.java:132)
| at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
| at org.jboss.ws.tools.ant.wstools.execute(wstools.java:103)
| at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275
| at org.apache.tools.ant.Task.perform(Task.java:364)
| at org.apache.tools.ant.Target.execute(Target.java:341)
| at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(Abstrac
| ntMojo.java:99)
| at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:8
|
| at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlu
| nManager.java:412)
| at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(De
| ultLifecycleExecutor.java:534)
| at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWith
|
and here is my wstools-config.xml
| <configuration xmlns="http://www.jboss.org/jbossws-tools">
| <java-wsdl>
| <service name="TestFacade" style="rpc" endpoint="com.mm.j2me.ejb.TestFacade"/>
| <namespaces target-namespace="http://org.jboss.ws/samples/jsr181ejb"
| type-namespace="http://org.jboss.ws/samples/jsr181ejb"/>
| <mapping file="jaxrpc-mapping.xml"/>
| <webservices ejb-link="TestFacade"/>
| </java-wsdl>
|
| </configuration>
|
but if my ejb has already the @Remote annotation, why am i getting this?
thanks in advance and regards
marco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975289#3975289
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975289
18 years, 1 month