"PHP SoapClient 사용해보기"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
9번째 줄: 9번째 줄:


==soap-client.php==
==soap-client.php==
<source lang='php'>
<syntaxhighlight lang='php'>
<?php
<?php
$client = new SoapClient('http://zetawiki.com/ex/soap/nusoap-server.php?wsdl');
$client = new SoapClient('http://zetawiki.com/ex/soap/nusoap-server.php?wsdl');
20번째 줄: 20번째 줄:
echo "<div>$result</div>";
echo "<div>$result</div>";
// 안녕, John Smith!
// 안녕, John Smith!
</source>
</syntaxhighlight>
*예시: http://zetawiki.com/ex/soap/soap-client.php
*예시: http://zetawiki.com/ex/soap/soap-client.php



2020년 11월 2일 (월) 02:35 기준 최신판

1 개요[ | ]

PHP SoapClient 사용해보기
  • 여기서는 nusoap_client 대신 PHP에 기본으로 탑재된 SoapClient를 이용해본다.
  • SOAP서버는 그대로 NuSOAP의 것을 사용할 것이다.

2 사전 작업[ | ]

3 soap-client.php[ | ]

<?php
$client = new SoapClient('http://zetawiki.com/ex/soap/nusoap-server.php?wsdl');

$result = $client->sayHello('John Smith');
echo "<div>$result</div>";
// Hello, John Smith!

$result = $client->sayAnnyeong('John Smith', $option);
echo "<div>$result</div>";
// 안녕, John Smith!

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}