[英]Soap API XML issue using nusoap?
I have created SOAP API using nusoap in php.Everything is working fine. 我已经在php中使用nusoap创建了SOAP API。一切工作正常。 I have one file service.php when I hit this file I get documentation like this.
当我点击该文件时,我有一个文件service.php ,我得到了这样的文档。
If I hit this url: 如果我点击以下网址:
I get a diffrent type of xml document. 我得到了不同类型的xml文档。
Why this is so different? 为什么这是如此不同?
code for service.php service.php的代码
<?php
require_once "lib/nusoap.php";
require_once "functions.php";
$server=new nusoap_server();
$server->configureWSDL("SOAP", "urn:SOAP");
$server->register("addRecord",
array("fname"=>"xsd:string","lname"=>"xsd:string","buis_name"=>"xsd:string","phone_num"=>"xsd:int","city"=>"xsd:string","state"=>"xsd:string", "zipcode"=>"xsd:int","email"=>"xsd:string"
,"w_store"=>"xsd:string","con_store"=>"xsd:string","ind_store"=>"xsd:string","gas_staion"=>"xsd:string","other"=>"xsd:string"),
array("return" => "xsd:string"),
"urn:SOAP",
"urn:SOAPn#addRecord",
"rpc",
"encoded",
"Add user information to database");
$server->register("checkLogin",
array("email"=>"xsd:string","password"=>"xsd:string"),
array("return" => "xsd:string"),
"urn:SOAP",
"urn:SOAP#checkLogin",
"rpc",
"encoded",
"Verify UserLogin");
$HTTP_RAW_POST_DATA=isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
?>
每当您从客户端发送肥皂请求时,然后打印所有请求和响应即可得到所需的结果。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.