cxf

WS-securitypolicy in cxf-bc deploy in servicemix

Hi, I was wondering if it is possible to build a cxf-bc with WS-SecurityPolicy instead of just the WS-Security. WS-SecurityPolicy seems to be a more elegant solution since everything is in the WSDL. Examples welcome. :) Well with David's help I got the CXF-BC to install and running on the ESB, but I can't seem to test it. It keeps c...

Get rid of redundant cast to javax.xml.bind.JAXBElement<java.lang.Boolean> warning from CXF-generated code

I generate some code using CXF from a WSDL-file. When compiling the code with version "1.6.0_16" with the flag -Xlint I get the following warning: warning: [cast] redundant cast to javax.xml.bind.JAXBElement<java.lang.Boolean> [javac] this.r = ((JAXBElement<Boolean> ) value); What does the warning mean, should I be worried?...

org.apache.cxf.interceptor.Fault: Unmarshalling Error: Duplicate default namespace declaration.

Not sure why I am receiving this after the webservice ran and I am trying to return back to my client side bean. The webservice works perfectly outside of my webserver in SoapUI. org.apache.cxf.interceptor.Fault: Unmarshalling Error: Duplicate default namespace declaration. at [row,col {unknown-source}]: [1,321] at org.apache.cxf...

validating wsdl/schema using cxf

I am having a hard time getting cxf to validate an xml request that my service creates for a 3rd party. My project uses maven. Here is my project structure Main Module : + Sub-Module1 = Application + sub-Module2 = Interfaces In Interfaces, inside src/main/resources I have my wsdl and xsd. so, src/main/resources + myw...

Skip maven2 plugin by default

Hello, I am looking for a way to not have a plugin execute on install. More specifically, my scenario is as follows: I am using org.apache.cxf:cxf-codegen-plugin to generate source code. Every time I clean+install the source is generated I only want generation of source code to happen when I explicitly request it. Any and all hel...

Apache CXF 2.2.7 Spring 3 Web Service Unmarshalling Error: unexpected element

Hi, I have developed a simple web service application using Apache CXF 2.2.7 and Spring 3, deployed onto Tomcat as a WAR file, but I'm getting the following error message: 12-Apr-2010 15:56:12 org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging WARNING: Interceptor for {http://services.aristabi.com/}ReportingServiceImplService#...

CXF Client Side Duplication of targetnamespace

I am hosting a webservice and a webapp on the same server, generated from wsdl2java. I can contact the service just fine through SoapUI and it returns a single namespace declaration when posted to the live server, but when I am working locally and use SoapUI it generates two instances of xlmns="" instead of a single one in my xml. I ha...

Using Apache Camel how do I unmarshal my deserialized object that comes in through a CXF Endpoint?

I have a very simple camel route. It starts with a CXF Endpoint exposed as a web service. I then want to convert it to xml and call a method on a bean. Currently i'm getting a CXF specific object after the web service call. How do I take my serialized object out of the CXF MessageList and use it going forward? My Route: <camel:route> ...

How to let Tomcat publish WSDL for the WS it provides (CXF 2.2, Spring 3, Tomcat6)

Hi, I am trying to implement a simple web service provider using Tomcat6, CXF 2.2, Spring 3, and actually the service itself runs fine (I can call web methods using the original WSDL and SoapUI). However, Tomcat returns a blank page on "?wsdl" requests. Also, when I try to manipulate the (would-be) published WSDL by adding a publishedEnd...

java.lang.NoSuchMethodError: org.w3c.dom.Document.setDocumentURI

I am getting a NoSuchMethodError error for org.w3c.dom.Document.setDocumentURI. This is strange, as I have rt.jar in the JAVA_HOME path. I am creating a web service using CXF, and the error seem to be coming out of CXF: java.lang.NoSuchMethodError: org.w3c.dom.Document.setDocumentURI(Ljava/lang/String;)V org.apache.cxf.staxutils.Stax...

Tutorial how to create a CXF web service from existing Java code and embed it in Tomcat

Do you know a tutorial how to create a CXF soap web service from existing Java code and embed it in Tomcat, and also generate a wsdl file so that any .NET system would be able to generate client code easily? I miss that WSDL creation point in, for example this http://www.ibm.com/developerworks/library/ws-pojo-springcxf/ tutorial. No wsd...

How to inject ServletContext for JUnit tests with Spring?

Hi I want to unit test a RESTful interface written with Apache CXF. I use a ServletContext to load some resources, so I have: @Context private ServletContext servletContext; If I deploy this on Glassfish, the ServletContext is injected and it works like expected. But I don't know how to inject the ServletContext in my service class...

How to provide server address to the Spring-configured Apache CXF-based web service client?

I'm experimenting with Apache CXF and have a question about the client part. Below is my current Spring configuration of the WS client of some com.example.customerservice.service.CustomerService: <jaxws:client name="com.example.customerservice.service.CustomerServiceClient" serviceName="customer:CustomerServiceService" endpoint...

Apache CXF 2.2.7 and Spring 3.0

Apache CXF is shipped with Spring 2.5.6, can I also use the Spring 3.0 framework without serious troubles. ...

Java REST implementation: Jersey vs CXF

What do you think is the advantages/disadvantages between this two libraries? Which of these two are best suited for production environment? By the way I will be using JSON instead of XML. I also would like to know what library is most supported by the community e.g. tutorials, documentation. ...

When the request xml with extra elements, return Unmarshalling Error in CXF 2.2.7

The wsdl as following: <xs:complexType name="GetCompositionDto"> <xs:complexContent> <xs:extension base="tns:baseDto"> <xs:sequence> <xs:element minOccurs="0" name="itemCode" type="xs:string"/> <xs:element minOccurs="0" name="compositionVersion" type="xs:string"/> </xs:sequence> </xs:extension> </xs:complexContent> ...

CXF: is it possible to generate a webservice response for specified method with specified data to string?

Hi, we are using cxf webservices with java server and .NET client. We generate WSDL file based on our java code, and MS Visual Studio automaticaly generate deserializers, based on WSDL. Now we need to add jms support to our app. Because we use both Java and .NET, we can only put serealized xml objects to jms mesage as a text (we can't p...

Cxf HTTPS client example

Hi all, I need a Cxf client which can deal with HTTPS wsdl url. The cxf documentation isn't really big, so i would appreciate some help. Is there any example of what i want ? google isn't my friend today :( Thx for helping me. EDIT1: I just don't know how to do this. When i try : JaxWsProxyFactoryBean factory = new JaxWsProxyFacto...

Request/Response objects

I'm planning on using CXF's rest implementation. I'm thinking of simply annotating my entity classes with jaxb annotations, such as @XmlRootElement, in order to create response objects. The benefit being avoidance of code duplication. As for the (client) request object, which will be used by a separate web app, I'm thinking of 'copying' ...

apache cxf: multiple endpoint /multipleCXFServlet servlet

Hi, I've a cxf webservice with multiple endpoint. I've succesfully deploy it. The problem is all endpoint's WSDL appear in the same servlet URL. Can i have 2 org.apache.cxf.transport.servlet.CXFServlet servlet in the same web.xml and each servlet serve one endpoint so that i have endpoint1 at http:/locahost/app/endpoint1 and endpoint2 ...