cxf

CXF 2.7.3 give error with spring 3.2.1.RELEASE possible conflict with libraries

谁说胖子不能爱 提交于 2020-01-05 06:53:50
问题 I have a project prev working fine with Spring 3.0.1 and apache CXF 2.4, but as there were memory leak issues in apache CXF 2.4 I have upgrade to version apache CXF 2.7.3 but it is not working with either spring 3.0.1 nor latest spring version Spring version 3.2.1. Exception is provided below. I am using maven and provided depedencies in pom.xml Feb 27, 2013 11:16:05 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Allocate exception for servlet CXFServlet java.lang

Please advise on the WSDL

那年仲夏 提交于 2020-01-05 04:29:29
问题 I have created a WSDL to create a greeting service. Given below is the WSDL. I am using thsi wsdl to create a generate and expose a web-service using the cxf:proxy-service in mule. This is giving me errors. Please review and help me undertand what is the problem with this WSDL. <?xml version='1.0' encoding='UTF-8'?> <wsdl:definitions name="HelloService" targetNamespace="http://example.org/HelloService" xmlns:tns="http://example.org/HelloService" xmlns:ns1="http://schemas.xmlsoap.org/soap/http

override http status with cxf

心不动则不痛 提交于 2020-01-05 03:30:13
问题 I'm using CXF for web services. Because of some client restrictions, I need all web faults to return code 200 instead of 500. I tried to use interceptors, depends on the phase I was able to either override the status and then the response is empty or the response is full with the fault but then the status is not overridden. Any ideas how to do that? Using interceptors, what would be the right phase? I registered the interceptor like this: @org.apache.cxf.interceptor.OutFaultInterceptors

How do I get the response payload of a REST service from the Message of an outgoing Interceptor?

房东的猫 提交于 2020-01-05 02:35:08
问题 I have written a interceptor in the outgoing chain in the SEND phase and I want to get the payload of the response of my REST service into a String variable. How can I achieve this? Here is my interceptor public class MyLoginOutInterceptor extends LoggingOutInterceptor { public MyLoginOutInterceptor() { super(Phase.SEND); } @Override public void handleMessage(Message message) throws Fault { OutputStream os = message.getContent(OutputStream.class); } } When I put a breakpoint to the

An API incompatibility was encountered while executing org.apache.maven.plugins:maven-shade-plugin:1.3.1:shade: java.lang.AbstractMethodError: null

有些话、适合烂在心里 提交于 2020-01-05 02:30:28
问题 While trying to build an old version of Apache CXF 2.2.2, I kept getting an error produced by an XmlAppendingTransformer used by the maven-shade-plugin : unable to connect to get the DTD for http://java.sun.com/dtd/properties.dtd (referenced by the file META-INF/cxf/extensions.xml ) I have tried to fix this problem by using the ignoreDtd option provided by maven-shade-plugin starting with version 1.3.1. But now I am getting another more weird error: [ERROR] Failed to execute goal org.apache

How to catch any exceptions in a SOAP webservice method?

跟風遠走 提交于 2020-01-05 00:55:28
问题 I'm offering a SOAP @WebMethod using Spring and CXF . And I would like to catch any exceptions (checked and unchecked) and transform them to a custom @WebFault . Can I somehow assign a erro-handler/interceptor to my @WebSerivce class so that I don't have to provide extra try-catch blocks for every webserivce method? <jaxws:endpoint implementor="de.MyService" address="/MyService" /> @Component @WebService public class MyService { @WebMethod public void test() throws MyException { try { service

Passing uniform webservices through Camel

五迷三道 提交于 2020-01-04 14:12:22
问题 I'm contemplating using Camel for my project and would like to know if it's feasable or camel is not a good choice. I need multiple clients running same exact application to exchange information via web services (CXF or AXIS). The exchange will go through a central hub that will do a content based routing from one client to the other and will also log this communication in the database. The hub will also route one client's response to another when the responses come in. There could be a large

CXF/JAXB Code-first service: modify XMLSchemaType of inputs

纵然是瞬间 提交于 2020-01-04 07:52:07
问题 I am working on a CXF/JAXB code-first web service. I would like to be able to modify the WSDL definitions of some of the inputs. For example, given the following interface snippet: @WebMethod public void Something(@WebParam(name="date") Date date); The WSDL will generate the XMLSchema for the input "date" to be a "datetime" xml element. I would like it to be simply a "date" element instead. It would also be nice to be able to specify the some of the other input attributes, such as minOccurs,

Handle Authentication and Authorization in jax-rs webservice with cxf

隐身守侯 提交于 2020-01-04 06:55:07
问题 I have a webapp which has jsps. am not using any struts or mvc framework. We have JAX-RS service build using Apache CXF. Now i want to do following Allow user to login with username and password. For all subsequent calls to webservice, same authentication info should be used. Logged in user has some details (profile photo, full name), which i want to keep it constant across session. Also, its role are defined. Based on role(s) only certain jax-rs calls will be allowed. Roles are also used in

Apache CXF REST multipart upload, encoding exception

隐身守侯 提交于 2020-01-04 03:46:06
问题 I want to upload a file using multipart form data and have problems with URLDecoder. The service code follows: @POST @Path("/document") @Consumes(MediaType.MULTIPART_FORM_DATA) public Response storeTravelDocument( @Context UriInfo uriInfo, @FormParam(value = "IDNR") String idnr, @FormParam(value="DOCNR") String documentNr, @FormParam(value="ISSUE_DATE") String issueDate, @Multipart(value = "image", type="image/jpeg") InputStream pictureStream) {.. I tested with three clients, for example rest