[JBoss Seam] - EL expression for accessing a set?
by jamesjmp
Hi,
I wonder if there is an EL expression for accessing a set?
For instance, Iôve this objects:
| public class AssetType implements java.io.Serializable {
|
| private long idAsset;
| private String type;
|
| private Set<Instrument> instruments = new HashSet<Instrument>(0);
| ...
|
| public class Instrument implements java.io.Serializable {
|
| private String securityName;
| ..
|
In a xhtml I want to display the securityNameof the first item in the instruments set.
Something like this, but it doesnôt work
| #{assetType[0].internalOptionNumber}
|
In java, itôs easy, for instance to display all of them: (yeah, I know an iterator would be fine as well, this is just a sample way of accessing)
| public String getSecurityName() {
| System.out.println("getSecurityName - getInstruments size:"+instruments.size());
| String secName ="";
| for( Instrument ins : instruments ) {
| secName = ins.getSecurityName();
| System.out.println("SecurityName" + secName );
| }
| return secName;
| }
|
Any way to access a set from an EL expression?
thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106740#4106740
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106740
18 years, 8 months
[JBoss Seam] - Isolated classloader and XML defined Factory Components
by sradford
Hi,
Got bit of an issue with 2 Seam applications in the same JVM (in own classloader repositories).
In both applications there is an Application scoped configuration component (whose classes are within the ears) that are instantiated via a factory defined in their respective components.xml.
The issue is the configuration Component for App A appearing in App B in the following scenario.
1. A Faces request starts in App A
| 2. App A instantiates Config Component A via its component.xml file
| 3. App A makes a remote callByValue EJB call to App B
| 4. App B needs Config Component B. It looks in its Application Context, which does not contain an instance and so tries to create it. In doing so it requires an Expressions instance and finds the Application A com.sun.faces.context.FacesContextImpl on the Thread. Using this Expressions instance it then instantiates a Config Component using classes within App A's classloader repository which then results in a ClassCastException when trying to be used in Application B.
|
| I guess the 'root issue' is the fact that the JSF classes from JBossWeb are shared between the 2 applications (seen in the classloader list for both application repositories in the JMX console ). And I can't see how to configure JBoss to use separate ones for each application.
|
| Anyone able to help with this?
|
| Thanks and regards,
|
| Sean
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106726#4106726
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106726
18 years, 8 months
[JBossWS] - About jaxrpc-mapping.xml...
by paoletto
I have an ejb3 slsb exposed as web service using jsr181.
Now: i'd like to use Dinamic invocation interface because it's possible that some clients dont have the endpoint interface.
I get org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://jaxb.dev.java.net/array}stringArray because there is probably a mismatch in namespace for some obscure reasons.
I'm not using a jaxrpc-mapping.xml
My question is: to generate it i have to use some tools (like wstools or wsconsume) applied to the wsdl, and then give to my application.
But - just wondering- why this?
why dont just provide some interface to auto generate it?
If i want to use some other web services i have only the wsdl for, why should i generate the mapping BEFORE, and then give to my application?
why cant this process be automatic?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106720#4106720
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106720
18 years, 8 months
[JBossWS] - javax.xml.rpc.JAXRPCException: Cannot create or send respons
by rashmi_yes
Hi,
i am new to webservice. I tried to create a web service with a single method & called from client. It works fine. But when I add one more webservice method & called the first method from the client. The call goes to server works till the return but while returning, it throws the below error. Please help me on this.
WS Code is :
@Stateless()
@WebService()
public class REFactory {
/**
* Web service operation
*/
@WebMethod
public String display(@WebParam(name = "s") String s) {
// TODO implement operation
System.out.println("In method 1 :::: "+s);
return "From method 1";
}
/**
* Web service operation
*/
@WebMethod
public String createSession(@WebParam(name = "vo") Object vo) {
System.out.println("In method 2 ...........");
return "From method 2";
}
}
Error is :
18:02:26,791 ERROR [SOAPFaultExceptionHelper] SOAP request exception
javax.xml.rpc.JAXRPCException: Cannot create or send response message
at org.jboss.ws.server.ServiceEndpoint.postProcessResponse(ServiceEndpoint.java:311)
at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:236)
at org.jboss.ws.server.ServiceEndpointServlet.doPost(ServiceEndpointServlet.java:120)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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.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)
Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Neither getter nor field where found for defaultAssertionStatus in class java.lang.ClassLoader
at org.jboss.xb.binding.MappingObjectModelProvider$FieldToElementMapping.(MappingObjectModelProvider.java:368)
at org.jboss.xb.binding.MappingObjectModelProvider.mapFieldToElement(MappingObjectModelProvider.java:71)
at org.jboss.ws.jaxb.JAXBMarshallerImpl.marshal(JAXBMarshallerImpl.java:149)
at org.jboss.ws.jaxrpc.encoding.JAXBSerializer.serialize(JAXBSerializer.java:100)
at org.jboss.ws.soap.SOAPContentElement.getXMLFragment(SOAPContentElement.java:172)
at org.jboss.ws.soap.SOAPContentElement.expandToDOM(SOAPContentElement.java:844)
at org.jboss.ws.soap.SOAPContentElement.getChildNodes(SOAPContentElement.java:761)
at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:211)
at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:270)
at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:270)
at org.jboss.util.xml.DOMWriter.print(DOMWriter.java:186)
at org.jboss.util.xml.DOMWriter.printNode(DOMWriter.java:135)
at org.jboss.ws.server.ServiceEndpoint.postProcessResponse(ServiceEndpoint.java:305)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106718#4106718
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106718
18 years, 8 months