求助用 php SAOP 类怎么实现下面的请求
POST /CasinoGameService?singlewsdl HTTP/1.1
Authorization: Basic [base64=username:password]
Content-Type: text/xml; charset=utf-8
SOAPAction: soapaction
Host: wsdl
Connection: close
User-Agent: Paw/3.1.5 (Macintosh; OS X/10.14.0) GCDHTTPRequest
Content-Length: 752
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="xxx">
<soapenv:Header/>
<soapenv:Body>
<v1:RegisterUser>
<v1:UserInfo>
<v1:ExternalUserId>1234</v1:ExternalUserId>
<v1:Username>TestUser</v1:Username>
<v1:Nickname>TestUser123</v1:Nickname>
<v1:Currency>EUR</v1:Currency>
<v1:Country>SE</v1:Country>
<v1:Birthdate>1977-07-07</v1:Birthdate>
<v1:Registration>1978-08-08</v1:Registration>
<v1:BrandId>TestBrand</v1:BrandId>
<v1:Language>sv_SE</v1:Language>
<v1:IP>1253456</v1:IP>
<v1:Locked>false</v1:Locked>
<v1:Gender>m</v1:Gender>
</v1:UserInfo>
</v1:RegisterUser>
</soapenv:Body>
</soapenv:Envelope>
1
kslr 2018-10-18 02:34:33 +08:00
直接当成 POST 发过去
|
2
beginor 2018-10-18 07:42:20 +08:00 via Android
号称世界上最好的语言居然能没有 SOAP 相关轮子?
|
3
focusheart 2018-10-18 08:14:26 +08:00
PHP 有 SoapClient,不用自己拼 xml。
先问提供服务的人要服务的 wsdl,初始化 SoapClient 以后,就和调用本地函数基本一样,很容易使用的。 |
5
fengci OP 现在就是用 SoapClient 拼不出来
|
6
fengci OP 是自己不知道怎么用 SoapClient 去实现上面请求。我通过 curl 能实现
|
7
NEETLEE 2018-10-18 09:44:23 +08:00
curl 实现+1
|
8
louisxxx 2023-05-14 06:57:46 +08:00
挖坟,搜 Soap 我第一眼看到的你代码显示 CasinoGameService 好奇点开了
|