cxf

Weblogic doesn't close files (but does close connections)

ε祈祈猫儿з 提交于 2019-12-24 06:04:18
问题 Dears, we're running into a 'too many open files' issue. We've made some progress but the issue is still there... We use cxf on weblogic on aix. relevant cxf configuration: <http-conf:conduit name="*.http-conduit"> <http-conf:client Connection="close" /> </http-conf:conduit> When executing this code: for(int i=0;i<1300;i++){ response = callService(request).call(); } (we don't intend to use this code in production but it's to troubleshoot the issue) -> the first run succeeds; -> the second run

XML Schema Creation Error - What is JAXB Doing?

为君一笑 提交于 2019-12-24 05:57:42
问题 I'm working on a project that involves a simple web service, and have had a slew of little problems. It's an Apache CXF webservice (using JAX-WS, over SOAP). The service itself is pretty simple: receive a request, insert the request into a database, and return whether the insert was successful. I'd like to rely on XML validation to enforce a number of constraints on the request. Full XML validation is very important to this project. So far, I've been unable to properly validate, though my

XML Schema Creation Error - What is JAXB Doing?

别等时光非礼了梦想. 提交于 2019-12-24 05:57:32
问题 I'm working on a project that involves a simple web service, and have had a slew of little problems. It's an Apache CXF webservice (using JAX-WS, over SOAP). The service itself is pretty simple: receive a request, insert the request into a database, and return whether the insert was successful. I'd like to rely on XML validation to enforce a number of constraints on the request. Full XML validation is very important to this project. So far, I've been unable to properly validate, though my

CXF & Camel : IllegalArgumentException: Get the wrong parameter size to invoke the out service

爱⌒轻易说出口 提交于 2019-12-24 05:55:08
问题 I recently came across this issue when trying to pass an XML to a Cxf Webservice within apache Camel. Caused by: java.lang.IllegalArgumentException: Get the wrong parameter size to invoke the out service, Expect size 1, Parameter size 2. Please check if the message body matches the CXFEndpoint POJO Dataformat request. at org.apache.camel.component.cxf.CxfProducer.checkParameterSize(CxfProducer.java:241) One of the XML tags included a comma, which seems to be the issue. 回答1: As it turned out,

Combining @Context and @RolesAllowed in a JAX-RS resource?

ぐ巨炮叔叔 提交于 2019-12-24 05:19:05
问题 Is it possible to use Context annotation and RolesAllowed annotation in a JAX-RS resource with Apache CXF 2.4.6 and Spring Security 3.2.8? My CXF configuration: <jaxrs:server address="/example"> <jaxrs:serviceBeans> <ref bean="myResourceImpl"/> </jaxrs:serviceBeans> </jaxrs:server> My Java source code: @Path("/myresource") public interface MyResource { @GET @Produces(MediaType.TEXT_XML) String get(); } @Named public class MyResourceImpl implements MyResource { @Context private SecurityContext

Apache CXF: Consume XML POST payload with “application/x-www-form-urlencoded” content type set

≯℡__Kan透↙ 提交于 2019-12-24 03:26:29
问题 We got a REST service implemtented in Apache CXF available for our client exposed like this: @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.TEXT_PLAIN) @Path("/process") public Response processBean(Bean bean); The Bean object is annotated with @XmlRootElement and all this works great. The problem is that the client is not setting the right content-type (should be "application/xml" but client sets "application/x-form-urlencoded"). Apache CXF is not regonizing the method as a

Consume SOAP webservice in java, only WSDL in hand

南楼画角 提交于 2019-12-24 02:57:30
问题 I need to consume a web service in java/jsp code. Only the WSDL is available for me to start. I understand I need to convert the WSDL into java client JAR file using AXIS2 / CXF but I cannot build the whole application on this. Can someone provide a simple example or basic steps for me to start on this? I am not able to join the dots here. WSDL, java client JAR, AXIS2.... All online tutorials point on 'creating' a web service. 回答1: WSDL is just the conract for the web service. You need to

WSDL binding URL changes protocol to HTTP when behind an SSL termination

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 02:05:47
问题 We have a simple jax-ws SOAP server backed by Apache CXF 3.2.6 in standalone (self-hosted) mode that uses an embedded Jetty. The server was generated wsdl-first using CXF's wsdl2java . WSDL is a file on the classpath, and that physical WSDL file has https://.... in the location attribute of the soapbind:address element. When started, the server publishes to http://0.0.0.0:8080 . The server also sits behind an SSL termination that routes https://external-name -> SSL termination -> http:/

CXF RequestContextFilter

ε祈祈猫儿з 提交于 2019-12-24 01:09:05
问题 http://cxf.apache.org/docs/30-migration-guide.html CXF RequestHandler and ResponseHandler filters have been removed, please use JAX-RS 2.0 ContainerRequestFilter and ContainerResponseFilter and also WriterInterceptor and ReaderInterceptor when needed. How to rewrite it? I cant find any examples taking org.apache.cxf.message.Message as a parameter and returning Response. Also I should use the ContainerResponseFilter public void filter(ContainerRequestContext containerRequestContext,

JAX-RS with CXF / rest-assured: Handling multiparam file upload

不问归期 提交于 2019-12-24 00:54:50
问题 I want to upload a JPG file and a JSON-serialized Java object. On the server I am using Apache CXF, on the client I am integration testing with rest-assured. My server code looks like: @POST @Path("/document") @Consumes(MediaType.MULTIPART_FORM_DATA) public Response storeTravelDocument( @Context UriInfo uriInfo, @Multipart(value = "document") JsonBean bean, @Multipart(value = "image") InputStream pictureStream) throws IOException {} My client code looks like: given(). multiPart("document",