[JBossWS] - org.jboss.ws.WSException: Cannot generate wsdl from interfac
by soni_rahul337
Hi,All
I have created the webservice that returns the user defined type. I have to use the jboss wstools for developing service. For that I have created the class that containts the getter and setter methods and the required interface and the and the class that implements the intreface with the logic. but now when I am returning the complex-type it will not allow me to generate the wsdl file and another artifacts neccesary for creating the service. The same webservice works fine for the String[] as a return parameter. I have read that wstools generate the response and request classes for the complex type but in my case it wont create. what to do in that case.
Here is the exception that i am getting while executing the wstools ant task:--
|
| [jbosswstools] org.jboss.ws.WSException: Cannot generate wsdl from: interface com.test.testdb.TestDataConnectionInterface
| [jbosswstools] at org.jboss.ws.tools.JavaToWSDL.generate(JavaToWSDL.java:348)
| [jbosswstools] at org.jboss.ws.tools.helpers.ToolsHelper.handleJavaToWSDLGeneration(ToolsHelper.java:122)
| [jbosswstools] at org.jboss.ws.tools.WSTools.process(WSTools.java:132)
| [jbosswstools] at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
| [jbosswstools] at org.jboss.ws.tools.ant.wstools.execute(wstools.java:103)
| [jbosswstools] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
| [jbosswstools] at org.apache.tools.ant.Task.perform(Task.java:364)
| [jbosswstools] at org.apache.tools.ant.Target.execute(Target.java:341)
| [jbosswstools] at org.apache.tools.ant.Target.performTasks(Target.java:369)
| [jbosswstools] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
| [jbosswstools] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
| [jbosswstools] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
| [jbosswstools] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
| [jbosswstools] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
| [jbosswstools] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
| [jbosswstools] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
|
|
My Environment is:--
Jboss 4.0.5 GA
Apache Ant 1.6.5
Jdk 1.5.0_11
Regards and Thanks in Advace,
Rahul
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156715#4156715
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156715
17 years, 10 months
[JBoss jBPM] - Anybody managed to integrate Spring with JBPM ?
by francis1970
Dear all,
I have a BPM application based on JBoss + JBPM 3.2. I'd like to know if it's possible to inject an Action Class to another Class using Spring.
Here's the case:
| <state name="TIMEOUT">
| <event type="node-enter">
| <action class="jbpm.action.ProcedureExecutor"/> </event>
| <transition name="" to="P_CONF_MAN"></transition>
| </state>
|
When ProcedureExecutor is fired, then I'd like to use Spring to decide which DAO class needs to be invoked
| public class ProcedureExecutor implements ActionHandler
| ......
| private String procedureName;
|
| public void execute(ExecutionContext arg0) throws Exception {
| this.procedureName = "MyProcedure";
|
| Resource res = new ClassPathResource("applicationContext.xml");
|
| BeanFactory factory = new XmlBeanFactory(res);
|
| // Here invoked DAO(ProcedureExecutor)
| BaseDAO bean1 = (BaseDAO)factory.getBean("BaseDAO");
|
|
| bean1.execute();
| }
|
I have configured my spring file so that an instance of ProcedureExecutor is passed to DAO
| <bean id="ProcedureExecutor"
| class="jbpm.action.ProcedureExecutor">
| </bean>
|
|
| <bean id="BaseDAO"
| class="jbpm.dao.BaseDAO">
| <constructor-arg><ref bean="ProcedureExecutor"/></constructor-arg>
|
| </bean>
|
The problem is that when an instance of ProcedureExecutor is passed to DAO, it's not passed the same instance of ProcedureExecutor I have in memory, so the property "procedureName" is null.
I guess the problem is that ProcedureExecutor was instantiated by the container and not by myself ?
Does anybody know if it's possible to use Spring to inject a JBPM Action class ?
Hope I was clear....
Thanks a lot
Francesco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156700#4156700
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156700
17 years, 10 months
Left-join read-ahead not used though defined
by Tamara Cattivelli
Hello everybody,
I have two cmp-ejbs A and B, that have a one-to-many CMR-relation.
Starting from an instance of A i want to pre-load the related B-objects.
I try to optimize this by adding <left-join> tags to jbosscmp-jdbc.xml.
I am using Oracle 9i and jboss-4.0.4.GA.
The left-join query is submitted on the JBOSS console but after that all
data is loaded as if I had not defined an eager-load-group-tag with
left-join for my finder.
I paste a shortened view of my EntityBeans:
/********************************************************************
* Offer Proposal Entity Bean.
*
* <p>This entity bean represents an offer proposal object in the
database.</p>
*
* @author cattitma
*
* @ejb.bean
* name = "OfferProposalEntityBean"
* display-name = "OfferProposalEntityBean"
* generate = "true"
* local-jndi-name = "local/OfferProposalEntityBean"
* view-type = "local"
* type = "CMP"
* transaction-type = "Container"
* reentrant = "false"
* cmp-version = "2.x"
* schema = "OfferProposalEntityBean"
* primkey-field = "iD"
* @ejb.interface
* local-pattern = "OfferProposalEntityBeanLocal"
* @ejb.home
* local-pattern = "OfferProposalEntityBeanLocalHome"
* @ejb.finder
* signature =
"de.mobilcom.offer.repository.proposal.OfferProposalEntityBeanLocal
findOfferProposalByContractIDAndOfferType(java.lang.String
domainShortcut, int contractNo, java.lang.Integer offerType)"
* query = "SELECT OBJECT(a) FROM OfferProposalEntityBean AS a
WHERE a.domain = ?1 AND a.contractNo = ?2 AND a.offerTypeEntity.iD = ?3"
* @jboss.query
* signature =
"de.mobilcom.offer.repository.proposal.OfferProposalEntityBeanLocal
findOfferProposalByContractIDAndOfferType(java.lang.String
domainShortcut, int contractNo, java.lang.Integer offerType)"
* @ejb.util
* generate = "false"
*
* @jboss.persistence
* datasource = "java:/OfferInformation"
* datasource-mapping = "Oracle9i"
* table-name = "OFFER_PROPOSAL"
* @jboss.clustered
* cluster = "false"
* @jboss.read-only
* read-only = "true"
*
*/
public abstract class OfferProposalEntityBean implements EntityBean {
//~ Static fields/initializers
------------------------------------------------------------------------
---------------------
/** Serial version UID. */
private static final long serialVersionUID = 1L;
/***************************************
* Returns offer proposal id.
*
* @return Returns offer proposal id.
*
* @ejb.persistence
* @ejb.transaction
* type = "Required"
* @ejb.interface-method
* view-type = "local"
*
* @jboss.column-name
* name = "ID"
*/
public abstract Integer getID();
/***************************************
* Sets offer proposal id
*
* @param rID the id of the offer proposal object
*
* @ejb.pk-field
* @ejb.persistence
* @ejb.transaction
* type = "Required"
*/
public abstract void setID(Integer rID);
/***************************************
* Gets the offer type object of an offer proposal object.
*
* @return the offer type object of an offer proposal object
*
* @ejb.transaction
* type = "Required"
* @ejb.interface-method
* view-type = "local"
* @ejb.relation
* name = "OfferProposalOfferTypeRelation"
* role-name = "OfferProposal-has-OfferType"
* target-ejb = "OfferTypeEntityBean"
* target-role-name = "OfferType-belongs-to-OfferProposal"
* target-multiple = "no"
* @jboss.relation
* fk-column = "OFFER_TYPE_ID"
* related-pk-field = "iD"
*
*/
public abstract OfferTypeEntityBeanLocal getOfferTypeEntity();
/***************************************
* Sets the offer type object of an offer proposal object.
*
* @param rOfferTypeEntity the offer type object of an offer
proposal object
*
* @ejb.persistence
* @ejb.transaction
* type = "Required"
*/
public abstract void setOfferTypeEntity(OfferTypeEntityBeanLocal
rOfferTypeEntity);
}
and I defined a load group for the finder within tag for entity bean:
<query>
<query-method>
<method-name>findOfferProposalByContractIDAndOfferType</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>int</method-param>
<method-param>java.lang.Integer</method-param>
</method-params>
</query-method>
<jboss-ql><![CDATA[SELECT OBJECT(a) FROM
OfferProposalEntityBean AS a WHERE a.domain = ?1 AND a.contractNo = ?2
AND a.offerTypeEntity.iD = ? 3]]></jboss-ql>
<read-ahead>
<strategy>on-find</strategy>
<eager-load-group>*</eager-load-group>
<left-join cmr-field="offerTypeEntity"
eager-load-group="*"/>
</read-ahead>
</query>
OfferTypeEntity itself is:
/********************************************************************
* Offer Type Entity Bean.
*
* <p>This entity bean represents an offer type object in the
database.</p>
*
* @author cattitma
*
* @ejb.bean
* name = "OfferTypeEntityBean"
* display-name = "OfferTypeEntityBean"
* generate = "true"
* local-jndi-name = "local/OfferTypeEntityBean"
* view-type = "local"
* type = "CMP"
* transaction-type = "Container"
* reentrant = "false"
* cmp-version = "2.x"
* schema = "OfferTypeEntityBean"
* primkey-field = "iD"
* @ejb.interface
* local-pattern = "OfferTypeEntityBeanLocal"
* @ejb.home
* local-pattern = "OfferTypeEntityBeanLocalHome"
* @ejb.finder
* signature = "java.lang.Integer findIDByShortcut(java.lang.String
shortcut)"
* query = "SELECT OBJECT(a) FROM OfferTypeEntityBean AS a WHERE
a.shortcut = ?1"
* @ejb.util
* generate = "false"
* @jboss.persistence
* datasource = "java:/OfferInformation"
* datasource-mapping = "Oracle9i"
* table-name = "OFFER_TYPE"
* @jboss.clustered
* cluster = "false"
* @jboss.read-only
* read-only = "true"
*/
public abstract class OfferTypeEntityBean implements EntityBean {
//~ Static fields/initializers
------------------------------------------------------------------------
---------------------
/** Serial version UID. */
private static final long serialVersionUID = 1L;
/***************************************
* Returns offer type id.
*
* @return Returns offer type id.
*
* @ejb.persistence
* @ejb.transaction
* type = "Required"
* @ejb.interface-method
* view-type = "local"
*
* @jboss.column-name
* name = "ID"
*/
public abstract Integer getID();
/***************************************
* Sets offer type id
*
* @param rID the id of the offer type object
*
* @ejb.pk-field
* @ejb.persistence
* @ejb.transaction
* type = "Required"
*/
public abstract void setID(Integer rID);
/***************************************
* Sets the shortcut for the offer type id.
* @param offerTypeShortcut shortcut for the offer type id
*
* @ejb.persistence
* @ejb.transaction
* type = "Required"
*/
public abstract void setShortcut(String offerTypeShortcut);
/***************************************
* Gets the shortcut for the offer type id.
* @return shortcut of the offer type id
*
* @ejb.persistence
* @ejb.transaction
* type = "Required"
* @ejb.interface-method
* view-type = "local"
*
* @jboss.column-name
* name = "SHORTCUT"
*/
public abstract String getShortcut();
}
In the ServiceBean I resolve the shortcut to an ID by using
findIDByShortcut.
Then I put the ID to the finder of the OfferProposalEntityBean.
OfferProposalEntityBean in the database table OFFER_PROPOSAL has the
fields
ID
...
OFFER_TYPE_ID
and OfferTypeEntityBean has the database fields:
OFFER_TYPE
ID
SHORTCUT
Can anybody help please?
Greetz, Tamara
17 years, 10 months