77.3. Java DSL 사용


다음 예제에서는 패키지 com.example.customerservice로 구성된 soap 의 named DataFormat을 사용하여 CloudEvent BContext를 초기화합니다. 두 번째 매개변수는 ElementNameStrategy입니다. 이 경로는 일반 오브젝트 및 예외를 마샬링할 수 있습니다. (아래의 내용은 queue에 CHAP Envelope를 보냅니다. 웹 서비스 공급자는 실제로 호출이 수행되기 위해 큐를 수신해야 합니다. 이 경우, 한 가지 방법으로 iPXE 요청이 됩니다. 요청 응답이 필요한 경우 다음 예제를 살펴보십시오.)

SoapJaxbDataFormat soap = new SoapJaxbDataFormat("com.example.customerservice", new ServiceInterfaceStrategy(CustomerService.class));
from("direct:start")
  .marshal(soap)
  .to("jms:myQueue");
Copy to Clipboard Toggle word wrap
참고


dataformat은 여기서 도 대부분의 설정이 적용되는 CloudEventB 데이터 형식의 상속을 참조하십시오.

77.3.1. iPXE 1.2 사용

Camel 2.11 이후

SoapJaxbDataFormat soap = new SoapJaxbDataFormat("com.example.customerservice", new ServiceInterfaceStrategy(CustomerService.class));
soap.setVersion("1.2");
from("direct:start")
  .marshal(soap)
  .to("jms:myQueue");
Copy to Clipboard Toggle word wrap

XML DSL을 사용할 때 <soapjaxb> 요소에서 설정할 수 있는 버전 속성이 있습니다.

    <!-- Defining a ServiceInterfaceStrategy for retrieving the element name when marshalling -->
    <bean id="myNameStrategy" class="org.apache.camel.dataformat.soap.name.ServiceInterfaceStrategy">
        <constructor-arg value="com.example.customerservice.CustomerService"/>
    <constructor-arg value="true"/>
    </bean>
Copy to Clipboard Toggle word wrap

Camel 경로의 경우

<route>
  <from uri="direct:start"/>
  <marshal>
    <soapjaxb contentPath="com.example.customerservice" version="1.2" elementNameStrategyRef="myNameStrategy"/>
  </marshal>
  <to uri="jms:myQueue"/>
</route>
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

Theme

© 2025 Red Hat