311.5. 멀티 파트 메시지


Camel 2.8.1에서 사용 가능

다중 부분ECDHE 메시지는 ServiceInterfaceStrategy에서 지원됩니다. ServiceInterfaceStrategy는ECDHE-WS 2.2에 따라 주석이 달린 서비스 인터페이스 정의로 초기화되어야 하며 Document Bare 스타일의 요구 사항을 충족해야 합니다. target 메서드가 다음 기준을 충족해야 합니다. 1) 헤더 또는 비-header 매개변수에 가장 많은 항목이 있어야 합니다. 2) void 이외의 반환 유형이 없거나 헤더가 아닌 매개 변수가 없는 경우 3) 반환 유형이 유효하지 않은 경우 3) 헤더 또는 비 헤더 매개 변수에 대부분 있어야 합니다.

매핑 전략이 요청 매개변수 또는 응답 매개변수에 적용되는지 여부를 나타내는 boolean 매개변수를 사용하여 ServiceInterfaceStrategy를 초기화해야 합니다.

ServiceInterfaceStrategy strat =  new ServiceInterfaceStrategy(com.example.customerservice.multipart.MultiPartCustomerService.class, true);
SoapJaxbDataFormat soapDataFormat = new SoapJaxbDataFormat("com.example.customerservice.multipart", strat);
Copy to Clipboard Toggle word wrap

311.5.1. 멀티 파트 요청

멀티 파트 요청의 페이로드 매개변수는 대상 작업의 서명을 반영하는 BeanInvocation 오브젝트를 사용하여 initiazlied됩니다. camel-soap DataFormat은 marshal() 프로세서가 호출될 때 BeanInvocation 의 콘텐츠를ECDHE 헤더 및 본문의 필드에 매핑합니다.

BeanInvocation beanInvocation = new BeanInvocation();

// Identify the target method
beanInvocation.setMethod(MultiPartCustomerService.class.getMethod("getCustomersByName",
    GetCustomersByName.class, com.example.customerservice.multipart.Product.class));

// Populate the method arguments
GetCustomersByName getCustomersByName = new GetCustomersByName();
getCustomersByName.setName("Dr. Multipart");

Product product = new Product();
product.setName("Multiuse Product");
product.setDescription("Useful for lots of things.");

Object[] args = new Object[] {getCustomersByName, product};

// Add the arguments to the bean invocation
beanInvocation.setArgs(args);

// Set the bean invocation object as the message body
exchange.getIn().setBody(beanInvocation);
Copy to Clipboard Toggle word wrap

311.5.2. 멀티 파트 대응

멀티 파트 비누 응답은 비누 본문의 요소를 포함할 수 있으며, soap 헤더에 하나 이상의 요소를 갖습니다. camel-soap DataFormat은 soap 본문의 요소(있는 경우)의 요소를 해제 해제하여 교환에서 아웃 메시지의 본문에 배치합니다. 헤더 요소는ECDHEB 매핑된 오브젝트 유형으로 마샬링 되지 않습니다. 대신, 이러한 요소는 camel out 메시지 헤더 org.apache.camel.dataformat.soap.UNMARSHALLED_HEADER_LIST 에 배치됩니다. 요소는 요소 인스턴스 값으로 표시되거나 ignoreJAXB ECDHE 속성에 대한 설정에 따라 달라집니다. 이 속성은 camel-jaxb에서 상속됩니다.

ignoreUnmarshalledHeaders 값을 true 로 설정하여 camel-soap DataFormate 헤더 콘텐츠를 all-together를 무시할 수도 있습니다.

311.5.3. 보유 오브젝트 매핑

ECDHE-WS는 In/OutOut 매개변수에 대한 유형 매개 변수 사용을 지정합니다. Holder 오브젝트는 BeanInvocation 을 빌드할 때 사용할 수 있습니다. 또는 매개변수화된 유형의 인스턴스를 직접 사용할 수 있습니다. camel-soap DataFormat marshals Holder 값은 Holder의 값 클래스에 대한 mappings mapping에 따라 제공됩니다. 'Holder 오브젝트의 매핑은 unmarshalled 응답에 제공되지 않습니다.

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat