[JBossWS] - Re: Generate wsdl from JSR 181 POJO
by monowai
I assume by the deafening silence on this, that this is either a really stupid question, or we're the only suckers doing this ¯\(°_o)/¯
Here's how it works for me. Create a file called wstools-java-to-wsdl.xml based upon wstools-config.xml but have it include the <java-wsdl> tags. Here is an example based on the 181ejb example:
<java-wsdl>
|
| <service name="TestService" style="rpc"
| endpoint="org.jboss.test.ws.jaxws.samples.jsr181ejb.EndpointInterface"/>
|
| <namespaces target-namespace="http://org.jboss.ws/samples/jsr181ejb"
| type-namespace="http://org.jboss.ws/samples/jsr181ejb/types"/>
|
| <mapping file="jaxrpc-mapping.xml"/>
| <webservices servlet-link="TrivialEndpoint"/>
| </java-wsdl>
Then, run the wstools with the following arguments:
-cp [FULL_PATH_TO_CLASS_FILE] -config ./resources/wstools-config.xml -dest ./resources/META-INF
My paths are relative to the folder jbossws-samples-1.0.4.GA\jaxws\jsr181ejb folder.
When run, it will create the META-INF/wsdl/TestServices.wsdl file.
It seems that wstools is not selective in what it creates. If you specify <java-wsdl> in your main wstools-config file, and you run the JBOSS sample ANT build files, then the WSDL will be recreated each time, overwriting your <soap:address location=.../> tag, which is not what you probably want to happen. I haven't looked in to how this works yet.
Likewise if the .wsdl file doesn't exist, then when you run your java2wsdl command, it will error complaining that it "can't load wsdl file" if your config contains the <wsdl-java> tags; Bit of a circular refrence going on there!
hth
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017334#4017334
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017334
19Â years, 2Â months
[EJB 3.0] - Generics and Composite Keys
by jimk1723
I have a situation where a set of entities share a similar composite key class; rather than create a new PK class for each entity, I wanted to genericise the PK.
Here's my generic PK class:
| @Embeddable
| public class LanguagePK<T> implements Serializable {
|
| private T describes;
|
| private String code;
|
| @Column(name = "LANG_CODE")
| public String getCode() {
| return this.code;
| }
|
| public void setCode(String code) {
| this.code = code;
| }
|
| public T getDescribes() {
| return this.describes;
| }
|
| public void setDescribes(T described) {
| this.describes = described;
| }
| }
|
...and here's a sample entity that embeds it (Foo is another entity)
| @Entity
| @Table(name = "FOO_LANG")
| public class FooLanguage implements Serializable{
| LanguagePK<Foo> pk;
|
| @EmbeddedId()
| @AttributeOverrides( { @AttributeOverride(name = "describes", column = @Column(name = "FOO_ID")) })
| public LanguagePK<Foo> getPk() {
|
| if (pk == null) {
| pk = new LanguagePK<Foo>();
| }
|
| return pk;
| }
|
| public void setPk(LanguagePK<Foo> pk) {
| this.pk = pk;
| }
|
| @Transient
| public Foo getFoo() {
| return getPk().getDescribes();
| }
|
| public void setFoo(Foo e) {
| getPk().setDescribes(e);
| }
|
| @Transient
| public String getCode() {
| return getPk().getCode();
| }
|
| public void setCode(String code) {
| getPk().setCode(code);
| }
| }
|
I'm getting the "Property X has an unbound type and no explicit target entity" exception when I try to use it.
| [testng] javax.persistence.PersistenceException: java.lang.IllegalStateException: Property describes has an unbound type and no explicit target entity.
| [testng] at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:217)
| [testng] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114)
| [testng] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37)
| [testng] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27)
|
I've poked around, but I haven't found any example code on how to do something like this. Am I'm trying to do something I shouldn't?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017317#4017317
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017317
19Â years, 2Â months
[Tomcat, HTTPD, Servlets & JSP] - JSF RI libraries in WEB-INF/lib not recognized?
by mhassel
In both my JBoss 4.0.3 and 4.0.5 installations I have to switch from MyFaces to Suns-RI
If I just replace the libraries in JSF-LIBS with SUN's libs, everything deploys fine! For various reasons, i have to package the libs within my jar file.
So I erase JBoss' JSF_LIBS folder and package all those jars into the WEB-INF/LIB folder of my war file.
When deploying, I get the error below. I checked, the jsf-jar containing phase-listener is in my WEB-INF folder. I also removed all the work and tmp folders after erasing my jsf-libs and before starting the server.
Any help is appreciated....
| 2007-02-15 15:28:08,194 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/poremoteweb]] Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
| java.lang.NoClassDefFoundError: javax/faces/event/PhaseListener
| at java.lang.ClassLoader.defineClass1(Native Method)
| at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
| at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
| at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
| at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
| at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:633)
| at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:613)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:162)
| at org.jboss.mx.loading.UnifiedLoaderRepository3.loadClassFromClassLoader(UnifiedLoaderRepository3.java:263)
| at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:175)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:475)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:377)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
| at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:594)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
| at com.sun.faces.util.Util.loadClass(Util.java:406)
| at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:710)
| at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:398)
| at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:328)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
| at org.apache.catalina.core.StandardContext.init(StandardContext.java:5005)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
| at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:280)
| at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:88)
| at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:357)
| at org.jboss.web.WebModule.startModule(WebModule.java:68)
| at org.jboss.web.WebModule.startService(WebModule.java:46)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017306#4017306
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017306
19Â years, 2Â months
[EJB 3.0] - Re: Can I use @Ejb in an MBean?
by khkachn
I tried adding @Depends ("jboss.ejb3:service=EJB3Deployer") to the
class and jboss.ejb3:service=EJB3Deployer
to the jboss-service.xml, but my ejb is still null.
2007-02-15 18:30:45,342 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.ejb3:service=EJB3Deployer dependent components: [ObjectName: ken:service=ContentClient
State: CREATED
I Depend On:
jboss.ejb3:service=EJB3Deployer
, ObjectName: jboss.ws:service=DeployerInterceptorEJB3
State: CREATED
I Depend On:
jboss.ejb3:service=EJB3Deployer
]
2007-02-15 18:30:45,342 DEBUG [org.jboss.system.ServiceController] starting service ken:service=ContentClient
2007-02-15 18:30:45,342 DEBUG [wsclient.ContentClient] Starting ken:service=ContentClient
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017305#4017305
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017305
19Â years, 2Â months
[JBossWS] - SOAP request exception java.lang.NoClassDefFoundError
by liudan2005
I keep getting this when trying to run a very simple demo code:
| ERROR [org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper] SOAP request exception
|
| java.lang.NoClassDefFoundError
|
| at org.jboss.ws.jaxrpc.encoding.SimpleDeserializer.deserialize(SimpleDeserializer.java:52)
|
| at org.jboss.ws.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:235)
|
| at org.jboss.ws.binding.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:233)
|
| at org.jboss.ws.binding.EndpointInvocation.getRequestParamValue(EndpointInvocation.java:103)
|
| at org.jboss.ws.binding.EndpointInvocation.getRequestPayload(EndpointInvocation.java:117)
|
| at org.jboss.ws.integration.jboss.ServiceEndpointInvokerEJB3.invokeServiceEndpoint(ServiceEndpointInvokerEJB3.java:115)
|
| at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:115)
|
| at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
|
| at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
|
| at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
|
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
|
| at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
|
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
|
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
|
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
|
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
|
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
|
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
|
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
|
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
|
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
|
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
|
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
|
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
|
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
|
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
|
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
|
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
|
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
|
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
|
| at java.lang.Thread.run(Thread.java:595)
|
|
any idea?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017303#4017303
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017303
19Â years, 2Â months