[JBoss Seam] - boolean property not binding
by sbozdag
Hi,
I have a page as below:
| <!-- mypage.xhtml -->
|
| <ice:form id="someFormId">
| ...
| <h:selectBooleanCheckbox id="containsHeader"
| value="#{bean.checked}"/>
| ...
| </ice:form>
|
|
I am trying to show a check box component on the page. And here is my "stateful" session bean,
| @Stateful
| @Scope(ScopeType.SESSION)
| @Name("bean")
| public class MyBean implements Serializable, IMyBean{
|
| @In boolean checked;
| // other properties
| public String someAction() {
| //...
| return "someOutcome";
| }
|
| @Remove
| public void destroy() {
| }
| }
|
I am getting this error message while trying to load mypage.xhtml given above.
| Exception during request processing:
| Caused by javax.faces.FacesException with message: "Problem in renderResponse: javax.el.PropertyNotFoundException: /mypage.xhtml @35,74 value="#{bean.checked}": Property 'checked' not found on type org.javassist.tmp.java.lang.Object_$$_javassist_2"
|
|
| What do you think that why the error occurs?
|
| Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093234#4093234
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093234
18Â years, 7Â months
[JBossWS] - SoapFault on returning the web service response
by ggary
I have created a simple JAX-WS web service to process spam complaints
Here is the Java code of it:
@WebService(targetNamespace="http://service.responsys.com/rsystools/ws/SpamComplaintWS/1.0")
| public class SpamComplaintWS
| {
| @WebMethod(operationName="processSpamComplaints")
| @WebResult(name="SpamResult")
| @ResponseWrapper(className="com.rsys.rsystools.ws.SpamResult")
| public SpamResult processSpamComplaints(
| @WebParam(name = "email") String email,
| @WebParam(name = "fromAddress") String fromAddress,
| @WebParam(name = "mailDate") String mailDate,
| @WebParam(name = "complaintDate") String complaintDate,
| @WebParam(name = "mailbox") String mailbox,
| @WebParam(name = "complainer") String complainer,
| @WebParam(name = "xRext") String xRext,
| @WebParam(name = "accountName") String accountName)
| {
| responsys.prodtools.SpammerTables st = new responsys.prodtools.SpammerTables();
| String[] res = st.processSpamRecord(email, fromAddress, mailDate, complaintDate, mailbox, complainer, xRext, accountName);
| return (new SpamResult(res[0],res[1],res[2],res[3],res[4],res[5],res[6],res[7],res[8],res[9],res[10],res[11],res[12],res[13]));
| }
| }
|
It compiles and deploys successfully, however, generated wsdl is not what I expected to see:
- <definitions name="SpamComplaintWSService" targetNamespace="http://service.responsys.com/rsystools/ws/SpamComplaintWS/1.0" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://service.responsys.com/rsystools/ws/SpamComplaintWS/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
| - <types>
| - <xs:schema targetNamespace="http://service.responsys.com/rsystools/ws/SpamComplaintWS/1.0" version="1.0" xmlns:tns="http://service.responsys.com/rsystools/ws/SpamComplaintWS/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
| <xs:element name="processSpamComplaints" type="tns:processSpamComplaints" />
| <xs:element name="processSpamComplaintsResponse" type="tns:processSpamComplaintsResponse" />
| - <xs:complexType name="processSpamComplaints">
| - <xs:sequence>
| <xs:element minOccurs="0" name="email" type="xs:string" />
| <xs:element minOccurs="0" name="fromAddress" type="xs:string" />
| <xs:element minOccurs="0" name="mailDate" type="xs:string" />
| <xs:element minOccurs="0" name="complaintDate" type="xs:string" />
| <xs:element minOccurs="0" name="mailbox" type="xs:string" />
| <xs:element minOccurs="0" name="complainer" type="xs:string" />
| <xs:element minOccurs="0" name="xRext" type="xs:string" />
| <xs:element minOccurs="0" name="accountName" type="xs:string" />
| </xs:sequence>
| </xs:complexType>
| - <xs:complexType name="processSpamComplaintsResponse">
| - <xs:sequence>
| <xs:element minOccurs="0" name="SpamResult" type="tns:processSpamComplaintsResponse" />
| </xs:sequence>
| </xs:complexType>
| </xs:schema>
| </types>
| - <message name="SpamComplaintWS_processSpamComplaints">
| <part element="tns:processSpamComplaints" name="processSpamComplaints" />
| </message>
| - <message name="SpamComplaintWS_processSpamComplaintsResponse">
| <part element="tns:processSpamComplaintsResponse" name="processSpamComplaintsResponse" />
| </message>
| - <portType name="SpamComplaintWS">
| - <operation name="processSpamComplaints" parameterOrder="processSpamComplaints">
| <input message="tns:SpamComplaintWS_processSpamComplaints" />
| <output message="tns:SpamComplaintWS_processSpamComplaintsResponse" />
| </operation>
| </portType>
| - <binding name="SpamComplaintWSBinding" type="tns:SpamComplaintWS">
| <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
| - <operation name="processSpamComplaints">
| <soap:operation soapAction="" />
| - <input>
| <soap:body use="literal" />
| </input>
| - <output>
| <soap:body use="literal" />
| </output>
| </operation>
| </binding>
| - <service name="SpamComplaintWSService">
| - <port binding="tns:SpamComplaintWSBinding" name="SpamComplaintWSPort">
| <soap:address location="http://127.0.0.1:80/RsysTools/ws/SpamComplaintWS" />
| </port>
| </service>
| </definitions>
|
(It is copied from the browser, so, don't mind dashes).
As you can see, I explicitly stated the name and class for my return value but wsdl ignores that part. I mean @WebResult and @ResponceWrapper annotations.
I can call the web service in it successfully performs its job (I know it by the results of the database transaction) by I still getting an exception on result return:
javax.xml.ws.soap.SOAPFaultException: java.lang.reflect.UndeclaredThrowableException
| at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:171)
| at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:94)
| at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:240)
| at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:210)
| at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
| at $Proxy29.processSpamComplaints(Unknown Source)
| at com.rsys.rsystools.client.SpamComplainClient.doComplain(SpamComplainClient.java:409)
|
Can someone tells me what is wrong with my code and how to make it work.
I am doing it on JBoss 4.2.1 with the JBossWS 2.0.1GA
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093226#4093226
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093226
18Â years, 7Â months
[JBoss Seam] - Re: How to validate currency/float precision on a form
by jfrankman
In case someone else needs to do this:
At first I downloaded the hibernate-validator.jar and tried to add it to my project and jboss, but I could not get it to work with the correct version of the hibernate-entity manager. So, I downloaded the hibernate entity manager 3.3.1 which included the latest hibernate validator and all supporting jar files. This worked much better. Deploy the hibernate entity manager jar and all the jars in the lib directory as one unit. It is much easier than downloading the validator and trying to find all the other jars that need updated to work with it. I moved the jar files from the entity manager 3.3.1 download and added them to jboss and to my project. I also had to download the core hibernate 3.2 and add the hibernate3.jar.
Once I did this I was able to get the scale and precision to work as follows:
@Column(name = "CHECKAMOUNT", precision=7, scale=2)
| @Digits(integerDigits=7,fractionalDigits=2)
| public Double getCheckamount() {
| return this.checkamount;
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093224#4093224
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093224
18Â years, 7Â months