[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
17 years, 2 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
17 years, 2 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
17 years, 2 months