Apidog

올인원 협업 API 개발 플랫폼

API 설계

API 문서

API 디버깅

API 모킹

API 자동화 테스트

WSDL 파일의 최고의 예

WSDL 파일의 간단하고 복잡한 예제를 통해 지식을 풍부하게 하세요.

Young-jae

Young-jae

Updated on December 20, 2024

요즘 소프트웨어는 그 어느 때보다 강력합니다. 사용자를 위한 많은 정보와 기능을 제공할 수 있습니다. 애플리케이션의 점점 더 강력해지는 기능들 덕분에, 어떻게 모든 것이 가능한지 궁금해한 적이 있나요?

애플리케이션 개발의 과정에서 자주 등장하는 파일 유형 중 하나는 WSDL 파일입니다. 그런데 WSDL 파일이란 무엇인가요?

WSDL 파일이란 무엇인가요?

WSDL (웹 서비스 설명 언어) 파일은 서로 다른 애플리케이션이 네트워크를 통해 표준화된 방식으로 서로 통신할 수 있도록 허용합니다. 이는 웹 서비스 제공자와 소비자를 연결하여 두 당사자 간 데이터 교환을 가능하게 합니다.

WSDL 파일은 SOAP 기반 웹 서비스에 대한 많은 설명을 제공하는 것으로도 유명합니다. WSDL 파일은 XML (확장 가능 마크업 언어) 언어로 작성되며 SOAP API 테스트에 필수적입니다.

더욱 중요한 것은, WSDL 파일이 웹 서비스 제공자와 서비스 소비자 간의 공식적인 계약 정의로 인해 중요하다는 점입니다. WSDL 파일은 사용할 수 있는 작업, 메시지의 형식과 구조 및 웹 서비스를 사용할 때 필요한 기타 중요한 세부 사항을 보여줍니다.

WSDL 파일의 구조와 예시

WSDL 파일에는 이를 사용하는 데 필요한 정보를 제공하는 주요 구성 요소가 있습니다. 이 문서에서는 날씨 웹 서비스를 예로 들어 XML 언어로 WSDL 파일의 일부를 시연합니다.

유형 type

WSDL 파일의 type 섹션은 웹 서비스 작업에 사용될 데이터 유형을 정의하는 데 사용됩니다.

<types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.com/weather">
        <element name="City" type="string"/>
        <element name="Weather" type="string"/>
    </schema>
</types>

이 예시는 CityWeather라는 이름의 요소 구조를 정의하고 있으며 이들의 유형은 string입니다.

메시지 message

message 섹션은 웹 서비스 제공자와 서비스 사용자 간에 교환되는 데이터 요소를 정의합니다. 위의 예에서 GetWeatherRequestGetWeatherResponse 메시지의 이름을 확인할 수 있습니다.

<message name="GetWeatherRequest">
    <part name="City" element="tns:City"/>
</message>
<message name="GetWeatherResponse">
    <part name="Weather" element="tns:Weather"/>
</message>

여기서 GetWeatherRequestGetWeatherResponse 메시지는 전송되거나 수신되는 데이터 요소를 지정하는 부분으로 정의됩니다.

포트 유형 portType

portType 섹션은 웹 서비스가 수행할 수 있는 작업 집합을 설명하며, GetWeather라는 작업 이름을 포함합니다. 이는 서비스에 대한 추상 인터페이스를 정의하며, 입력 tns:GetWeatherRequest와 출력 tns:GetWeatherResponse 메시지를 나열합니다.

<portType name="WeatherServicePortType">
    <operation name="GetWeather">
        <input message="tns:GetWeatherRequest"/>
        <output message="tns:GetWeatherResponse"/>
    </operation>
</portType>

위 예시는 WeatherServicePortType에서 정의된 GetWeather 작업과 지정된 입력 및 출력 메시지를 보여줍니다.

바인딩 binding

binding 섹션은 portType에서 정의된 추상 작업이 통신을 위해 구체적인 프로토콜에 어떻게 매핑되는지를 지정합니다. 메시지 형식 및 프로토콜(예: SOAP)과 같은 세부 사항을 정의합니다.

<binding name="WeatherServiceSoapBinding" type="tns:WeatherServicePortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="GetWeather">
        <soap:operation soapAction="http://example.com/weather/GetWeather"/>
        <input>
            <soap:body use="literal"/>
        </input>
        <output>
            <soap:body use="literal"/>
        </output>
    </operation>
</binding>

이 예시에서 WeatherServiceSoapBinding는 바인딩 프로토콜로 SOAP를 정의하며, 메시지 형식 및 전송에 대한 세부 사항을 지정합니다.

포트 port

port 섹션은 웹 서비스에 접근할 수 있는 네트워크 주소를 지정합니다.

<service name="WeatherService">
    <port name="WeatherServicePort" binding="tns:WeatherServiceSoapBinding">
        <soap:address location="http://example.com/weather/service"/>
    </port>
</service>

여기서 WeatherService는 SOAP 바인딩을 사용하는 WeatherServicePort로 정의되어 있으며, 그 주소는 http://example.com/weather/service으로 지정되어 있습니다.

WSDL 파일의 예

간단한 날씨 웹 서비스 WSDL 파일 예시

앞서 제시된 다양한 주요 구성 요소 코드 조각을 컴파일하여, 간단한 날씨 웹 서비스 WSDL 파일을 생성할 수 있습니다.

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:tns="http://example.com/weather"
             targetNamespace="http://example.com/weather">

    <types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.com/weather">
            <element name="City" type="string"/>
            <element name="Weather" type="string"/>
        </schema>
    </types>

    <message name="GetWeatherRequest">
        <part name="City" element="tns:City"/>
    </message>
    <message name="GetWeatherResponse">
        <part name="Weather" element="tns:Weather"/>
    </message>

    <portType name="WeatherServicePortType">
        <operation name="GetWeather">
            <input message="tns:GetWeatherRequest"/>
            <output message="tns:GetWeatherResponse"/>
        </operation>
    </portType>

    <binding name="WeatherServiceSoapBinding" type="tns:WeatherServicePortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="GetWeather">
            <soap:operation soapAction="http://example.com/weather/GetWeather"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
    </binding>

    <service name="WeatherService">
        <port name="WeatherServicePort" binding="tns:WeatherServiceSoapBinding">
            <soap:address location="http://example.com/weather/service"/>
        </port>
    </service>

</definitions>

이 간단한 날씨 웹 서비스 예시에서 다음을 확인할 수 있습니다:

  • 웹 서비스는 http://example.com/weather 네임스페이스 하에 운영됩니다.
  • 두 가지 단순 데이터 유형인 CityWeather가 정의됩니다.
  • 두 개의 메시지 GetWeatherRequestGetWeatherResponse가 있으며, 이는 GetWeather 작업의 입력 및 출력을 지정합니다.
  • WeatherServicePortType 포트 유형은 GetWeather 작업을 정의합니다.
  • WeatherServiceSoapBinding는 통신이 특정 스타일과 전송으로 SOAP를 사용할 것임을 지정합니다.
  • WeatherService 서비스는 SOAP 바인딩을 사용하는 WeatherServicePort 포트를 가지고 있으며, 그 주소는 http://example.com/weather/service입니다.

복잡한 전자 상거래 웹 서비스 WSDL 파일 예시

여기 여러 작업, 데이터 유형 및 기능을 포함한 더 복잡한 전자 상거래 웹 서비스 WSDL 파일 예시가 있습니다.

?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:tns="http://example.com/ecommerce"
             targetNamespace="http://example.com/ecommerce">

    <types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.com/ecommerce">
            <element name="Product">
                <complexType>
                    <sequence>
                        <element name="ProductId" type="string"/>
                        <element name="ProductName" type="string"/>
                        <element name="Price" type="decimal"/>
                    </sequence>
                </complexType>
            </element>
            <element name="Order">
                <complexType>
                    <sequence>
                        <element name="OrderId" type="string"/>
                        <element name="CustomerName" type="string"/>
                        <element name="Products" type="tns:Product" minOccurs="0" maxOccurs="unbounded"/>
                    </sequence>
                </complexType>
            </element>
        </schema>
    </types>

    <message name="GetProductRequest">
        <part name="ProductId" element="tns:ProductId"/>
    </message>
    <message name="GetProductResponse">
        <part name="Product" element="tns:Product"/>
    </message>

    <message name="PlaceOrderRequest">
        <part name="Order" element="tns:Order"/>
    </message>
    <message name="PlaceOrderResponse">
        <part name="Confirmation" type="string"/>
    </message>

    <portType name="ECommerceServicePortType">
        <operation name="GetProduct">
            <input message="tns:GetProductRequest"/>
            <output message="tns:GetProductResponse"/>
        </operation>
        <operation name="PlaceOrder">
            <input message="tns:PlaceOrderRequest"/>
            <output message="tns:PlaceOrderResponse"/>
        </operation>
    </portType>

    <binding name="ECommerceServiceSoapBinding" type="tns:ECommerceServicePortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="GetProduct">
            <soap:operation soapAction="http://example.com/ecommerce/GetProduct"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
        <operation name="PlaceOrder">
            <soap:operation soapAction="http://example.com/ecommerce/PlaceOrder"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
    </binding>

    <service name="ECommerceService">
        <port name="ECommerceServicePort" binding="tns:ECommerceServiceSoapBinding">
            <soap:address location="http://example.com/ecommerce/service"/>
        </port>
    </service>

</definitions>

이 복잡한 전자 상거래 웹 서비스 예제에서는 다음을 확인할 수 있습니다:

  • 복잡한 데이터 유형 ProductOrder가 중첩된 요소(ProductId, ProductName, Price)와 시퀀스로 정의됩니다.
  • ECommerceServicePortType 내에 여러 작업 GetProductPlaceOrder가 정의됩니다.
  • 각 작업에 대해 GetProductRequest, GetProductResponse, PlaceOrderRequest, PlaceOrderResponse 메시지가 정의되어 입력 및 출력 데이터를 지정합니다.
  • SOAP 바인딩 ECommerceServiceSoapBinding는 SOAP를 사용하여 통신하기 위한 형식 세부 사항을 지정합니다.
  • 서비스 ECommerceService는 SOAP 바인딩을 사용하는 ECommerceServicePort 포트를 가지고 있으며, 그 주소는 http://example.com/ecommerce/service으로 지정됩니다.

Apidog를 사용한 WSDL 파일 편집

WSDL 파일은 소프트웨어 개발 환경에서 상대적으로 흔하므로, 직접 수정하거나 생성해야 할 수도 있습니다. 다양한 API 플랫폼 가운데, Apidog는 훌륭한 선택입니다.

Apidog는 개발자, 웹 서비스 제공자 및 다양한 배경의 웹 서비스 사용자들이 다른 API 플랫폼에서 Apidog로 원활하게 전환할 수 있도록 도와줍니다.

다행히도 Apidog는 WSDL 파일 가져오기 또한 지원합니다! 사용해 보고 싶다면 아래 버튼을 사용하여 Apidog를 다운로드하세요.

버튼

들어가면 로그인 하고 새로운 프로젝트를 시작하는 걸 잊지 마세요. 도움이 필요하시면 Apidog 도움말 문서를 참고하세요.

WSDL 파일에서 Apidog로 SOAP API 가져오기

import wsdl file soap api apidog
Apidog에 WSDL 파일 가져오기

새 프로젝트를 열면, Apidog 창의 왼쪽에 있는 수직 툴바에서 "설정" 버튼을 클릭합니다. 그런 다음 순서대로 화살표 2와 화살표 3을 클릭합니다.

Apidog에서 SOAP API 쉽게 테스트하기

Apidog를 사용한 WSDL 파일 편집

WSDL 파일을 성공적으로 가져왔다면 화면 왼쪽에 그 이름이 표시됩니다(화살표 1 주위에 표시됨).

WSDL 파일 편집을 시작하려면 순차적으로 화살표 2에서 4를 클릭하면 됩니다!

결론

XML (확장 가능 마크업 언어)를 기반으로 한 WSDL 파일은 이해하기가 조금 더 쉽습니다. WSDL 파일은 웹 서비스의 설명과 기능이 얼마나 구체적인지에 따라 복잡성이 달라질 수 있습니다.

EXAONE 3.0 7.8B 모델을 로컬에서 실행하는 방법튜토리얼

EXAONE 3.0 7.8B 모델을 로컬에서 실행하는 방법

이 글에서는 EXAONE 3.0 7.8B 모델을 자신의 컴퓨터에서 설치하고 실행하는 방법을 단계별로 상세히 알아보겠습니다

Young-jae

March 25, 2025

Claude 3.7 소넷 API에 접근하고 Apidog을 사용하여 테스트하는 방법튜토리얼

Claude 3.7 소넷 API에 접근하고 Apidog을 사용하여 테스트하는 방법

Anthropic의 최신 출시인 Claude 3.7 Sonnet에 대해 기대하고 있으며, Apidog로 테스트하면서 API를 통한 기능을 탐색하고 싶다면, 올바른 장소에 오신 것입니다. 💡시작하기 전에 간단한 팁을 드리겠습니다: 오늘 Apidog를 무료로 다운로드하여 API 테스트 프로세스를 간소화하세요. 특히 Claude 3.7 Sonnet의 강력한 기능을 탐색하는 데 적합한 도구로, 최첨단 AI 모델을 테스트하려는 개발자에게 이상적입니다!버튼 Claude 3.7 Sonnet이 중요한 이유로 시작해봅시다. Anthropic은 최근 2025년 2월 24일에 이 모델을 공개했으며, 즉시 및 단계별 응답을 위한 하이브리드 추론 기능을 갖춘 가장 지능적인 창작물로 자리 잡았습니다. 이는 코딩, 추론 등 여러 부분에서 혁신적인 변화를 가져오며, 현재 e Anthropic API, Amazon Bedrock, Google Cloud의 Vertex AI를 통해 사용할 수 있습니다. 이 튜

Young-jae

February 25, 2025

GitHub Copilot 무료: 어떻게 시작하나요?튜토리얼

GitHub Copilot 무료: 어떻게 시작하나요?

GitHub Copilot 무료 사용법을 알아보세요. 이 AI 기반 코딩 도우미에 대한 이 가이드는 VS Code와 JetBrains와 같은 인기 IDE의 설정 단계를 다루며, 무료로 스마트한 코드 제안 및 완성을 통해 생산성을 높일 수 있도록 도와줍니다!

Young-jae

December 19, 2024