-
Sub-task
-
Resolution: Done
-
Undefined
-
None
-
False
-
-
False
-
-
-
0
Here is a proposal of a text to include in release notes of CEQ 2.13.1:
----8<------
CEQ-5348 WS-SecurityPolicy, WS-Trust
When using WS-SecurityPolicy or WS-Trust in combination with a Camel CXF consumer ( via from("cxf:...") clause), the SOAP endpoint throws the exception SoapFault: BSP:R3227: A SECURITY_HEADER MUST NOT contain more than one TIMESTAMP. It is possible to workaround this issue by deploying the SOAP endpoint in the way foreseen by Quarkiverse CXF extension.
First, you need an implementation of your the service endpoint interface (SEI) that forwards your message to a Camel route.
If the SEI is
@WebService(targetNamespace = "https://quarkiverse.github.io/quarkiverse-docs/quarkus-cxf/ws-securitypolicy") public interface WssSecurityPolicyHelloService { @WebMethod String sayHello(String name); }
then the implementation could be something like
@WebService(portName = "EncryptSecurityServicePort", serviceName = "WssSecurityPolicyHelloService", targetNamespace = "https://quarkiverse.github.io/quarkiverse-docs/quarkus-cxf/ws-securitypolicy", endpointInterface = "org.apache.camel.quarkus.component.cxf.soap.securitypolicy.server.cxf.way.it.WssSecurityPolicyHelloService") public class WssSecurityPolicyHelloServiceImpl implements WssSecurityPolicyHelloService { @Inject ProducerTemplate producerTemplate; public String sayHello(String name) { return producerTemplate.requestBody("direct:myDirectEndpoint", name, String.class); } }
Second, you need to configure in application.properties under which path the service will be served:
quarkus.cxf.path=/soap
quarkus.cxf.endpoint."/security-policy-hello".implementor=org.apache.camel.quarkus.component.cxf.soap.securitypolicy.server.cxf.way.it.WssSecurityPolicyHelloServiceImpl
So where your Camel route would normally start from("cxf:bean:myCxfHelloEndpoint") you would now have from("direct:myDirectEndpoint").
CEQ-5286 MTOM Attachments: Unmarshalling Error when invoking a CXF service with an AWT Image parameter
If your Service Endpoint Interface (SEI) refers to java.awt.Image in any of its method signatures, then the endpoint throws an error like any of the following:
- {{Unmarshalling Error: unexpected element (uri:"", local:"arg0"). Expected elements are (none) }}
- Unmarshalling Error: unexpected element (uri:"https://quarkiverse.github.io/quarkiverse-docs/quarkus-cxf/test/mtom-awt", local:"data"). Expected elements are (none)
You can workaround this issue by wrapping java.awt.Image inside request or response data objects. I.e. instead of having
@WebService(name = "ImageService", targetNamespace = ImageService.NS) @MTOM public interface ImageService { public static final String NS = "https://quarkiverse.github.io/quarkiverse-docs/quarkus-cxf/test/mtom-awt"; @WebMethod Image downloadImage(@WebParam(name = "name", targetNamespace = NS) String name); @WebMethod String uploadImage(String name, Image image); }
you need to have something like
@WebService(name = "ImageService", targetNamespace = ImageService.NS) @MTOM public interface ImageService { public static final String NS = "https://quarkiverse.github.io/quarkiverse-docs/quarkus-cxf/test/mtom-awt"; @WebMethod ImageData downloadImage(@WebParam(name = "name", targetNamespace = NS) String name); @WebMethod String uploadImage(ImageData image); } @XmlType(name = "imageData", namespace = "http://org.jboss.ws/xop/doclit") public class ImageData { private Image data; private String name; public ImageData() { } public String getName() { return name; } public void setName(String name) { this.name = name; } public Image getData() { return data; } public void setData(Image data) { this.data = data; } }
CEQ-5287 CXF clients with a class with postponed initialization in their method signatures cannot be compiled to native
When a client of Service Endpoint Interface (SEI) refers to java.awt.Image in any of its method, then the application cannot be compiled to native. There is no workaround known, but the affected clients can still be flawlessly used in JVM mode.
----8<------