WebSphere Web Services Client for C++, Version 1.0.1 운영 체제: Linux, Windows

단순 유형의 배열

C++용 웹 서비스 클라이언트는 45개의 정의된 단순 유형 각각에 배열 오브젝트를 제공합니다. 이러한 오브젝트는 include\Axis\AxisUserAPIArrays.hpp에 정의되어 있습니다. xsd__int_Array는 단순 배열 유형의 예입니다.

다음 예제는 simpleArrayRequest 및 simpleArrayResponse라는 두 개의 배열 유형 정수 요소가 있는 WSDL의 추출을 보여 줍니다. 이러한 요소는 simpleArray 조작에서 사용됩니다. simpleArray 조작은 simpleArrayRequest 요소를 사용하여 요청 유형을 정의하고 simpleArrayResponse 요소를 사용하여 simpleArray 조작 호출 시 예상되는 응답 유형을 정의합니다.

<xsd:element name="simpleArrayRequest">
 <xsd:complexType>
  <xsd:sequence>
   <xsd:element name="simpleTypeRes" type="xsd:int" maxOccurs="unbounded"/>
  </xsd:sequence>
 </xsd:complexType>
</xsd:element>

<xsd:element name="simpleArrayResponse">
 <xsd:complexType>
  <xsd:sequence>
   <xsd:element name="simpleTypeReq" type="xsd:int" maxOccurs="unbounded"/>
  </xsd:sequence>
 </xsd:complexType>
</xsd:element>

이 예제에서는 maxOccurs 속성이 사용됩니다. C++용 웹 서비스 클라이언트는 1보다 큰 maxOccurs를 가지는 것으로 선언된 모든 유형의 배열 오브젝트를 작성합니다. WSDL의 뒷부분에서 simpleArrayRequest 및 simpleArrayResponse는 다음과 같은 프로토타입을 가진 simpleArray 메소드의 입력 및 출력 매개변수가 됩니다.

public:  xsd__int_Array * simpleArray( xsd__int_Array * pValue);

프로토타입에서는 입력 및 출력 배열을 작성해야 합니다. 메모리 누수를 피하려면 이러한 배열이 올바르게 작성 및 관리되어야 합니다. 일반 입력 및 출력 배열의 일반 관리 및 삭제에 대한 정보는 다음 두 을 참조하십시오.


Reference topic

이용약관 | 피드백

시간소인 아이콘마지막 갱신 날짜: 3 Mar 2006
http://publib.boulder.ibm.com/infocenter/dmndhelp/v6rxmx/index.jsp?topic=/com.ibm.websphere.wscc.doc.nl1\ref\wscc_rmemman_stypearrays.html

(C) Copyright IBM Corporation 2005. All Rights Reserved.
이 information Center는 Eclipse 기술을 기반으로 합니다. (http://www.eclipse.org)