cxf

cxf setting Nonce and created in SOAP wsse header

拟墨画扇 提交于 2021-02-11 13:27:46
问题 I wanted to inject Nonce and Created element in WSSE security header using CXF. <soapenv:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:UsernameToken wsu:Id="UsernameToken-6"> <wsse:Username>==Username==</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0

Disable wadl Web Service Definition In CXF

谁都会走 提交于 2021-02-11 06:55:54
问题 I am using CXF webservice and everything is working perfectly. But as I am going to expose our webservice to public the wadl url is working from public. Anyone can see the wadl definition of our webservice. How can we disable this definition. e.g. the url for wadl is - http://localhost:8080/webservice/rest?_wadl 回答1: Try adding this to jaxrs:server , this will hide the endpoint exposed by the jaxrs:server address <jaxrs:properties> <entry key="org.apache.cxf.endpoint.private" value="true"/> <

Dynamic web service client from wsdl

半腔热情 提交于 2021-02-11 06:16:51
问题 One of my system need to invoke SOAP based webservices. As of now, for every new webservices, I generate Java stubs from the provided WSDL file and redeploy the web application with new webservice consumer code. Is there a good approach to dynamically create a webservice client that can invoke the methods from the provided WSDL files? All I am expecting is put the WSDL file in the location that can be accessed by the web application invoke the Servlet with a keyword having the wsdl file name,

Apache CXF default POST request body with Jackson

霸气de小男生 提交于 2021-02-10 06:51:55
问题 In an Apache CXF JAX-RS project I'm working on, I've configured the JSON provider to be Jackson. This generally works, but I'd like the POST request body to always be not null , so that if a client sends a request with an empty body (no JSON {} ), I'd still get a default POJO. E.g. CXF side: @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Path("/foo") public Response postFoo(FooObj foo) { if (foo == null) return Response.ok("No foo"); else return

Apache CXF default POST request body with Jackson

匆匆过客 提交于 2021-02-10 06:51:38
问题 In an Apache CXF JAX-RS project I'm working on, I've configured the JSON provider to be Jackson. This generally works, but I'd like the POST request body to always be not null , so that if a client sends a request with an empty body (no JSON {} ), I'd still get a default POJO. E.g. CXF side: @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Path("/foo") public Response postFoo(FooObj foo) { if (foo == null) return Response.ok("No foo"); else return

Specification and correct use of (boolean) URI matrix parameters (and making them optional when using CXF/JAXB)?

℡╲_俬逩灬. 提交于 2021-02-09 11:52:09
问题 I was wondering if the "proper" use of URI/URL matrix parameters was ever defined in a specification, such as an RFC or a W3 recommendation? In particular, I just joined a project where we use matrix parameters and a Java framework to implement a REST service. One of the matrix parameters we have for our REST service is a boolean one, much like ;sortByDate=true What bugged me about this one is that the Java framework we use apparently insists that boolean parameters are always passed in (i.e.

Preflight OPTIONS request to SOAP service does not work

巧了我就是萌 提交于 2021-02-07 21:48:44
问题 What I want to do : Call a cross-domain SOAP-Service from JavaScript using jQuery with the jQuery Soap plugin (by Remy Blom). (that is, I call $.soap(); in JavaScript) What I did : CORS Setting on the server side (CXF) are working (using the org.eclipse.jetty.servlets.CrossOriginFilter ), so the following is present in the answer: Access-Control-Allow-Head... X-Requested-With,Content-Type,Accept,Origin Access-Control-Allow-Meth... GET,POST,OPTIONS,HEAD Access-Control-Allow-Orig... http:/

Preflight OPTIONS request to SOAP service does not work

百般思念 提交于 2021-02-07 21:48:31
问题 What I want to do : Call a cross-domain SOAP-Service from JavaScript using jQuery with the jQuery Soap plugin (by Remy Blom). (that is, I call $.soap(); in JavaScript) What I did : CORS Setting on the server side (CXF) are working (using the org.eclipse.jetty.servlets.CrossOriginFilter ), so the following is present in the answer: Access-Control-Allow-Head... X-Requested-With,Content-Type,Accept,Origin Access-Control-Allow-Meth... GET,POST,OPTIONS,HEAD Access-Control-Allow-Orig... http:/

How do I drop an inbound XML element with a Transform in CXF?

天大地大妈咪最大 提交于 2021-02-07 07:56:20
问题 I'm using CXF (v2.7.10) in a client that is consuming the MS Exchange Web Service (EWS). I'm finding that one of the elements returned by EWS (UniqueHash) contains characters that are invalid in XML v1.0. As I have no control over this I'm trying to use an inbound interceptor to drop the UniqueHash elements (I don't need them) like this: Map<String, String> inTransformMap = Collections.singletonMap( "{http://schemas.microsoft.com/exchange/services/2006/types}UniqueHash", "");

How do I drop an inbound XML element with a Transform in CXF?

回眸只為那壹抹淺笑 提交于 2021-02-07 07:55:06
问题 I'm using CXF (v2.7.10) in a client that is consuming the MS Exchange Web Service (EWS). I'm finding that one of the elements returned by EWS (UniqueHash) contains characters that are invalid in XML v1.0. As I have no control over this I'm trying to use an inbound interceptor to drop the UniqueHash elements (I don't need them) like this: Map<String, String> inTransformMap = Collections.singletonMap( "{http://schemas.microsoft.com/exchange/services/2006/types}UniqueHash", "");