[EJB 3.0] - Embedded EJB3.0 and Web service problems
by thillerson
I've been using Embedded JBoss EJB3.0 for a while now, but pretty new, and I'm brand new to JBoss web services.
First of all, I can't tell, is it possible to access web services using Embedded JBoss? Do I need to have some extra JbossWS artifacts around as well?
In case I can, here's my problem. I used wstool to generate my stubs and mapping file. Here is my ejb-jar.xml:
<?xml version="1.0" encoding="UTF-8"?>
| <ejb-jar 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/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_3_0.xsd"
| xmlns:campaignComplete="http://api.campaigncomplete.com/WebApi"
| version="3.0"
| >
| <enterprise-beans>
| <session>
| <ejb-name>EmailCampaignServiceEJB</ejb-name>
| <local>com.jlhalsey.mcc.webservices.EmailCampaignService</local>
| <ejb-class>com.jlhalsey.mcc.webservices.EmailCampaignServiceBean</ejb-class>
| <service-ref>
| <service-ref-name>service/CampaignCompleteService</service-ref-name>
| <service-interface>com.campaigncomplete.api.webapi.NonHostedDataService</service-interface>
| <wsdl-file>META-INF/wsdl/NonHostedDataService.wsdl</wsdl-file>
| <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
| <service-qname>campaignComplete:NonHostedDataService</service-qname>
| <!--<mapped-name>service/CampaignCompleteService</mapped-name>
| --><injection-target>
| <injection-target-class>com.jlhalsey.mcc.webservices.EmailCampaignServiceBean</injection-target-class>
| <injection-target-name>nonHostedDataService</injection-target-name>
| </injection-target>
| <port-component-ref>
| <service-endpoint-interface>com.campaigncomplete.api.webapi.NonHostedDataServiceSoap</service-endpoint-interface>
| </port-component-ref>
| </service-ref>
| </session>
| </enterprise-beans>
| </ejb-jar>
And here is my session bean:
package com.jlhalsey.mcc.webservices;
|
| import javax.ejb.Local;
| import javax.ejb.Stateless;
|
| import com.campaigncomplete.api.webapi.HelloWorld;
| import com.campaigncomplete.api.webapi.HelloWorldResponse;
| import com.campaigncomplete.api.webapi.NonHostedDataService;
| import com.campaigncomplete.api.webapi.NonHostedDataServiceSoap;
|
| @Stateless(mappedName = "EmailCampaignServiceEJB")
| @Local(value={EmailCampaignService.class})
| public class EmailCampaignServiceBean implements EmailCampaignService {
|
| private NonHostedDataService nonHostedDataService;
|
| public String helloWorld() throws Exception {
| NonHostedDataServiceSoap port = (NonHostedDataServiceSoap) nonHostedDataService.getNonHostedDataServiceSoap();
|
| HelloWorldResponse respond = port.helloWorld(new HelloWorld());
| return respond.getHelloWorldResult();
| }
|
| public void setNonHostedDataService(NonHostedDataService service) {
| this.nonHostedDataService = service;
| }
|
| }
into which I'm trying to get a proxy of the service injected. It won't inject because it says that "service" is not bound.
Do I have a jndi problem? a configuration problem? Or am I doing something completely wrong?
Thank you,
Tony
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971780#3971780
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971780
19 years, 7 months
[JBoss AOP] - run aopc anttask error: ...was pruned
by peixubin
[aopc] java.lang.RuntimeException: defrost(): ydxt.ejb.session.FyglManagerBean$editFyd_N2215092476987652999 was pruned.
[aopc] at javassist.CtClassType.checkPruned(CtClassType.java:1284)
[aopc] at javassist.CtClassType.defrost(CtClassType.java:276)
[aopc] at org.jboss.aop.instrument.OptimizedInvocations.defrostClassIfExists(OptimizedInvocations.java:66)
[aopc] at org.jboss.aop.instrument.OptimizedInvocations.makeInvocationClass(OptimizedInvocations.java:96)
[aopc] at org.jboss.aop.instrument.OptimizedMethodInvocations.createOptimizedInvocationClass(OptimizedMethodInvocations.java:78)
[aopc] at org.jboss.aop.instrument.OptimizedMethodExecutionTransformer.transformMethod(OptimizedMethodExecutionTransformer.java:59)
[aopc] at org.jboss.aop.instrument.MethodExecutionTransformer.instrument(MethodExecutionTransformer.java:146)
[aopc] at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:657)
[aopc] at org.jboss.aop.AspectManager.translate(AspectManager.java:970)
[aopc] at org.jboss.aop.AspectManager.transform(AspectManager.java:882)
[aopc] at org.jboss.aop.standalone.Compiler.compileFile(Compiler.java:345)
[aopc] at org.jboss.aop.standalone.Compiler.compile(Compiler.java:234)
[aopc] at org.jboss.aop.standalone.Compiler.main(Compiler.java:90)
[aopc] [error] failed to transform: ydxt.ejb.session.FyglManagerBean.. Do verbose mode if you want full stack trace.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971778#3971778
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971778
19 years, 7 months
[EJB/JBoss] - Re: EntityManager merge and the seam-registration example.
by javidjamae
I know this is a late reply, but...
Section 3.7 of the hibernate docs tells you that if the id is null (transient object), then it will persist, but if the id is populated (detached object) then it will merge.
You have a transient object.
Do you have the app populating the register form with an existing employee, or are you just trying to type in the name of an existing user, hoping that it will update the info? I'm guessing you're trying to do the latter and that's why it isn't doing what you want.
You'll probably need to add a search screen that finds all the users, allows you to select one (using DataModel/DataModelSelection) then populates the form for you (by using @Out to outject the user). You'll also have to make sure that the search selection starts a conversation (@Begin) and the update feature ends the conversation (@End) because you are spanning multiple requests. Make sure the user object has conversation scope (the default for entity beans, so don't define the @Scope annotation).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971776#3971776
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971776
19 years, 7 months