1. Create WSDL
Description
A, non-standard webservice, can only be accessed by PHP
B, the standard webservice, you have to use the WSDL (WebService Description Language, is the XML syntax standard to describe your service content, I understand)
Here
Nusoap WSDL File Description:
My server is created as follows:
App::import (' Vendor ', ' nusoap/lib/nusoap ');
$server = new Soap_server;
$server->configurewsdl (' Sum ');
$server->register (' Sum ', Array (' x ' = ' xsd:string ', ' y ' = '
Background IntroductionRecently contacted a bank interface case, temporary need to use AXIS2 webservice. I now learn some of the things summarized, left to the novice. Less detours.AXIS2 Introduction① uses the new core XML processing model called
1. Create WSDL
Description
A, non-standard webservice, may only be able to access PHP
B, the standard webservice, you have to use the WSDL (WebService description Language, is to use the XML syntax standard to describe your service content, I
Let's talk about how PHP calls Webservice and its source code. Method 1: directly call and copy the code as follows :? **************************************** * ************************************ File name: soapclient. php * Description: We
SOAP. if VersionMismatch is encountered, fix the issue and paste the code first.
"http://v2.shanxitele.com/service/OutWebService?wsdl",'uri' => "http://127.0.0.1/")); $servicename = 'OAuth'; $servId = 'xxx'; $secretKey = 'xxx';
Phpsoap extends the Simple Object Access Protocol, which is a protocol specification for data exchange. It is a lightweight, simple, XML-based protocol (a subset of standard General Markup Language, it is designed to exchange structured and
The class used is soapclient and PhP5 comes with it. Of course, you can also use nusoap. php, a class written in pure PHP.
Code The number of lines is more than 7 kb, which is definitely less efficient than soapclient.
Here we will call
PHPSOAPwebservice connection timeout problem recently requires a php soap webservice to write a test demo code which is very simple.
I also read a lot of tutorials online and encountered a tricky problem.
Server service. php
The website looked up some soapclient information.
The demo is as follows:
A. Client soapclient.php:
try {
Non-wsdl method Call WebService
$soap = new SoapClient (NULL, Array (
' Location ' = ' http://localhost/WebService/soapService.php ',
'
Example of soap usage in PHP and PHPsoap usage
This article describes the use of soap in PHP and shares it with you for your reference. The usage analysis is as follows:
PHP uses soap in two ways.
1. Use the wsdl File
Server:
Copy codeThe Code is as
Soap, English is the meaning of "soap". But this is the thing that has affected the world of the Internet to a great extent, and in the last few years, after the mad "Web service" concept, soap was the achievement or "legacy" because soap was
: This article mainly introduces the use of SOAP in PHP. if you are interested in the PHP Tutorial, refer to it. SOAP: SOAP. But it is this thing that has greatly affected the internet world. after a few years of speculation about the concept of
If you need to use PHP to call Webservice, We must confirm that your php configuration file has opened the soap extension, that is, extension = php_soap.dll; otherwise, you cannot use PHP to call Webservice, for more information, see.
OK. Now let's
PHP how to invoke WSDL, what kind of class, who can give a detailed code? Thank you
Reply to discussion (solution)
Depends on your needs.
$WSDL = "HTTP://192.168.1.2/JAXWS/SERVICES/TEST?WSDL";$client = new SoapClient ($WSDL);$param = Array ('
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.