[jboss-user] [JBossWS] - Re: Writing a client - no examples for BindingProvider based
mjhammel
do-not-reply at jboss.com
Mon Jan 14 10:50:48 EST 2008
"jeff norton" wrote :
| What is your classpath? And what old jars did you need to remove? I have a similar problem getting a client to connect to a web service that has basic authentication enabled. On the service.create(wsdlURL, QName) call I get (my client worked fine before I enabled basic authentication):
|
| | org.jboss.ws.metadata.wsdl.WSDLException: Cannot parse wsdlLocation: http://localhost:8080/foo?wsdl
| |
|
To compile the client, my classpath includes the source to the client, the classes generated by wsconsume and the following:
<path id="client.wsconsume.classpath">
| <fileset dir="${jboss.lib.dir}/endorsed">
| <include name="xercesImpl.jar"/>
| </fileset>
| <fileset dir="${jboss.client.lib.dir}">
| <include name="*.jar"/>
| <exclude name="jaxws-rt.jar"/>
| </fileset>
| <fileset dir="${java.lib.dir}">
| <include name="tools.jar"/>
| </fileset>
| </path>
where
jboss.lib.dir = ${jboss.home}/lib
| jboss.client.lib.dir = ${jboss.home}/client
| java.lib.dir = ${java.home}/lib
I got rid of axis and mail libraries which were being used in the old build. I'm not using Axis in the new project (at least not yet). I also no longer reference an in-build copy of jboss-j2ee.jar (though this is still referenced from the jboss.client.lib.dir) and javax.servlet.jar which were used in the old build (note that I inherited some of this so wasn't clear on why some of those were being used in the first place).
I ran into your problem with not finding the WSDL location after switching to Basic Authentication. In order to get around this I don't try to retrieve the WSDL file from the server during the client build. I have the server side build generate the WSDL file for me using wsprovide, then the client side build reads that file instead of trying to retrieve the WSDL via a URL. My wsconsume looks like this now:
<wsconsume
| fork="true"
| verbose="true"
| destdir="${build.client.classes.dir}"
| sourcedestdir="${build.client.dir}"
| keep="true"
| wsdl="${build.server.dir}/resources/SubscriberServicesService.wsdl">
| <!-- wsdl="http://127.0.0.1:8080/Crunch?wsdl"> -->
| </wsconsume>
My wsprovide looks like this:
<wsprovide
| fork="false"
| keep="true"
| destdir="${build.server.dir}/wsdl"
| resourcedestdir="${build.server.dir}/resources"
| sourcedestdir="${build.server.dir}/source"
| genwsdl="true"
| verbose="true"
| sei="com.cei.crunch.server.ws.SubscriberServices.SubscriberServices">
| <classpath>
| <pathelement path="${build.server.classes.dir}/server"/>
| </classpath>
| </wsprovide>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119695#4119695
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119695
More information about the jboss-user
mailing list