[JBossWS] - JBoss equivalent of clientGen of WL
by JBoss_82
Hi,
I am using the top-down approach by starting with the WSDL. I am trying to figure out a mechanism in JBoss 4.2.1 with jbossws-native2.0.1 which is equivalent of WL's clientgen. Objective is to generate a client-jar which can be used by the client program to consume the web service.
Sample WL clietgen task:
<taskdef name="clientgen" classname="weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask"
| classpathref="clientgen.class.path"/>
|
| <target name="McAfee">
| <clientgen wsdl="macafeeAdapterContract.wsdl"
| packageName="com.covad.vendororder"
| typePackageName="com.covad.vendororder.xsd"
| clientJar=".\mcafeeadapter-client.jar">
| <classpath refid="clientgen.class.path" />
| </clientgen>
| </target>
|
|
Quote:
I know there is a crude way of using the client artifacts generated by "wsconsume", zip those class files and create a client-jar, but I want to know if there's a better way to do this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098623#4098623
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098623
18Â years, 6Â months
[JBossWS] - Re: WSTools to generate jaxrpc-mapping.xml file?
by wcydaip
the conflict is between jwsdl4j.jar and jbossall-client.jar. the jbossall-client.jar doesn't have the close method.
added the jwsdl4j.jar higher in the import scheme.
It executes but now I get:
| log4j:WARN No appenders could be found for logger (org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory).
| log4j:WARN Please initialize the log4j system properly.
| Exception in thread "main" org.apache.xerces.xni.XNIException: Parser should stop: [domain:http://ww
| w.w3.org/TR/1998/REC-xml-19980210]::[key=ContentIllegalInProlog]::Message... is not allowed in
| prolog.
| at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSErrorHandler.fatalError(JBossXSErrorHandler.j
| ava:78)
| at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
| at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
| at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
| at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
| at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
| at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
| at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
| at org.apache.xerces.impl.xs.opti.SchemaDOMParser.parse(Unknown Source)
| at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source)
| at org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(Unknown Source)
| at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
| at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
| at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
| at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
| at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:182)
| at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:391)
| at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:172)
| at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:128)
| at org.jboss.ws.tools.WSDLToJava.convertWSDL2Java(WSDLToJava.java:119)
| at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:298)
| at org.jboss.ws.tools.WSTools.process(WSTools.java:147)
| at org.jboss.ws.tools.WSTools.generate(WSTools.java:69)
| at org.jboss.ws.tools.WSTools.generate(WSTools.java:123)
| at org.jboss.ws.tools.WSTools.main(WSTools.java:58)
| C:\projects-cal-ws\act-ws-scheduler\client>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098622#4098622
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098622
18Â years, 6Â months
[JBoss Seam] - selectItems - Is it possible?
by Kragoth
Hi all.
Before I get into my question, I have been trying for 2 days to achieve what I want to do and I've read almost every article I can find about the s:selectItems and f:selectItems components that I can find. But, I can't seem to find any examples or I am just not understanding things which is why I can't get this to work. But anyways, this is my problem.
I have a web page that I want to use the selectOneMenu component on to select a "Category" Object.
So I figured I could just use the following code:
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:rich="http://richfaces.org/rich"
| xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:j4j="http://javascript4jsf.dev.java.net/"
| xmlns:gekko="http://gekkoTagLibs.com">
|
| <head></head>
| <body>
| <h:form id="searchCriteria" >
| <rich:panel>
| <f:facet name="header">
| <h:outputText value="Factor for Category/Subcategory Enquiry (TLONL999)"></h:outputText>
| </f:facet>
|
| <rich:panel>
| <h:messages globalOnly="true"/>
| </rich:panel>
|
| <h:panelGrid columns="3">
| <h:outputText value="Category:" styleClass="inputLabel"></h:outputText>
| <h:selectOneMenu id="categoryFilter" value="#{catSubcatEnquiryActionBean.categoryCode}" >
| <s:selectItems value="#{categories}" var="category" noSelectionLabel=""
| label="#{category.name}"/>
| <f:attribute name="className" value="CategoryCode"/>
| </h:selectOneMenu>
| <h:message for="categoryFilter"></h:message>
| <h:outputText value="Subcategory:" styleClass="inputLabel"></h:outputText>
| <h:selectOneListbox id="subcategoryFilter">
| </h:selectOneListbox>
| <h:message for="subcategoryFilter"></h:message>
| <h:outputText value="Date:" styleClass="inputLabel"></h:outputText>
| <rich:calendar id="calendarFilter"
| showInput="true"
| enableManualInput="true"
| datePattern="#{catSubcatEnquiryActionBean.dateFormat}"
| currentDate="#{catSubcatEnquiryActionBean.currentDate}"
| value="#{catSubcatEnquiryActionBean.dateFilter}"
| converter="gekkoDateConverter"
| >
| </rich:calendar>
| <h:message id="calendarErrors" for="calendarFilter"></h:message>
| </h:panelGrid>
|
| </rich:panel>
|
| <h:commandButton id="formSubmit" type="submit" value="Search" action="#{catSubcatEnquiryActionBean.doSearch}">
| <gekko:defaultAction/>
| </h:commandButton>
|
| </h:form>
|
| </body>
| </html>
|
the CatSubcatEnquiryActionBean is as follows:
| package gekko.web.actionbean.enquiryservices;
|
| import gekko.domain.reference.ltl.CategoryCode;
| import gekko.services.query.Query;
| import gekko.services.query.QueryService;
| import gekko.services.reference.DateService;
| import gekko.util.FormatUtils;
| import gekko.util.StringUtils;
|
| import java.util.Date;
| import java.util.List;
|
| import javax.faces.application.FacesMessage;
| import javax.faces.context.FacesContext;
| import javax.faces.validator.ValidatorException;
|
| import org.jboss.seam.ScopeType;
| import org.jboss.seam.annotations.Factory;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.annotations.datamodel.DataModel;
| import org.jboss.seam.annotations.datamodel.DataModelSelection;
| import org.jboss.seam.faces.FacesMessages;
|
| @Name("catSubcatEnquiryActionBean")
| @Scope(ScopeType.SESSION)
| public class CatSubcatEnquiryActionBean {
|
| @In("#{dateServiceImpl}")
| private DateService dateSvc; //NOPMD
|
| @In("#{queryServiceImpl}")
| private QueryService querySvc;
|
| @In
| FacesMessages facesMessages;
|
| private Date dateFilter;
| private String subcategory;
|
| @DataModel("categories")
| private List<CategoryCode> categoryList; //NOPMD
|
| @DataModelSelection("categories")
| private CategoryCode categoryCode;
|
| @Factory(value="categories")
| public void getCategories() {
| Query<CategoryCode> qCat = querySvc.createQuery(CategoryCode.class);
| qCat.equalsConstraint("deleted", false);
| categoryList = querySvc.list(qCat);
| }
|
| public Date getDateFilter() {
| return dateFilter;
| }
|
| public void setDateFilter(Date dateFilter) {
| this.dateFilter = dateFilter;
| }
|
| public Date getCurrentDate() {
| return dateSvc.getCurrentDate();
| }
|
| public String getDateFormat() {
| return FormatUtils.SHORT_DATE_FORMAT;
| }
|
| public String getSubcategory() {
| return subcategory;
| }
|
| public void setSubcategory(String subcategory) {
| this.subcategory = subcategory;
| }
|
| public List<CategoryCode> getCategoryList() {
| return categoryList;
| }
|
| public void setCategoryList(List<CategoryCode> categoryList) {
| this.categoryList = categoryList;
| }
|
| public CategoryCode getCategoryCode() {
| return categoryCode;
| }
|
| public void setCategoryCode(CategoryCode categoryCode) {
| this.categoryCode = categoryCode;
| }
|
| public String doSearch() throws ValidatorException {
|
| if (StringUtils.isBlank(this.subcategory) &&
| StringUtils.isBlank(FormatUtils.formatDate(this.dateFilter, FormatUtils.SHORT_DATE_FORMAT, ""))) {
|
| FacesMessage message = new FacesMessage();
| message.setDetail("At least one of Category or Date must be filled in to performa a search.");
| message.setSummary("No search criteria given");
| message.setSeverity(FacesMessage.SEVERITY_ERROR);
|
| FacesContext.getCurrentInstance().addMessage(null, message);
|
| }
|
| return "";
| }
|
| }
|
However, when I use this. I get the following message when I select a Category and submit the form.
| /web/enquiryServices/categorySubcategory/catSubcategoryEnquiry.xhtml @26,95 value="#{catSubcatEnquiryActionBean.categoryCode}": java.lang.IllegalArgumentException: argument type mismatch
|
I've attempted to use the <s:convertEntity/> but this gives me a No Transaction error and would not work anyway because the CatSubcatEnquiryActionBean is not an Entity.
I can't make the Category.java a Seam bean due to the way our system architect wants to seperate the persistence from Seam. They only want Seam for its JSF integration.
Just in case this is needed to solve my problem here is my faces-config.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
|
| <!--<component>-->
| <!--<component-type>gekko.web.defaultAction</component-type>-->
| <!--<component-class>-->
| <!--gekko.web.components.UIDefaultAction-->
| <!--</component-class>-->
| <!--</component>-->
|
| <!-- Facelets support -->
| <application>
| <variable-resolver>
| org.springframework.web.jsf.DelegatingVariableResolver
| </variable-resolver>
| <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
| <message-bundle>messages</message-bundle>
| </application>
|
| <converter>
| <converter-id>gekkoDateConverter</converter-id>
| <converter-class>
| gekko.web.converter.DateConverter
| </converter-class>
| </converter>
|
| <converter>
| <converter-id>gekkoGenericObjectConverter</converter-id>
| <converter-class>
| gekko.web.converter.GenericObjectConverter
| </converter-class>
| </converter>
|
| </faces-config>
|
and my components.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <components xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xmlns="http://jboss.com/products/seam/components"
| xmlns:core="http://jboss.com/products/seam/core"
| xmlns:bpm="http://jboss.com/products/seam/bpm"
| xmlns:security="http://jboss.com/products/seam/security"
| xmlns:framework="http://jboss.com/products/seam/framework"
| xmlns:transaction="http://jboss.com/products/seam/transaction"
| xmlns:spring="http://jboss.com/products/seam/spring"
| xsi:schemaLocation=
| "http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd
| http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
| http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.0.xsd
| http://jboss.com/products/seam/persistence http://jboss.com/products/seam/transaction-2.0.xsd
| http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
| http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.0.xsd
| http://jboss.com/products/seam/spring http://jboss.com/products/seam/spring-2.0.xsd">
|
|
| <core:init transaction-management-enabled="false">
| </core:init>
| <transaction:no-transaction/>
|
| </components>
|
I guess I just want to know. How do I select an item in my selectOneMenu and update my CatSubCatEnquiryActionBean?
I thought this would be easy, but I'm really struggeling to find a way to do this.
Do I need to write my own converter? And if so, how do I find out which selectItem was the selected one?
I hope someone can make sense of what I'm trying to do cause I'm a tad confused at the moment.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098611#4098611
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098611
18Â years, 6Â months
[JBossWS] - WSTools to generate jaxrpc-mapping.xml file?
by wcydaip
I am trying to connect to a microsoft ws using JBoss-4.0.5.GA and JBossWS-2.0.0.GA.
I executed wsconsume to generate the classes, but, was not able to use wstools to generate the artifacts, i.e., jaxrpc-mapping.xml. I get the following error when executing the command:
| Exception in thread "main" java.lang.NoSuchMethodError: javax.wsdl.xml.WSDLLocator.close()V
| at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2367)
| at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:127)
| at org.jboss.ws.tools.WSDLToJava.convertWSDL2Java(WSDLToJava.java:119)
| at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:298)
| at org.jboss.ws.tools.WSTools.process(WSTools.java:147)
| at org.jboss.ws.tools.WSTools.generate(WSTools.java:69)
| at org.jboss.ws.tools.WSTools.generate(WSTools.java:123)
| at org.jboss.ws.tools.WSTools.main(WSTools.java:58)
|
Any help on which version of the jar file that it's requesting? I've tried wsdl4j.jar that ships with JBossWS, wsdl4j-1.5.2.jar and wsdl4j-1.6.1.jar with no success.
Deploying without the mapping file I believe confuses JBoss and it throws the following error:
| 2007-10-24 16:03:55,015 ERROR [STDERR] javax.xml.ws.soap.SOAPFaultException: WSDLReader:None of the matching operations for soapAction http://actcenters.com/ALMVTC/action/Schedule.getCandidateScheduleData could successfully load the incoming request. Potential typemapper problem
| 2007-10-24 16:03:55,015 ERROR [STDERR] at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:69)
| 2007-10-24 16:03:55,015 ERROR [STDERR] at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:109)
| 2007-10-24 16:03:55,015 ERROR [STDERR] at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:553)
| 2007-10-24 16:03:55,015 ERROR [STDERR] at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:371)
| 2007-10-24 16:03:55,015 ERROR [STDERR] at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
| 2007-10-24 16:03:55,015 ERROR [STDERR] at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
| 2007-10-24 16:03:55,015 ERROR [STDERR] at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
| 2007-10-24 16:03:55,015 ERROR [STDERR] at $Proxy63.getCandidateScheduleData(Unknown Source)
|
Any help is appreciated.
Graham
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098607#4098607
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098607
18Â years, 6Â months