[JBossWS] - Re: How could see the endpoint the SOAP headers built by a o
by camateusno
Thanks alessio,
but perhaps that step, simple and intuitive,
I still do not understand.
I show you my strategy, and maybe you can give me another hand:
perhaps quite usual:
I have
- a SEI class: QMWISeSoap
- a class that extend of class javax.xml.ws.Service, and provide the getter (public QMWISeSoap getQMWISeSoap()) for QMWISeSoap: QMWISe
- a class that provide a instance of QMWISeSoap named endPoint, in its constructor call QMWISe.getQMWISeSoap() and assign it to endPoint : QMWISeWebService
- a package that contain classes that extend of QMWISeWebService, each class of this package has a methods that call a corresponding method in the SEI class, using the attribute endPoint inherited from QMWISeWebService.
I begin using this classes, really wrappers of SEI, and operate perfectly.
A new requirement consist in aggregate security data in SOAP headers.
After that consume the webservice, i see other class that i dont know how fits in what was already running. This class is named ObjectFactory.
This class i suppose after of study it, is a factory of objects that represent the requests. Also provide two attributes (securityHeader and trustHeader) and its getters methods and setters methods. These attributes are precisely the data that would need for SOAP headers.
in this way:
private final static QName _Trust_QNAME = new QName("http://questionmark.com/QMWISe/", "Trust");
private final static QName _Security_QNAME = new QName("http://questionmark.com/QMWISe/", "Security");
methods:
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SecurityHeader }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://questionmark.com/QMWISe/", name = "Security")
public JAXBElement createSecurity(SecurityHeader value) {
return new JAXBElement(_Security_QNAME, SecurityHeader.class, null, value);
}
My confusion is that i dont understand how relate this facility of ObjectFactory with the work that had operated.
First i do this:
By example
ParticipantData.createParticipant(Participant participant)
where ParticipantData is a wrapper of part of SEI.
then, i created a object participant without using the objectfactory facility, since the Participant class has its constructor and work.
thinking in integrate the ObjectFactory, then now i created the instance of Participant using the ObjectFactory, in this way:
participant = factory.createParticipant(), and i setting the securityheader with ObjectFactory. And i call the method of ParticipantData named createParticipant passing it the object Participant builded with the ObjectFactory.
Lastly i discovered that in the objectfactory there are similar methods to the methods of my wrapper classes. Then i prove calling this methods and not the methods of wrappers.
Any clarification is greatly appreciated, thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108980#4108980
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108980
18 years, 5 months
[JBoss Seam] - Re: Seam 2.0.0.GA + Maven2 (s:validateAll doesn't work)
by leandro3.marinho
Hi, I have more informations...
I saw in the JBoss logs this message when I load a page.
| 14:28:32,756 INFO [Pages] no pages.xml file found: /WEB-INF/pages.xml
| 14:28:33,377 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/jboss-seam-ui-2.0.0.GA.jar!/META-INF/s.taglib.xml
| 14:28:33,462 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jsf-core.taglib.xml
| 14:28:33,471 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jsf-html.taglib.xml
| 14:28:33,504 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jsf-ui.taglib.xml
| 14:28:33,559 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-core.taglib.xml
| 14:28:33,567 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml
| 14:28:33,614 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/richfaces-ui-3.1.2.GA.jar!/META-INF/a4j.taglib.xml
| 14:28:33,622 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/richfaces-ui-3.1.2.GA.jar!/META-INF/ajax4jsf.taglib.xml
| 14:28:33,722 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/richfaces-ui-3.1.2.GA.jar!/META-INF/rich.taglib.xml
| 14:28:33,772 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/richfaces-ui-3.1.2.GA.jar!/META-INF/richfaces.taglib.xml
|
after this message, when I execute the form submit, the Seam throws this exception:
| javax.servlet.ServletException: Servlet execution threw an exception
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
| root cause
|
| java.lang.AbstractMethodError: org.hibernate.validator.InvalidValue.getMessage()Ljava/lang/String;
| org.jboss.seam.ui.validator.ModelValidator.createMessage(ModelValidator.java:53)
| org.jboss.seam.ui.validator.ModelValidator.validate(ModelValidator.java:46)
| javax.faces.component.UIInput.validateValue(UIInput.java:1013)
| javax.faces.component.UIInput.validate(UIInput.java:867)
| javax.faces.component.UIInput.executeValidate(UIInput.java:1065)
| javax.faces.component.UIInput.processValidators(UIInput.java:666)
| javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
| javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
| javax.faces.component.UIForm.processValidators(UIForm.java:229)
| javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
| javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:662)
| org.ajax4jsf.component.AjaxViewRoot.access$201(AjaxViewRoot.java:57)
| org.ajax4jsf.component.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:319)
| org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
| org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:173)
| org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:333)
| com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)
| com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
|
Can you help me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108976#4108976
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108976
18 years, 5 months
[JBoss Seam] - Converter Issue
by rvkishore
I have two entities, Sheet and Category. A Sheet can belong to multiple Categories.
So, I have in my Sheet.java
|
| @ManyToMany(mappedBy = "sheets")
| private List<Category> categories = new ArrayList<Category>();
|
|
In my create Sheet page
| <h:outputText value="Category : " />
| <h:selectManyListbox id="categoryList" value="#{sheet.categories}" required="true" converter="#{entityConverter}">
| <s:selectItems value="#{categoryAction.rootCategories}" id="cats" var="cat" label="#{cat.name}(#{cat.id})" noSelectionLabel="Please Select..."/>
| <!-- <f:selectItems value="#{categoryAction.rootCategories}" />-->
| <s:convertEntity/>
| </h:selectManyListbox>
|
I am using the selectManyListBox to show the categories from which the user can choose while creating a new Sheet. I am getting the dreaded
"value is not valid" exception.
The s:selectItems does not display the id value correctly in the list. It has a positional index as the value for the list item which is not the id for the category object. So, I guess that is the reason why the converter is not able to get the Category object when submitted. So, I changed my xhtml page to the following
|
| <h:outputText value="Category : " />
| <h:selectManyListbox id="categoryList" value="#{sheet.categories}" required="true" converter="#{entityConverter}">
| <f:selectItems value="#{categoryAction.rootCategories}" />
| <s:convertEntity/>
| </h:selectManyListbox>
Now, I am getting
Argument Error: An option for component categoryList was not an instance of javax.faces.model.SelectItem. Type found: java.util.ArrayList.
My components.xml has the following for the converter
| <component name="entityConverter" scope="CONVERSATION" precedence="20"
| class="org.jboss.seam.ui.converter.EntityConverter">
| <property name="entityManager">#{entityManager}</property>
| </component>
|
Any ideas as to what I am doing wrong.
Thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108975#4108975
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108975
18 years, 5 months
[Installation, Configuration & DEPLOYMENT] - Post not working with mod_jk (Get is ok)
by nrichards
Hi,
I am in the middle of moving our web setup from Tomcat 5 to JBoss 4.2. We are currently using mod_jk2, with IIS and Tomcat on different machines.
My plan was to replicate that setup but use JBoss and mod_jk (mod_jk2 now deprecated). I followed the instructions in the recommended link http://www.jboss.org/wiki/Wiki.jsp?page=UsingMod_jk1.2WithJBossAndIIS, but have had limited success. Any GETs are served fine, but POSTs arrive inside our application with the form empty. The code to process the empty form still runs, but a response doesn't appear to be sent back and the client (eventually) gets a 'Page cannot be displayed' error. If I switch back to Tomcat, the problem disappears.
My workers.properties.minimal is
worker.list=ajp13w
|
| worker.ajp13w.type=ajp13
| worker.ajp13w.host=localhost
| worker.ajp13w.port=8009
|
| worker.status.type=status
The connector in jboss-web.deployer/server.xml is
<Connector port="8009"
| maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
| enableLookups="false" redirectPort="8443" acceptCount="100"
| connectionTimeout="20000" disableUploadTimeout="true" protocol="AJP/1.3" />
and I've changed jboss-web.deployer/META-INF/jboss-service.xml to read
<attribute name="UseJK">true</attribute>
I'm currently running run.bat with -b 0.0.0.0 so JBoss can listen outside localhost, but I have also tested the problem with IIS running on the same machine as JBoss and get the same result.
I'm sure there must be an easy explanation, but for the life of me I cannot find what it could be. Could someone please put me out of my misery :)
Many thanks,
Neil
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108972#4108972
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108972
18 years, 5 months
[JBoss Seam] - Re: generating forms programatically
by jcruise
The general strategy that I used was:
1. Build some framework classes that know how to extract basic field level metadata from ejb/hibernate config info at runtime. Automatically extracted metadata includes types, lengths, relationships etc. I also provide attributes in these framework classes to add additional decorations (editable status, pick list options, custom templates types etc.)
2. Provide an XML based config that allows me to specify the data configurations that should appear on each form in my system, and the facelets template to be used to draw that form (e.g. a panel renderer, a grid renderer etc) and the view id for that form.
3. Provide a custom facelets resolver that selects the correct rendering template for each form defined in my config when the user navigates to a particular URL. In this way I don't have to have actual facelets pages on disk for each form.
4. Build some generic renderers that use the metadata provider classes in conjunction with the c: tags.
I can support 10s or 100s of entity types in my system supported by only a couple of generic renderers.
I don't know if this is all a great idea, but it works for me!
Cheers
J
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108969#4108969
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108969
18 years, 5 months