[JBoss Seam] - Re: Ajax and Pageflow very slow
by pietermartin
While I'm at it might as well mention another bug/feature I have encoutered. When an exception is thrown from a method called by an expresion in the page-definition, then it swallowed by the SeamExpression in its
| return new Expression()
| {
| private MethodExpression me;
| private ValueExpression ve;
|
| private void initMethodExpression()
| {
| me = EL.EXPRESSION_FACTORY.createMethodExpression(EL.EL_CONTEXT, expression, returnType, new Class[0]);
| }
|
| private void initValueExpression()
| {
| ve = EL.EXPRESSION_FACTORY.createValueExpression(EL.EL_CONTEXT, expression, returnType);
| }
|
| @Override
| public Object evaluate(VariableResolver resolver) throws ELException
| {
| try {
| try {
| if (me==null && ve==null)
| {
| initMethodExpression();
| }
| if (me!=null && ve==null)
| {
| return me.invoke(createELContext(resolver, mapper), new Object[0]);
| }
| }
| catch (javax.el.ELException e)
| {
| if (ve==null)
| {
| initValueExpression();
| }
| if (ve!=null)
| {
| return ve.getValue(createELContext(resolver, mapper));
| }
| }
| throw new ELException();
| }
| catch (javax.el.ELException e)
| {
| throw new ELException(e);
| }
| }
| };
|
I then catch a JbpmException but there is no access to the original exception anymore.
I am also not sure whether an exception element in pages.xml is suppose to work during a page flow. I can not get it to work and am forced to put decision nodes for every action I call from the page flow.
Any help appreciated.
Pieter
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108568#4108568
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108568
18 years, 5 months
[JBossWS] - Soap service returning complex objects(Such as hashmaps) inc
by mwkohout
Hello All.
I've got a soap service(which is also a seam component) with a method that returns a hashmap. Through debugging I know that my method is returning a valid set of java objects but from client code( Ruby and Java) all I'm getting is a null value. Other methods that return simple strings or return an array of Longs work perfectly.
as far as my platform I'm running on jboss 4.2.1GA with Seam 2.0.0GA.
here's the relevant server code. The first method is one that works incorrectly and the bottom two work:
| @WebService()
| @SOAPBinding(
| parameterStyle=SOAPBinding.ParameterStyle.BARE, style=SOAPBinding.Style.RPC)
| //@SOAPBinding(style = SOAPBinding.Style.RPC)
| @Name("StudyServiceWS")
| @Scope(value=ScopeType.STATELESS)
| @Stateless
| public class StudyService implements StudyServiceRemote{
|
| //this is a test method that currently returns a null to the client
| @WebMethod
| public HashMap getHashMap( String key, String value)
| {
| HashMap m = new HashMap();
| m.put( key, value);
| return m;
| }
| //this method works
| @WebMethod()
| public String echo( @WebParam(name = "echo")String echo)
| {
| return echo;
| }
| //this also works
| @WebMethod
| public Long[] getStudyIDs( String x500)
| {
| Long[] returnIDs = null;
| UserHome userHome = (UserHome)Component.getInstance(
| UserHome.class, true);
| User user = userHome.findByInternetID(x500);
|
| ......
|
| return returnIDs;
| }
|
|
generated wsdl:
| <definitions name='StudyServiceService' targetNamespace='http://webService.core.ictr.umn.edu/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://jaxb.dev.java.net/array' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://webService.core.ictr.umn.edu/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
| <types>
| <xs:schema targetNamespace='http://webService.core.ictr.umn.edu/' version='1.0' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
| <xs:complexType name='hashMap'>
| <xs:complexContent>
| <xs:extension base='ns1:abstractMap' xmlns:ns1='http://webService.core.ictr.umn.edu/'>
| <xs:sequence/>
| </xs:extension>
| </xs:complexContent>
|
| </xs:complexType>
| <xs:complexType abstract='true' name='abstractMap'/>
| <xs:complexType name='arrayList'>
| <xs:complexContent>
| <xs:extension base='ns2:abstractList' xmlns:ns2='http://webService.core.ictr.umn.edu/'>
| <xs:sequence/>
| </xs:extension>
| </xs:complexContent>
| </xs:complexType>
|
| <xs:complexType abstract='true' name='abstractList'>
| <xs:complexContent>
| <xs:extension base='ns3:abstractCollection' xmlns:ns3='http://webService.core.ictr.umn.edu/'>
| <xs:sequence/>
| </xs:extension>
| </xs:complexContent>
| </xs:complexType>
| <xs:complexType abstract='true' name='abstractCollection'/>
| </xs:schema>
|
| <xs:schema targetNamespace='http://jaxb.dev.java.net/array' version='1.0' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
| <xs:complexType final='#all' name='longArray'>
| <xs:sequence>
| <xs:element maxOccurs='unbounded' minOccurs='0' name='item' nillable='true' type='xs:long'/>
| </xs:sequence>
| </xs:complexType>
| </xs:schema>
| </types>
| <message name='StudyService_getHashMap'>
|
| <part name='arg0' type='xsd:string'></part>
| <part name='arg1' type='xsd:string'></part>
| </message>
| <message name='StudyService_getStudyIDs'>
| <part name='arg0' type='xsd:string'></part>
| </message>
| <message name='StudyService_getSubjects'>
| <part name='arg0' type='xsd:long'></part>
| </message>
|
| <message name='StudyService_getSubjectsResponse'>
| <part name='return' type='tns:arrayList'></part>
| </message>
| <message name='StudyService_getStudies'>
| <part name='x500' type='xsd:string'></part>
| </message>
| <message name='StudyService_getStudy'>
| <part name='arg0' type='xsd:string'></part>
| <part name='arg1' type='xsd:long'></part>
|
| </message>
| <message name='StudyService_echo'>
| <part name='echo' type='xsd:string'></part>
| </message>
| <message name='StudyService_getStudyResponse'>
| <part name='return' type='tns:hashMap'></part>
| </message>
| <message name='StudyService_getStudyIDsResponse'>
| <part name='return' type='ns1:longArray'></part>
|
| </message>
| <message name='StudyService_getSubjectsStringOperation'>
| <part name='arg0' type='xsd:string'></part>
| </message>
| <message name='StudyService_getStudiesResponse'>
| <part name='return' type='tns:hashMap'></part>
| </message>
| <message name='StudyService_getSubjectsStringOperationResponse'>
| <part name='return' type='tns:arrayList'></part>
|
| </message>
| <message name='StudyService_echoResponse'>
| <part name='return' type='xsd:string'></part>
| </message>
| <message name='StudyService_getHashMapResponse'>
| <part name='return' type='tns:hashMap'></part>
| </message>
| <portType name='StudyService'>
| <operation name='echo' parameterOrder='echo'>
|
| <input message='tns:StudyService_echo'></input>
| <output message='tns:StudyService_echoResponse'></output>
| </operation>
| <operation name='getHashMap' parameterOrder='arg0 arg1'>
| <input message='tns:StudyService_getHashMap'></input>
| <output message='tns:StudyService_getHashMapResponse'></output>
| </operation>
| <operation name='getStudies' parameterOrder='x500'>
| <input message='tns:StudyService_getStudies'></input>
|
| <output message='tns:StudyService_getStudiesResponse'></output>
| </operation>
| <operation name='getStudy' parameterOrder='arg0 arg1'>
| <input message='tns:StudyService_getStudy'></input>
| <output message='tns:StudyService_getStudyResponse'></output>
| </operation>
| <operation name='getStudyIDs' parameterOrder='arg0'>
| <input message='tns:StudyService_getStudyIDs'></input>
| <output message='tns:StudyService_getStudyIDsResponse'></output>
|
| </operation>
| <operation name='getSubjects' parameterOrder='arg0'>
| <input message='tns:StudyService_getSubjects'></input>
| <output message='tns:StudyService_getSubjectsResponse'></output>
| </operation>
| <operation name='getSubjectsStringOperation' parameterOrder='arg0'>
| <input message='tns:StudyService_getSubjectsStringOperation'></input>
| <output message='tns:StudyService_getSubjectsStringOperationResponse'></output>
| </operation>
|
| </portType>
| <binding name='StudyServiceBinding' type='tns:StudyService'>
| <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
| <operation name='echo'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://webService.core.ictr.umn.edu/' use='literal'/>
| </input>
| <output>
|
| <soap:body namespace='http://webService.core.ictr.umn.edu/' use='literal'/>
| </output>
| </operation>
| <operation name='getHashMap'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://webService.core.ictr.umn.edu/' use='literal'/>
| </input>
| <output>
|
| <soap:body namespace='http://webService.core.ictr.umn.edu/' use='literal'/>
| </output>
| </operation>
| <operation name='getStudies'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://webService.core.ictr.umn.edu/' use='literal'/>
| </input>
| <output>
|
| <soap:body namespace='http://webService.core.ictr.umn.edu/' use='literal'/>
| </output>
| </operation>
| <operation name='getStudy'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://webService.core.ictr.umn.edu/' use='literal'/>
| </input>
| <output>
|
| <soap:body namespace='http://webService.core.ictr.umn.edu/' use='literal'/>
| </output>
| </operation>
| <operation name='getStudyIDs'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://webService.core.ictr.umn.edu/' use='literal'/>
| </input>
| <output>
|
| <soap:body namespace='http://webService.core.ictr.umn.edu/' use='literal'/>
| </output>
| </operation>
| <operation name='getSubjects'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://webService.core.ictr.umn.edu/' use='literal'/>
| </input>
| <output>
|
| <soap:body namespace='http://webService.core.ictr.umn.edu/' use='literal'/>
| </output>
| </operation>
| <operation name='getSubjectsStringOperation'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://webService.core.ictr.umn.edu/' use='literal'/>
| </input>
| <output>
|
| <soap:body namespace='http://webService.core.ictr.umn.edu/' use='literal'/>
| </output>
| </operation>
| </binding>
| <service name='StudyServiceService'>
| <port binding='tns:StudyServiceBinding' name='StudyServicePort'>
| <soap:address location='http://127.0.0.1:8080/StudyServiceService/StudyService'/>
| </port>
| </service>
|
| </definitions>
|
Any ideas? Any suggestion or 4 letter word would be welcome.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108561#4108561
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108561
18 years, 5 months
[JBoss Seam] - Re: Problems with links in pageflow pages based on templates
by chawax
Thanks for your response.
Well, there is no exception, but nothing happens when I click on the link (same behaviour as a null return from a backing bean) and I have this message in the server log :
sourceId=null[severity=(WARN 1), summary=(Illegal navigation), detail=(Illegal navigation)]
If you say it should work, it means there is something I do wrong.
My pageflow is as following :
<?xml version="1.0" encoding="UTF-8"?>
|
| <pageflow-definition name="processusCrud">
| <start-state name="start">
| <transition name="default" to="infosGeneralesProcessus" />
| </start-state>
| <page name="infosGeneralesProcessus" view-id="/processus/processusCrud/infosGeneralesProcessus.xhtml">
| <redirect/>
| <transition to="processus paramétrable ?" name="suivant"></transition>
| <transition to="fin" name="annuler">
| <action expression="#{processusCrud.annuler}" />
| </transition>
| </page>
| <decision name="processus paramétrable ?" expression="#{processusCrud.modeleProcessusSelectionne.parametres != null}">
| <transition to="parametrageProcessus" name="true">
| <action expression="#{processusCrud.refreshParametrage}" />
| </transition>
| <transition name="false" to="recapitulatifProcessus"></transition>
| </decision>
| <page name="parametrageProcessus" view-id="/processus/processusCrud/parametrageProcessus.xhtml">
| <redirect/>
| <transition to="recapitulatifProcessus" name="suivant"></transition>
| <transition name="precedent" to="infosGeneralesProcessus"></transition>
| <transition to="fin" name="annuler">
| <action expression="#{processusCrud.annuler}" />
| </transition>
| </page>
| <page name="recapitulatifProcessus" view-id="/processus/processusCrud/recapitulatifProcessus.xhtml">
| <redirect/>
| <transition to="fin" name="valider">
| <action expression="#{processusCrud.valider}" />
| </transition>
| <transition name="precedent" to="parametrageProcessus"></transition>
| <transition to="fin" name="annuler">
| <action expression="#{processusCrud.annuler}" />
| </transition>
| </page>
| <page name="fin" view-id="/processus/listeProcessus.xhtml">
| <redirect/>
| </page>
| </pageflow-definition>
The pageflow is started with a @Begin annotaion:
@org.jboss.seam.annotations.Begin(pageflow = "processusCrud", join = true)
| public java.lang.String select(mypackage.processus.VOProcessus processus)
| {}
And my select method is called this way ...
<s:button value="#{messages['label.nouveau']}" action="#{processusCrud.select(null)}" />
... or this way :
<h:commandButton id="cmdDetail" value="#{messages['label.detail']}" action="#{processusCrud.select(processus)}" />
|
The link in my template is :
<s:link view="/home.xhtml" value="Accueil" />
Is there anything more to do ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108560#4108560
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108560
18 years, 5 months