60.9. 네임스페이스 접두사 매핑 제어
>-< B 또는 iPXE를 사용하여 마샬링할 때,>-<B 구현은 ns2, ns3, ns4 등과 같은 네임스페이스 접두사를 자동으로 할당합니다. https://access.redhat.com/documentation/en-us/red_hat_integration/2022.q4/html-single/camel_spring_boot_reference_3.14/index#csb-camel-soap-dataformat-starter Camel은 이 매핑을 제어하기 위해 원하는 매핑을 포함하는 맵을 참조할 수 있습니다.
매핑 기능은 지원되는지 여부에 따라 연결 기능에 따라 달라지므로 classpath에>-<B-RI 2.1 이상(SUN에서)이 필요합니다.
예를 들어 Spring XML에서는 매핑을 사용하여 맵을 정의할 수 있습니다. 아래 매핑 파일에서는 soap을 접두사로 사용하도록 매핑합니다. 사용자 지정 네임스페이스 "http://www.mycompany.com/foo/2"는 접두사를 사용하지 않습니다.
<util:map id="myMap">
<entry key="http://www.w3.org/2003/05/soap-envelope" value="soap"/>
<!-- we dont want any prefix for our namespace -->
<entry key="http://www.mycompany.com/foo/2" value=""/>
</util:map>
이렇게 하려면 아래와 같이 namespacePrefixRef 특성을 사용하여 이 맵을 참조하십시오. https://access.redhat.com/documentation/en-us/red_hat_integration/2022.q4/html-single/camel_spring_boot_reference_3.14/index#csb-camel-jaxb-dataformat-starter https://access.redhat.com/documentation/en-us/red_hat_integration/2022.q4/html-single/camel_spring_boot_reference_3.14/index#csb-camel-soap-dataformat-starter 그런 다음 Camel은 위에서 정의한 항목인 java.util.Map ID "myMap"을 사용하여 레지스트리에서 조회합니다.
<marshal>
<soapjaxb version="1.2" contextPath="com.mycompany.foo" namespacePrefixRef="myMap"/>
</marshal>