cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Pangburn <>
Subject RE: Can Dispatch API be used with jaxws:client Spring configuration?
Date Fri, 19 Aug 2011 19:54:27 GMT
When I debug into ServiceImpl line 610, it gets down to org.apache.cxf.configuration.spring.ConfigurerImpl
and line 151 throws:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.jaxws-client.proxyFactory'
is defined

This is caught and logged FINE, which amusingly has the comment:
            // users often wonder why the settings in their configuration files seem
            // to have no effect - the most common cause is that they have been using
            // incorrect bean ids

If I check my spring context and call context.getBeanDefinitionNames() I get the following
(among others):

It does not have an entry with that name from the exception.  The similar entry is does have
is from the id attribute, so I tried removing that id attribute (and other things) but leaving
the createdFromAPI (because that makes the .jaxws-client part of the name) from jaxws:client
and just leaving:
	<jaxws:client name="{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12"

Now the ConfigurerImpl matches the bean name and configured it and ServiceImpl line 621 does
apply the ws-addressing feature, but unfortunately the addressing is wrong.  Probably same
problem as yesterday when I tried configuring it via the cxf:bus, that code in DispatchImpl
is probably not enabling ws-addressing.  Also, it uses the address from the WSDL and ignores
the address in the jaxws:client element.

At least it's closer.


-----Original Message-----
From: Daniel Kulp [] 
Sent: Thursday, August 18, 2011 7:51 PM
Cc: Jesse Pangburn
Subject: Re: Can Dispatch API be used with jaxws:client Spring configuration?

This SHOULD be working.

Line 610 of calls off to the configureObject with the right 
name, so it should be configuring in the features and then copying them over 
at line 621.   Any chance you can debug through that code to see if anything 
looks strange?


On Thursday, August 18, 2011 3:11:40 PM Jesse Pangburn wrote:
> I'm trying to use the Spring jaxws:client configuration to put as much of
> the setup for my Dispatch API client into Spring as possible, but it seems
> to be ignoring it.
> The following is the code I'm using to setup the dispatch client:
> URL wsdlURL = new
> URL("file:/home/jpangburn/Desktop/IHE/XDSb.Support.Materials.v9/wsdl/XDS.b_
> DocumentRegistry.wsdl"); Service service = Service.create(wsdlURL, new
> QName("urn:ihe:iti:xds-b:2007", "DocumentRegistry_Service"));
> Dispatch<StaxSource> disp = service.createDispatch(new
> QName("urn:ihe:iti:xds-b:2007", "DocumentRegistry_Port_Soap12"),
> StaxSource.class, Service.Mode.PAYLOAD);
> So the port is "{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12".  In
> my Spring configuration I've tried this: <jaxws:client id="registryClient"
> name="{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12"
> address="http://localhost:30320/tf6/services/xdsregistryb"
> 	xmlns:ihe="urn:ihe:iti:xds-b:2007"
> endpointName="ihe:DocumentRegistry_Port_Soap12"
> serviceName="ihe:DocumentRegistry_Service"
> 	createdFromAPI="true">
> 	<jaxws:features>
> 		<wsa:addressing xmlns:wsa=""/>
> 	</jaxws:features>
> </jaxws:client>
> At first I hoped the "name" attribute would cause the matching at it would
> pick up my "address" attribute to set the destination address and my
> wsa:addressing feature to enable ws-addressing.  It did not, just sent to
> the same url defined in the WSDL.  So I added the endpointName and
> serviceName attributes, which also didn't help.  Then I added
> "createdFromAPI" which didn't do anything either.
> I know the Spring configuration is working to some degree because if I put
> in a http:conduit that works just fine: <http:conduit
> name="{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit">
> <http:tlsClientParameters disableCNCheck="true">
> 	...
> Is jaxws:client configuration just not related to the Dispatch API at all? 
> If so, why not?  This seems like it would be a nice way to setup address
> overrides, turn on/off jaxws:features, logging, interceptors, etc. for the
> Dispatch API.
> Thanks,
> Jesse
Daniel Kulp
Talend -

View raw message