我在php.Everything中使用nusoap创建了SOAP,运行良好。我有一个文件service.php,当我点击这个文件时,我得到这样的文档。
如果我撞到这个网址:
我得到了不同类型的xml文档。
为什么这么不一样?
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);
?>
发布于 2015-06-12 11:22:39
每当您从client.Then发送soap请求时,打印所有请求& response.Then,就会得到所需的结果。
https://stackoverflow.com/questions/29869480
复制相似问题