정적 WSDL 사용
정적 WSDL을 SOAP 클라이언트로 로드하여 SOAP 웹 서비스에 요청합니다.
웹 서비스 클라이언트는 다음을 제공합니다.
- FakeStockValue 프로젝트입니다.
- StockQuoteBinding 웹 서비스입니다.
- GetLastTradePrice SOAP 함수입니다. 이 함수는 실행 시 요청 기록을 생성합니다.
정적 WSDL의 기본 요청 XML을 변경하여 주식 기호를 포함할 수 있습니다.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:stoc="http://example.com/stockquote.xsd">
<soapenv:Header/>
<soapenv:Body>
<stoc:TradePriceRequest>IBM</stoc:TradePriceRequest>
</soapenv:Body>
</soapenv:Envelope>이 웹 서비스 끝점에 SOAP 요청을 제출하면 요청하는 SOAP 클라이언트에 다음이 반환됩니다.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<GetLastTradePriceOutput xmlns="https://www.service-now.com/vws/FakeStockValue">
<message>admin2, You were looking for a quote on IBM</message>
</GetLastTradePriceOutput>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>