바인드된 첨부 파일 지원: WSDL 예

WS-I(Web Services-Interoperability) Attachments Profile 버전 1.0 인코딩과 SOAP Messages with Attachments 인코딩을 포함하는 WSDL 단편 예를 보려면 이 태스크를 사용합니다.

이 태스크 정보

WS-I(Web Services-Interoperability) Attachments Profile 버전 1.0은 바인드된 첨부 파일의 컨텐츠 ID를 생성하는 규칙을 정의합니다. 이 규칙은 메시지 파트 이름을 인코드합니다. 결과적으로, 해당 메시지 파트를 나타내는 요소가 SOAP 본문에 포함되어 있는지 여부에 관계 없이 서비스 통합 기술이 바인드된 첨부 파일을 인식할 수 있습니다. 컨텐츠 ID를 생성하는 규칙은 다음과 같습니다.
name=uuid@domain
여기서 name은 인코드되는 메시지 파트의 이름이고 uuid는 글로벌로 고유한 ID이며 domain은 도메인 ID(예: my.example.com)입니다.
참고: 이 접근 방식은 컨텐츠 ID에 대한 규칙을 정의하지 않지만 메시지 파트가 첨부로 인코드되는 것을 표시하기 위해 SOAP 본문 내에서 요소를 사용하는 첨부 파일을 포함하는 SOAP 메시지 인코딩 체계와 다릅니다.

케이스를 구분하기 위해, 서비스 통합 기술은 메시지 첨부가 컨텐츠 ID 생성을 위해 버전 1.0 규칙을 따르는 경우 해당 메시지가 버전 1.0 메시지인 것으로 가정합니다.

다음 WSDL 단편은 두 스타일을 모두 따르는 메시지 인스턴스를 포함하는 바인드된 첨부에 대한 것입니다.

<wsdl:binding name="BoundSoapBinding" type="intf:BoundPortType">
    <soap:binding style="rpc"
                  			transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="bound">
      <soap:operation soapAction=""/>
      <wsdl:input>
        <mime:multipartRelated>
          <mime:part>
            <soap:body parts="stringIn" namespace="http://bound"
                       use="literal"/>
          </mime:part>
          <mime:part>
            <mime:content part="attachIn" type="text/xml"/>
          </mime:part>
        </mime:multipartRelated>
      </wsdl:input>

다음 WSDL 단편은 버전 1.0 인코딩을 사용하는 SOAP 인스턴스에 해당됩니다. 이 단편에서는 메시지 본문에 attachIn 파트에 대한 언급이 없으며 첨부의 컨텐츠 ID가 인코딩되는 파트를 식별합니다.

--myBoundary
Content-Type: text/xml
Content-Transfer-Encoding: 7bit
Content-Id: <myStartID>

<SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <ns0:bound xmlns:ns0="http://bound">
      <stringIn>some string data</stringIn>
    </ns0:bound>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

--myBoundary
Content-Type: text/xml
Content-Transfer-Encoding: 7bit
Content-Id: <attachIn=someUUID@some.domain.name>

<someOtherXMLElement/>
--myBoundary--

다음 WSDL 단편은 첨부가 있는 SOAP 메시지 인코딩을 사용하는 SOAP 인스턴스에 해당됩니다. 이 단편에서는 메시지 본문에 바인드된 첨부에 대한 참조가 포함되지 않으며 첨부의 컨텐츠 ID가 제한되지 않습니다.

--myBoundary
Content-Type: text/xml
Content-Transfer-Encoding: 7bit
Content-Id: <myStartID>

<SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <ns0:bound xmlns:ns0="http://bound">
      <stringIn>some string data</stringIn>
      <attachIn href="cid:notTheStart"/>
    </ns0:bound>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

--myBoundary
Content-Type: text/xml
Content-Transfer-Encoding: 7bit
Content-Id: <notTheStart>

<someOtherXMLElement/>
--myBoundary--

이전 두 케이스에는 바인드된 첨부 파일을 식별하는 데 충분한 정보가 메시지에 있으며 두 가지 케이스 모두 서비스 통합 기술이 바인드된 첨부 파일 항목을 첨부 파일 목록에 배치하고 첨부 파일의 데이터를 데이터 그래프의 본문 섹션에 배치합니다.


주제 유형을 표시하는 아이콘 태스크 주제



시간소인 아이콘 마지막 업데이트 날짜: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tjw_attach_bound_wsdl
파일 이름:tjw_attach_bound_wsdl.html