One solution to this problem is to subclass and use your own
ObjectServiceFactory and in the create method, create the ResolverWSDLLocator
with the a baseUri that is the string-value of the wsdlUrl instead
of the default ObjectServicesFactory value of null.
In my case I created a BaseUriResolvingServiceFactory extending from
JAXWSServiceFactory with this create method
public Service create(Class clazz, QName name, URL wsdlUrl, Map properties) {
if (properties == null)
properties = new HashMap();
properties.put(ALLOW_INTERFACE, Boolean.TRUE);
try {
return create(clazz, name, WSDLFactory.newInstance()
.newWSDLReader().readWSDL(new ResolverWSDLLocator(wsdlUrl.toString(),
new InputSource(wsdlUrl.openStream()))),
properties);
} catch (WSDLException e) {
throw new XFireRuntimeException("Could not load WSDL.", e);
} catch (IOException e) {
throw new XFireRuntimeException("Could not load WSDL.", e);
}
And wire it in the server.client.beans.xml and client.beans.xml files
<bean name="xfire.jaxwsServiceFactory"
class="org.something.BaseUriResolvingServiceFactory">
<constructor-arg index="0">
<ref bean="xfire.transportManager" />
</constructor-arg>
</bean>
If this was overly complicated, please dont hesitate to suggest another
solution.
Best Regards
-Thomas
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email