2.4. 알려진 CXF 문제
- CEQ-5348 WS-SecurityPolicy, WS-Trust
-
Camel CXF 소비자와 함께 WS-SecurityPolicy 또는 WS-Trust 를 사용하는 경우 (예:
("cxf:…") .이(예: "cxf:…")에서다음 예외가 발생합니다.
SoapFault: BSP:R3227: A SECURITY_HEADER MUST NOT contain more than one TIMESTAMP
Quarkiverse CXF 확장과 동일한 방법을 사용하여 CHAP 끝점을 배포하여 이 문제를 해결할 수 있습니다.
먼저 메시지를 Camel 경로로 전달하는 SEI(Service Endpoint Interface)를 구현해야 합니다. 예를 들어 SEI가 다음과 유사한 경우:
@WebService(targetNamespace = "https://quarkiverse.github.io/quarkiverse-docs/quarkus-cxf/ws-securitypolicy")
public interface WssSecurityPolicyHelloService {
@WebMethod
String sayHello(String name);
}
그런 다음 SEI 구현을 다음과 같이 구성해야 합니다.
@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);
}
}
다음으로 application.properties 파일에서 서비스를 제공할 경로를 구성해야 합니다. 예를 들면 다음과 같습니다.
quarkus.cxf.path=/soap
quarkus.cxf.endpoint."/security-policy-hello".implementor=org.apache.camel.quarkus.component.cxf.soap.securitypolicy.server.cxf.way.it.WssSecurityPolicyHelloServiceImpl
Camel 경로가 일반적으로 ("cxf:myCxfHelloEndpoint") 로 시작하는 이 예에서는 이제 "direct:myDirectEndpoint" 로 시작됩니다.
- ovirtQ-5286 MTOM Attachments: AWT Image 매개변수로 CXF 서비스를 호출할 때 오류 해제
메서드 서명 중 하나에서 SEI(Service Endpoint Interface)가
java.awt.Image를 참조하는 경우 끝점에서 다음과 유사한 오류가 발생합니다.-
{{unmarshalling Error: unexpected element (uri:"", local:"arg0"). 예상 요소는 (none) }}입니다. -
Unmarshalling Error: unexpected element (uri:"https://quarkiverse.github.io/quarkiverse-docs/quarkus-cxf/test/mtom-awt", local:"data"). 예상 요소는 (없음)
-
요청 또는 응답 데이터 오브젝트 내에서 java.awt.Image 를 래핑하여 이 문제를 해결할 수 있습니다. 예를 들어 SEI를 다음과 같이 구성할 수 있습니다.
@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);
}
이 해결 방법을 사용하려면 다음과 같이 SEI를 구성해야 합니다.
@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;
}
}
- method signatures에서 postponed 초기화가 있는 클래스가 포함된 hieradata Q-4769 CXF 클라이언트는 네이티브로 컴파일할 수 없습니다.
-
메서드에서 SEI(Service Endpoint Interface) 클라이언트가
java.awt.Image를 참조하는 경우 애플리케이션은 네이티브로 컴파일할 수 없습니다. 이 문제에 대한 해결방법은 없지만 JVM 모드에서 영향을 받는 클라이언트를 계속 사용할 수 있습니다.