WebSphere Enterprise Service Bus, 버전 6.2.0 운영 체제: AIX, HP-UX, i5/OS, Linux, Solaris, Windows


모델 그룹의 비즈니스 오브젝트 사용

모델 그룹의 일부인 중첩 비즈니스 오브젝트에 대한 작업 시 그룹 경로 패턴을 모델링해야 합니다.

이 태스크 정보

모델 그룹은 상위 비즈니스 오브젝트에서 비즈니스 오브젝트를 작성하기 위해 사용할 수 있는 xsd:choice 태그를 사용합니다. 그러나 Eclipse Modeling Framework(EMF)는 예외를 생성할 수 있는 네이밍 충돌을 야기할 수 있습니다. 다음 예제 코드는 이 충돌이 어떻게 일어나는지에 대해 설명합니다.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 targetNamespace="http://MultipleGroup">
  <xsd:complexType name="MultipleGroup">
    <xsd:sequence>
      <xsd:choice>
        <xsd:element name="child1" type="Child"/>
        <xsd:element name="child2" type="Child"/>
      </xsd:choice>
      <xsd:element name="separator" type="xsd:string"/>
      <xsd:choice>
        <xsd:element name="child1" type="Child"/>
        <xsd:element name="child2" type="Child"/>
      </xsd:choice>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>
"child1" 및 "child2"라는 요소의 다중 인스턴스가 있을 수 있다는 점에 유의하십시오.

모델 그룹에 대한 서비스 데이터 오브젝트(SDO) 경로 패턴을 사용하여 이 충돌을 해결해야 합니다.

결과

아래 예제 코드에 표시된 대로 모델 그룹을 처리하는 데 사용되는 SDO 경로 패턴을 사용하는 배열을 가져올 수 있습니다.
set("child1/grandchild/name", "Bob"); 

set("child11/grandchild/name", "Joe"); 

task 타스크 주제

이용약관 | 피드백


시간소인 아이콘 마지막 갱신 날짜: 2010년 7월 7일 수요일


http://publib.boulder.ibm.com/infocenter/dmndhelp/v6r2mx/topic//com.ibm.websphere.wesb620.doc/doc/cpro_modelgroups.html
Copyright IBM Corporation 2005, 2010. All Rights Reserved.
이 Information Center는 Eclipse 기술을 기반으로 합니다(http://www.eclipse.org 웹 사이트 참조).