It took me a while to get cxf working in Java dsl also, and the way I did
it is like this:

------------
CxfComponent cxfComponent = new CxfComponent(getContext());
CxfEndpoint serviceEndpoint = new CxfEndpoint("{{InputUrl}}", cxfComponent);
serviceEndpoint.setServiceClass(PortType.class);
serviceEndpoint.setDataFormat(DataFormat.RAW);

from(serviceEndpoint).routeId(getClass().getName().toString())
.streamCaching()
------------

On Wed, Oct 28, 2020 at 10:52 PM Peter Turányi <peter.tura...@pobox.sk>
wrote:

> Thank you
>
> I have got dependencies
>
> <dependency>
>
>     <groupId>org.apache.camel</groupId>
>
>     <artifactId>camel-http</artifactId>
>
>     <version>${camel-version}</version>
>
> </dependency>
>
> <dependency>
>
>     <groupId>org.apache.camel</groupId>
>
>     <artifactId>camel-soap</artifactId>
>
>     <version>${camel-version}</version>
>
> </dependency>
>
> <dependency>
>
>     <groupId>org.apache.camel</groupId>
>
>     <artifactId>camel-cxf</artifactId>
>
>     <version>${camel-version}</version>
>
> </dependency>
>
> I have tried add cxf-rt-transports-http-jetty but I have not luck.
> Exception remains. (version <camel-version>2.20.1</camel-version> is not
> available. So I get another available version.)
>
>
>
> I have changed start to
>
> from("cxf:bean:serviceEndpoint?wsdlURL=C:/RedHat/workspace/soap2soapSpring/src/main/resources/CountryInfoProxyService.wsdl&dataFormat=PAYLOAD")
>
> and I have defined serviceEndpoint like this
>
> CxfComponent cxfComponent = new CxfComponent(getContext());
> CxfEndpoint serviceEndpoint = new CxfEndpoint("/countryInfoProxyService", 
> cxfComponent);
> serviceEndpoint.setAddress("http://localhost:8081/countryInfoProxyService";);
> serviceEndpoint.setServiceClass(CountryInfoProxyServicePortType.class);
> serviceEndpoint.setDefaultOperationName("FullCountryInfo");
>
>
>
> Now I get
>
>
>
> org.apache.camel.RuntimeCamelException:
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> FullCountryInfo:
> Route(FullCountryInfo)[[From[cxf:bean:serviceEndpoint?wsdlUR... because of
> Failed to resolve endpoint:
> cxf://bean:serviceEndpoint?dataFormat=PAYLOAD&wsdlURL=C%3A%2FRedHat%2Fworkspace%2Fsoap2soapSpring%2Fsrc%2Fmain%2Fresources%2FCountryInfoProxyService.wsdl
> due to: No bean could be found in the registry for: serviceEndpoint of
> type: org.apache.camel.component.cxf.CxfEndpoint
> Thank you in advance
>
> _____________________________________________________________
> > Od: "dimas [via Camel]" <ml+s465427n5891975...@n5.nabble.com>
> > Komu: "PT" <peter.tura...@pobox.sk>
> > Dátum: 26.10.2020 19:01
> > Predmet: RE: Camel CXF with SOAP 1.1 and SOAP 1.2
> >
> Did you tried to look it up?
>
>
> https://www.google.com/search?rlz=1C1CHBF_enCA774CA774&ei=4w2XX_6qJ4jg-gTjhqnYAw&q=cxf+camel+java.io.IOException%3A+Could+not+find+destination+factory+for+transport+http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fhttp&oq=cxf+camel+java.io.IOException%3A+Could+not+find+destination+factory+for+transport+http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fhttp&gs_lcp=CgZwc3ktYWIQA0oFCAQSATFKBQgHEgExSgUICRIBMUoGCAoSAjI4UOBbWONsYONyaABwAHgAgAEAiAEAkgEAmAEDoAEBqgEHZ3dzLXdpesABAQ&sclient=psy-ab&ved=0ahUKEwi-qLu96tLsAhUIsJ4KHWNDCjsQ4dUDCA0&uact=5
>
> seems like you are missing
> <dependency>
>             <groupId>org.apache.cxf</groupId>
>             <artifactId>cxf-rt-transports-http-jetty</artifactId>
>             <version>${cxf.version}</version>
>         </dependency>
>
>
> From: Peter Turányi [mailto:[hidden email]
> <http://user/SendEmail.jtp?type=node&node=5891975&i=0>]
> Sent: Monday, October 26, 2020 3:23 AM
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=5891975&i=1>
> Subject: Re: Camel CXF with SOAP 1.1 and SOAP 1.2
>
> Thank you for suggestions.
>
> I have constructed CXF startpoint in route according to documantation
> from("cxf:CountryInfoProxyService:countryInfoProxyService?wsdlURL=C:/RedHat/workspace/soap2soapSpring/src/main/resources/CountryInfoProxyService.wsdl&dataFormat=PAYLOAD").routeId("FullCountryInfo")
>
>
> beanId CountryInfoProxyService is serviceClass generated by
>  cxf-codegen-plugin WSDL2JAVA
>
> Now I get
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> FullCountryInfo:
> Route(FullCountryInfo)[[From[cxf:CountryInfoProxyService:cou... because of
> ServiceConstructionException
> Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
> null
> Caused by: java.io.IOException: Could not find destination factory for
> transport http://schemas.xmlsoap.org/soap/http [schemas.xmlsoap.org]<
> https://urldefense.com/v3/__http:/schemas.xmlsoap.org/soap/http__;!!LdWlNaMnLCM!JuoAzISqr7WndIRMa7A0CFXNRhfB-4DVjAoMHCfc3HAFp_orciSO3AHOpepTRtn5IlaW$>
>
>
> Thank you for help in advance

Reply via email to