WSDL ⑤ - WSDL의 엘리먼트 <portType>

 

  Last Modified 2008/03/07
  by ides
 
http://tequiero35.egloos.com/



4. <portType>

웹 서비스의 인터페이스 정의.
웹 서비스가 제공하는 메서드에 대한 정보 기술
.



4-1. Attribute

name : 해당 WSDL 문서에 정의된 모든 port type 사이에 고유한 이름을 제공한다.



4-2. 하위 엘리먼트

<operation>
: 하나의 메서드에 대한 정보 기술.
  • operation 엘리먼트의 parameterOrder 애트리뷰트
    : Operation RPC 같은 바인딩이 사용되는지의 여부를 지정하지 않는다. 그러나 RPC-binding과 함께 operation 사용할 때, 원래의 RPC 함수의 시그니처을 캡처하기 유용하다. 이러한 이유로, 요청-응답(request-response) 또는 청구-응답(solicit-response) operation nmtokens 형식의 parameterOrder 애트리뷰트를 통해 파라미터 이름의 리스트를 명기할 수도 있다. 애트리뷰트의 값은 단일 공백으로 분리된 message part  name 의 리스트이다. 명명된 부분은 다음 규칙을 반드시 준수해야 한다.

    part name 순서는 RPC 시그니처에서 파라미터의 순서를 반영한다.

    return part 는 리스트에 나타나지 않는다.

    part name input message output 메시지에 모두 나타나면 in/out 파라미터이다.

    part name input message 에만 나타나면 in 파라미터이다.

    part name output message 에만 나타나면 out 파라미터이다.

     

    이 정보는 "참고"로 제공되는 것이므로 RPC 시그니처와는 관계 없는 경우에는 무시해도 된다. 비록 operation RPC 같은 바인딩과 함께 사용될지라도 이것은 필수가 아니다.



4-3. endpoint가 지원하는 WSDL의 4가지 전송 방식

- 기본 WSDL 구조가 4가지 전송 방식의 바인딩을 지원하지만 WSDL 은 단방향과 요청-응답 방식의 바인딩만 정의한다.

4-3-1. 단방향 (One-way) : endpoint 는 메시지를 받는다.

 

 <wsdl:portType .... > *
        <wsdl:operation name="nmtoken">
               <wsdl:input name="nmtoken"? message="qname"/>
        </wsdl:operation>
 </wsdl:portType >

 


4-3-2. 요청-응답 (Request-response) : endpoint 는 메시지를 받고 관련된 메시지를 보낸다.

 

 <wsdl:portType .... > *
        <wsdl:operation name="nmtoken" parameterOrder="nmtokens">
               <wsdl:input name="nmtoken"? message="qname"/>
               <wsdl:output name="nmtoken"? message="qname"/>
               <wsdl:fault name="nmtoken" message="qname"/>*
        </wsdl:operation>
 </wsdl:portType >

 

4-3-3. 청구-응답 (Solicit-response) : endpoint 는 메시지를 보내고 관련된 메시지를 받는다.

 

 <wsdl:portType .... > *
        <wsdl:operation name="nmtoken" parameterOrder="nmtokens">
               <wsdl:output name="nmtoken"? message="qname"/>
               <wsdl:input name="nmtoken"? message="qname"/>
               <wsdl:fault name="nmtoken" message="qname"/>*
        </wsdl:operation>
 </wsdl:portType >



4-3-4. 통지 (Notification) : endpoint 는 메시지를 받는다.

 

  <wsdl:portType .... > *
        <wsdl:operation name="nmtoken">
               <wsdl:output name="nmtoken"? message="qname"/>
        </wsdl:operation>
  </wsdl:portType >

 



4-4. operation 내의 input/output/fault 엘리먼트

name
속성 : 엘리먼트가 속해진 portType 내에서 서로 고유한 이름을 제공한다.



4-5. 예제

public interface MaxMinIF extends java.rmi.Remote {

    public int max(int in0, int in1, int in2, int in3, int in4
                                    throws java.rmi.RemoteException;

}

<wsdl:message name="maxResponse">

      <wsdl:part name="maxReturn" type="xsd:int"/>

</wsdl:message>

<wsdl:message name="maxRequest">

      <wsdl:part name="in0" type="xsd:int"/>
 <wsdl:part name="in1" type="xsd:int"/>
 <wsdl:part name="in2" type="xsd:int"/> 
 <wsdl:part name="in3" type="xsd:int"/>
 <wsdl:part name="in4" type="xsd:int"/>

</wsdl:message>
 

<wsdl:portType name="MaxMinIF">
<wsdl:operation name="max" parameterOrder="in0 in1 in2 in3 in4">

<wsdl:input message="impl:maxRequest" name="maxRequest"/>
     <wsdl:output message="impl:maxResponse" name="maxResponse"/>
</wsdl:operation>

</wsdl:portType>

 





<REFERENCE>
http://www.w3.org/TR/2001/NOTE-wsdl-20010315
http://blog.naver.com/mickyblue/40048249584

by ides | 2007/11/01 19:04 | [P] Web Services | 트랙백(1) | 덧글(1)

트랙백 주소 : http://tequiero35.egloos.com/tb/942515
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]
Tracked from 부탄가스님의 이글루 at 2008/01/22 17:51

제목 : WSDL ⑤ - WSDL의 엘리먼트 <portType>
WSDL ⑤ - WSDL의 엘리먼트 &lt;portType&gt;...more

Commented by 쌈닭 at 2009/10/15 17:08
소중한 정보 감사합니다.

염치 불구하고 담아갑니다.

:         :

:

비공개 덧글

◀ 이전 페이지          다음 페이지 ▶