내가하려고하는 것은 SOAP 및 PHP가 포함 된 CRM 시스템으로 양식에서 캡처 된 값의로드를 보내는 것입니다. 나는 잠시 동안 SOAP에 대해 읽고 있었고, 그렇게하는 방법을 이해하지 못한다. 다른 사람들도 알고 있는가?PHP로 SOAP 메시지 보내기
0
A
답변
0
이렇게하려면 sourceforge에서 'NuSOAP'과 같은 간단한 비누 툴킷을 다운로드하는 것이 가장 쉽습니다. 다음 (ISBN 번호의 예를 제출) 같은
그리고 다음 코드 무언가 :이 코드가 직접 찍은
<?php
// include the SOAP classes
require_once('nusoap.php');
// define parameter array (ISBN number)
$param = array('isbn'=>'0385503954');
// define path to server application
$serverpath ='http://services.xmethods.net:80/soap/servlet/rpcrouter';
//define method namespace
$namespace="urn:xmethods-BNPriceCheck";
// create client object
$client = new soapclient($serverpath);
// make the call
$price = $client->call('getPrice',$param,$namespace);
// if a fault occurred, output error info
if (isset($fault)) {
print "Error: ". $fault;
}
else if ($price == -1) {
print "The book is not in the database.";
} else {
// otherwise output the result
print "The price of book number ". $param[isbn] ." is $". $price;
}
// kill object
unset($client);
?>
, 또한 좋은 자원 볼 수 http://developer.apple.com/internet/webservices/soapphp.html
희망이 도움이됩니다.
0
당신은 아마 그 이후로 해결책을 발견 -하지만 어쩌면 다음은이에 대한 다른 사람이 검색하는 데 도움이 :
비누 server.php :
<?php
class MySoapServer {
public function getMessage()
{
return "Hello world!";
}
public function add ($n1,$n2)
{
return $n1+n2;
}
}
$option = array ('uri' => 'http://example.org/stacky/soap-server');
$server = new SoapServer(null,$option);
$server->setClass('MySoapServer');
$server->handle();
?>
및 비누 client.php
<?php
$options = array ('uri' => 'http://example.org/stacky/soap-server',
'location' => 'http://localhost/soap-server.php');
$client = new SoapClient(null,$options);
echo $client ->getMessage();
echo "<br>";
echo $client ->add(41,1);
?>
을
관련 문제
- 1. SOAP 메시지 보내기 및 받기
- 2. SOAP로 비누 헤더 보내기 PHP로 SOAP 비누 요청하기
- 3. php에서 java로 메시지 보내기
- 4. 메시지 보내기
- 5. SOAP 메시지 만료
- 6. iPhone의 SOAP 메시지
- 7. PHP로 IGMP 보내기
- 8. PHP로 전자 메일 보내기
- 9. PHP로 첨부 파일 보내기
- 10. 플래시에서 PHP로 JSON 보내기
- 11. Postfix : PHP로 이메일 보내기
- 12. ActionScript에서 PHP로 xml 보내기
- 13. JSON을 PHP로 보내기
- 14. PHP로 메일 보내기
- 15. PHP로 자동 메일 보내기
- 16. .NET SOAP 호출을 PHP로 변환
- 17. C#으로 SOAP 요청 보내기
- 18. XMPP (Smack) 메시지 보내기
- 19. Facebook 메시지 보내기
- 20. 선택된 Ips에 메시지 보내기
- 21. Android Emulator에서 메시지 보내기
- 22. 아이폰에 인스턴트 메시지 보내기
- 23. iPhone에서 Mac으로 메시지 보내기
- 24. 윈도우 핸들에 메시지 보내기
- 25. 다른 스레드에 메시지 보내기
- 26. ASP.NET에서 SMS 메시지 보내기
- 27. C2DM 메시지 보내기
- 28. UINavigationController 개체에 메시지 보내기
- 29. citrix 세션으로 메시지 보내기
- 30. System.Net.Mail이받는 사람없이 메시지 보내기