[JBossWS] - Can someone confirm this wsconsume ant task behavior?
by babernat
I'm using the version included with JBoss AS 5.1.0.GA and it appears the wsdl attribute is using the location of the build file as the base directory for the relative path instead of what is defined in the basedir attribute for the ant project.
For example if I have the following ant build script located in a directory C:/myproject/build
| <project name="MyProject" basedir="../">
| <property environment="env"/>
| <path id="jboss.client.classpath">
| <fileset dir="${JBoss.client.lib}">
| <include name="**/*.jar"/>
| </fileset>
| </path>
| <taskdef name="wsconsume" classname="org.jboss.wsf.spi.tools.ant.WSConsumeTask" classpathref="jboss.client.classpath"/>
| <target name="generate-service">
| <wsconsume keep="true" package="com.whatever" destdir="build/gen" wsdl="build/tmpxml/MyProject.wsdl" verbose="true"/>
| </target>
| </project>
|
It appears that wsconsume is looking for the wsdl in:
c:\myproject\build\build\tmpxml\MyProject.wsdl
instead of:
c:\myproject\build\tmpxml\MyProject.wsdl
Since the basedir on the project is set to: ../ I would expect it to look for the wsdl relative to one directory higher. In fact this is how even the destdir attribute works. The way the wsdl attribute references files seems to be different from destdir and most other ant tasks I've seen.
Am I completely stupid and just missing something or does this not seem right?
Thanks.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240482#4240482
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240482
15 years, 6 months
[JBossWS] - Re: JBOSS-5.1.0.GA web service client doesn't work ( runtime
by rangalo
This was indeed a missing jars in classpath problem.
I had to add following to the classpath:
| $ echo $CLASSPATH
| jboss_libs/jboss-common-core.jar:jboss_libs/jbossall-client.jar:jboss_libs/jbossws-spi.jar:jboss_libs/jbossws-native-core.jar:jboss_libs/jbossws-native-client.jar::jboss_libs/jaxb-impl.jar:jboss_libs/jboss-xml-binding.jar:jboss_libs/stax-api.jar:jboss_libs/wstx.jar:jboss_libs/jboss-logging-jdk.jar:jboss_libs/jboss-logging-spi.jar:jboss_libs/jbossws-common.jar:jboss_libs/wsdl4j.jar:jboss_libs/mail.jar:jboss_libs/policy.jar:jboss_libs/commons-logging.jar:jboss_libs/javassist.jar:jboss_libs/jboss-remoting.jar
|
All these libs were from jboss/client
But after the client started working, I had following exception in server.log.
| 3:29:21,925 ERROR [[HelloBean]] Servlet.service() for servlet HelloBean threw exception
| java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
| at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:441)
| at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:87)
| at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:169)
| at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.createSOAPMessage(SOAPFaultHelperJAXWS.java:295)
| at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.toSOAPMessage(SOAPFaultHelperJAXWS.java:256)
| at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.exceptionToFaultMessage(SOAPFaultHelperJAXWS.java:187)
| at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.createFaultMessageFromException(SOAP11BindingJAXWS.java:102)
| at org.jboss.ws.core.CommonSOAPBinding.bindFaultMessage(CommonSOAPBinding.java:671)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:496)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
| at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
|
|
On client side it looks like following:
| $ wsrunclient.sh -cp "dist/hello-client.jar:jboss-generated:lib:$CLASSPATH" com.hardik.mejb.JAXWSClient
| http://localhost:8080/hello-ws-hello-ws/HelloBean?WSDL
| [Fatal Error] :-1:-1: Premature end of file.
| 2: null
|
I installed JBOSS from jboss-5.1.0.GA-jdk6.zip file.
thanks & regards.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240300#4240300
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240300
15 years, 6 months