[JBoss Seam] - Event scoped component accessing Conversion scope
by quilleashm
I have a search component which is event scoped. Itself it just has four properties which are bound to four input fields in my JSF page.
It extends a generic search component which has a hibernate session which is injected by the @In( create = true ) from the ManagedHibernateSession component. This generic component has bindings to a couple of the controls on the JSF page (grid/parameter panel etc).
The search renders fine when it is visited the first time, including some db queries to get some meta-information. On clicking the search button which posts back the @In injection of the Session fails because the bijection gets fired when binding the UI components to the search object. This happens during the restore view phase when the conversation scope is not available and therefore neither is the hibernate session.
I get the feeling I'm just not using it right but I'm not sure why. Is injecting conversation scoped components into event scoped components something that shouldn't/can't be done? Or do I have my components badly designed.
I've posted the highlights of the classes here..
The component
| @Name( "elementSearch" )
| @Scope( ScopeType.EVENT )
| public class ElementSearch extends SparkSearch
| {
| // control value bindings
| private String eltName;
| private Integer elementSet;
| private Integer country;
| private String eltDigits;
|
| public String getEltName()
| {
| return eltName;
| }
|
| // ... more getters/setters here
|
| public abstract class SparkSearch
| {
| private UIData dataGrid;
| private HtmlPanelGrid parameterGrid;
|
| @In( create = true )
| private Session referenceSession;
|
| @In( required = true )
| private SessionFactory referenceSessionFactory;
|
| public HtmlPanelGrid getParameterGrid()
| {
| return parameterGrid;
| }
|
| public void setParameterGrid( HtmlPanelGrid parameterGrid )
| {
| // this gets called during the restore-view phase at which point the bijection fails on the referenceSession
| this.parameterGrid = parameterGrid;
| }
|
| // .. more getters/setters here + action methods
|
Any comments appreciated.
Cheers.
Mike.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993288#3993288
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993288
19 years, 4 months
[JBoss Seam] - Debuggers can cause early bijection
by quilleashm
Found an interesting and vaguely irritating problem when debugging my Seam application.
My debugger (IDEA) in certain modes will execute toString() on all local/class variables that are visible at a breakpoint for display information. For a Seam component that has interception enabled this results in all the interceptors being fired including bijection. If this happens too early in the JSF lifecycle (e.g. restore view phase) then the bijection can try and inject other components that are not present yet (e.g. conversation scope) and you get an unknown error.
I have no great solution for this. The only possiblility I can think of would be to exclude toString() from the interception which may have other side effects for implementations relying on this.
Cheers.
Mike.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993285#3993285
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993285
19 years, 4 months
[JBossWS] - Excpetion
by Ruslan.Khmelyuk
Hello!
I am using Specification-Version: jbossws-1.0.
While my work, I need to create web-service to provide processing of submitted InfoPath forms.
According to this I change autogenerated wsdl to other more compatible with InfoPath format of wsdl:
<?xml version="1.0" encoding="utf-8" ?>
<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://myhost/WSInfoPath/"
targetNamespace="http://myhostWSInfoPath/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<xs:schema elementFormDefault="qualified" targetNamespace="http://myhost/WSInfoPath/">
<xs:element name="uploadForm1">
<xs:complexType />
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="requestData" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="uploadForm1Response">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="uploadForm1Result">
<xs:complexType mixed="true">
<xs:sequence>
<xs:any />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<message name="uploadForm1SoapIn">
</message>
<message name="uploadForm1SoapOut">
</message>
<portType name="ServiceSoap">
<input message="tns:uploadForm1SoapIn"/>
</portType>
<binding name="ServiceSoap" type="tns:ServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<soap:operation soapAction="http://myhost/WSInfoPath/uploadForm1" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<soap:body use="literal"/>
</binding>
<service name="Service" >
<port name="WSInfoPathEndPointPort" binding="tns:ServiceSoap">
<soap:address location="http://host:8080/EJB/WSInfoPath"/>
</service>
While processing SOAP client request to my WebService occurres next exception:
SOAP request exception
java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
at javax.xml.namespace.QName.(Unknown Source)
at javax.xml.namespace.QName.(Unknown Source)
at org.jboss.ws.binding.soap.SOAPBindingProvider.getParameterFromMessage(SOAPBindingProvider.java:787)
at org.jboss.ws.binding.soap.SOAPBindingProvider.unbindRequestMessage(SOAPBindingProvider.java:282)
at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:112)
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)
Maybe problem in incorrect wsdl and soap format?
I do know!!!
Maybe you know? - Then please help!!!
Thanks, Ruslan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993281#3993281
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993281
19 years, 4 months
[JBossWS] - Excpetion
by Ruslan.Khmelyuk
Hello!
I am using Specification-Version: jbossws-1.0.
While my work, I need to create web-service to provide processing of submitted InfoPath forms.
According to this I change autogenerated wsdl to other more compatible with InfoPath format of wsdl:
<?xml version="1.0" encoding="utf-8" ?>
<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://myhost/WSInfoPath/"
targetNamespace="http://myhostWSInfoPath/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<xs:schema elementFormDefault="qualified" targetNamespace="http://myhost/WSInfoPath/">
<xs:element name="uploadForm1">
<xs:complexType />
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="requestData" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="uploadForm1Response">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="uploadForm1Result">
<xs:complexType mixed="true">
<xs:sequence>
<xs:any />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<input message="tns:uploadForm1SoapIn"/>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<soap:operation soapAction="http://myhost/WSInfoPath/uploadForm1" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<soap:body use="literal"/>
<soap:address location="http://host:8080/EJB/WSInfoPath"/>
While processing SOAP client request to my WebService occurres next exception:
SOAP request exception
java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
at javax.xml.namespace.QName.(Unknown Source)
at javax.xml.namespace.QName.(Unknown Source)
at org.jboss.ws.binding.soap.SOAPBindingProvider.getParameterFromMessage(SOAPBindingProvider.java:787)
at org.jboss.ws.binding.soap.SOAPBindingProvider.unbindRequestMessage(SOAPBindingProvider.java:282)
at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:112)
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)
Maybe problem in incorrect wsdl and soap format?
I do know!!!
Maybe you know? - Then please help!!!
Thanks, Ruslan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993280#3993280
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993280
19 years, 4 months
[JBossWS] - Excpetion
by Ruslan.Khmelyuk
Hello!
I am using Specification-Version: jbossws-1.0.
While my work, I need to create web-service to provide processing of submitted InfoPath forms.
According to this I change autogenerated wsdl to other more compatible with InfoPath format of wsdl:
?xml version="1.0" encoding="utf-8" ?>
<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://myhost/WSInfoPath/"
targetNamespace="http://myhostWSInfoPath/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<xs:schema elementFormDefault="qualified" targetNamespace="http://myhost/WSInfoPath/">
<xs:element name="uploadForm1">
<xs:complexType />
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="requestData" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="uploadForm1Response">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="uploadForm1Result">
<xs:complexType mixed="true">
<xs:sequence>
<xs:any />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<soap:operation soapAction="http://myhost/WSInfoPath/uploadForm1" style="document"/>
<soap:body use="literal"/>
<soap:body use="literal"/>
<soap:address location="http://host:8080/EJB/WSInfoPath"/>
While processing SOAP client request to my WebService occurres next exception:
SOAP request exception
java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
at javax.xml.namespace.QName.(Unknown Source)
at javax.xml.namespace.QName.(Unknown Source)
at org.jboss.ws.binding.soap.SOAPBindingProvider.getParameterFromMessage(SOAPBindingProvider.java:787)
at org.jboss.ws.binding.soap.SOAPBindingProvider.unbindRequestMessage(SOAPBindingProvider.java:282)
at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:112)
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)
Maybe problem in incorrect wsdl and soap format?
I do know!!!
Maybe you know? - Then please help!!!
Thanks, Ruslan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993278#3993278
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993278
19 years, 4 months