[JBoss Tools (users)] - jbossws eclipse plugin wstools error
by kdrrdgn
Hi,
When i try to create a web service via jbossws plugin i am getting an error like this,
Running JBossWS wstools for [jbossws-test1]
directory: /home/kadir/workspace/jbossws-test1
command: sh -c .//home/kadir/Desktop/jboss-4.2.1.GA/bin/wstools.sh -cp bin -config /tmp/wstools-config45367.xml -dest /home/kadir/workspace/jbossws-test1/src/java
-cp: 1: .//home/kadir/Desktop/jboss-4.2.1.GA/bin/wstools.sh: not found
I am using debian linux. In fact i know the reason of the error. it is the "sh -c ./" part at the begining of the command. It causes two problems. First of all because of "./" my absolute path becomes relative. And second because of "-c" extra parameters for wstools.sh is not passing to real executable.
Is anyone knows how to fix this problem?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078143#4078143
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078143
18Â years, 8Â months
[Beginners Corner] - EJB + JNDI BINDING = A MESS
by 2lopez
I to all.
I'm developing a EJB3 + Struts app on jboss 4.2. It's very important to me, my final project at the university. I have a problem binding the stateless GestionBitacora. Simply I can't!
My code:
GestionBitacora.java
package stateless.bitacora;
|
| import java.sql.Timestamp;
| import java.util.Calendar;
|
| import javax.ejb.Stateless;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
|
| import entidades.Bitacora;
|
| @Stateless
| //@EJB(name="ejb/GestionBitacora",beanName="GestionBitacora",beanInterface=GestionEntrada.class)
| public class GestionBitacoraBean implements GestionBitacora {
| @PersistenceContext(unitName="MySqlDS") private EntityManager miEntityManager;
|
| public void log(String _msg) {
| Bitacora b = new Bitacora();
| b.setMsg(_msg);
| b.setTiempo(new Timestamp(Calendar.getInstance().getTimeInMillis()));
| miEntityManager.persist(b);
| }
|
| }
The remote interface:
package stateless.bitacora;
|
| import javax.ejb.Remote;
|
| @Remote
| public interface GestionBitacora {
|
| public void log(String _msg);
| }
The ejb-jar.xml:
<?xml version="1.0" encoding="UTF-8"?>
| <ejb-jar version="3.0" 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/ejb-jar_3_0.xsd">
| <enterprise-beans>
|
| <!-- MORE STATELESS EJBs, BUT PROPERLY BOUND -->
|
| <session>
| <ejb-name>GestionBitacora</ejb-name>
| <ejb-ref>
| <ejb-ref-name>ejb/GestionBitacora</ejb-ref-name>
| <ejb-ref-type>Session</ejb-ref-type>
| <remote>stateless.bitacora</remote>
| <ejb-link>GestionBitacora</ejb-link>
| <injection-target>
| <injection-target-class>stateless.bitacora.GestionBitacora</injection-target-class>
| <injection-target-name>gestionBitacora</injection-target-name>
| </injection-target>
| </ejb-ref>
| </session>
| </enterprise-beans>
| </ejb-jar>
I'm completely lost!!! The other Stateless EJB are perfectly deployed and ready to use, but this GestionUsuario isn't, according to the JNDIView... I've been investigating for hours, but found nothing.
Anybody could help me? Thanks in advance, it would be much appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078142#4078142
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078142
18Â years, 8Â months
[JBossWS] - Two webservice classes define method with same name (bug?)
by gbdt
Hi,
I have a test case in which I get wrong WSDLs:
(Both classes are in the same package)
File1:
| package com.XXXX;
|
| import javax.ejb.Stateless;
| import javax.jws.WebMethod;
| import javax.jws.WebParam;
| import javax.jws.WebService;
|
| @WebService
| @Stateless
| public class TestClass1 {
|
| @WebMethod
| public ****Integer**** method(@WebParam(name="f")Float f) {
| return null;
| }
| }
|
File2:
| package com.XXXX;
|
| import javax.ejb.Stateless;
| import javax.jws.WebMethod;
| import javax.jws.WebParam;
| import javax.jws.WebService;
|
| @WebService
| @Stateless
| public class TestClass2 {
|
| @WebMethod
| public ****Double**** method(@WebParam(name="f")Float f) {
| return 17.0;
| }
| }
|
The problem is that for both services the WSDL definition of the return type is xs:int, while for the second class it should be a double.
For TestClass1:
| <types>
| <xs:schema targetNamespace="http://XXXX.com/" version="1.0" xmlns:tns="http://XXXX.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
| <xs:element name="method" type="tns:method" />
| <xs:element name="methodResponse" type="tns:methodResponse" />
| <xs:complexType name="method">
| <xs:sequence>
| <xs:element minOccurs="0" name="f" type="xs:float" />
| </xs:sequence>
| </xs:complexType>
| <xs:complexType name="methodResponse">
| <xs:sequence>
| <xs:element minOccurs="0" name="return" type="****xs:int****" />
| </xs:sequence>
| </xs:complexType>
| </xs:schema>
| </types>
|
And for TestClass2:
| ...
| <types>
| <xs:schema targetNamespace="http://XXXX.com/" version="1.0" xmlns:tns="http://XXXX.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
| <xs:element name="method" type="tns:method" />
| <xs:element name="methodResponse" type="tns:methodResponse" />
| <xs:complexType name="method">
| <xs:sequence>
| <xs:element minOccurs="0" name="f" type="xs:float" />
| </xs:sequence>
| </xs:complexType>
| <xs:complexType name="methodResponse">
| <xs:sequence>
| <xs:element minOccurs="0" name="return" type="****xs:int****" />
| </xs:sequence>
| </xs:complexType>
| </xs:schema>
| </types>
| ...
|
The second method definition, for a totally different service has an incorrect return type.
Is is a bug or some kind of error on my side?
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078139#4078139
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078139
18Â years, 8Â months