Hi all,

I'm working on a web service client migration from jax-rpc to jax-ws using
cxf.
Everything was working fine with the jax-rpc client thus I know that the ws
is ok.
Note that this is a secure ws so the client must give a user/passwor and
having a trustStore (at least with jax-rpc, this was the way of configuring
security)

Ok, first thing done was to generate the client using cxf-codegen-plugin
maven plugin, well there was some strange exception with message "method
annotated by @PostConstruct throws exception when invoked " but since the
code was generated I have continued ... 

The ws client must be a secured one, after looking at some docs, I have
added a cxf.xml configuration file to set some user/password (the truststore
is set programmatically).

here's the cxf.xml file used : 

<beans xmlns="http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns:sec="http://cxf.apache.org/configuration/security";
xmlns:http="http://cxf.apache.org/transports/http/configuration";
        xsi:schemaLocation="
          http://cxf.apache.org/configuration/security
          http://cxf.apache.org/schemas/configuration/security.xsd
          http://cxf.apache.org/transports/http/configuration
          http://cxf.apache.org/schemas/configuration/http-conf.xsd
          http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans.xsd";>

        <http:conduit
name="{http://anpe.fr/DirectoryServices/}StructureServicesSoap.http-conduit";>
                <http:authorization>
                        <sec:UserName>_svc_ws_test</sec:UserName>
                        <sec:Password>password</sec:Password>
                </http:authorization>
                <http:tlsClientParameters
secureSocketProtocol="SSL"></http:tlsClientParameters>
        </http:conduit>
</beans>  

When running the ws client the following exception occurs: 

javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException
        at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:240)
        at javax.xml.ws.Service.getPort(Service.java:94)
        at
fr.anpe.directoryservices.StructureServices.getStructureServicesSoap(StructureServices.java:59)
        at
fr.anpe.sapiens.services.structures.StructureServicesImpl.getStructureServicesWebServiceProxy(StructureServicesImpl.java:189)
        at
fr.anpe.sapiens.services.structures.StructureServicesImpl.getMailAddress(StructureServicesImpl.java:84)
        at
fr.anpe.sapiens.services.structures.StructureServicesTest.testGetMailAddress(StructureServicesTest.java:51)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
        at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createEndpoints(ReflectionServiceFactoryBean.java:170)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:155)
        at
org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpointFactory.java:83)
        at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:50)
        at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:82)
        at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:320)
        at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:238)
        ... 21 more
Caused by: org.apache.cxf.endpoint.EndpointException
        at
org.apache.cxf.endpoint.EndpointImpl.createBinding(EndpointImpl.java:130)
        at org.apache.cxf.endpoint.EndpointImpl.<init>(EndpointImpl.java:80)
        at
org.apache.cxf.jaxws.support.JaxWsEndpointImpl.<init>(JaxWsEndpointImpl.java:66)
        at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.createEndpoint(JaxWsServiceFactoryBean.java:152)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createEndpoints(ReflectionServiceFactoryBean.java:166)
        ... 27 more
Caused by: org.apache.cxf.BusException: No binding factory for namespace
http://schemas.xmlsoap.org/wsdl/http/ registered.
        at
org.apache.cxf.binding.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:78)
        at
org.apache.cxf.endpoint.EndpointImpl.createBinding(EndpointImpl.java:127)
        ... 31 more


It seems to be a problem of binding factory ... but I have really no idea
what the problem could be, this is where I need some help.

If you can solve the problem, then ... perfect ! but it may be a basic error
since I have little knowledge about jax-ws so any good pointers or tutorial
would be appreciated.

Thanks in advance,

Joel Costigliola



-- 
View this message in context: 
http://www.nabble.com/-Newbie--problem-%3A-No-binding-factory-for-namespace-http%3A--schemas.xmlsoap.org-wsdl-http--registered-tf4772481.html#a13652131
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to