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

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
(다른 사용자 한 명의 중간 판 11개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
;PHP SoapClient 사용해보기
;PHP SoapClient 사용해보기
*여기서는 nusoap_client 대신 PHP에 기본으로 탑재된 SoapClient를 이용해본다.
*SOAP서버는 그대로 NuSOAP의 것을 사용할 것이다.


==사전 작업==
==사전 작업==
*[[NuSOAP 시작하기]]
*[[NuSOAP 시작하기]]
*[[php-soap 설치]]


여기서는 nusoap_client 대신 PHP에 기본으로 탑재된 SoapClient를 이용해보자.
==soap-client.php==
SOAP서버는 그대로 NuSOAP의 것을 사용할 것이다.
<syntaxhighlight lang='php'>
<?php
$client = new SoapClient('http://zetawiki.com/ex/soap/nusoap-server.php?wsdl');


==client1b.php==
$result = $client->sayHello('John Smith');
<source lang='php'>
echo "<div>$result</div>";
<?php
// Hello, John Smith!
require_once '/var/www/html/lib/nusoap.php';
 
$client = new SoapClient("http://jmnote.com/nusoap/server.php?wsdl");
$result = $client->sayAnnyeong('John Smith', $option);
$result = $client->hello('John Smith');
echo "<div>$result</div>";
print_r($result);
// 안녕, John Smith!
?>
</syntaxhighlight>
</source>
*예시: http://zetawiki.com/ex/soap/soap-client.php
*예시: http://jmnote.com/nusoap/client1b.php


==같이 보기==
==같이 보기==
*[[NuSOAP 시작하기]]
*[[NuSOAP 시작하기]]
*[[Fatal error: Class 'SoapClient' not found]]
*[[WSDL 캐시 비우기]]


[[분류: PHP]]
[[분류: PHP]]
[[분류: SOAP]]
[[분류: SOAP]]

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 }}