PHP中的WebService SOAP请求 [英] WebService SOAP request in PHP

查看:69
本文介绍了PHP中的WebService SOAP请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

i是SOAP的新手,我需要集成到我的应用程序中,所以我需要帮助来集成它。



这是我必须发送的样本请求

Hi All,
i am new to SOAP and i had a requirement of integrating in my application, so i need help in integrating it.

This is the sample request which i has to send

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.interswitchng.com/" xmlns:web="http://schemas.datacontract.org/2004/07/WebPAY.Core.ServiceFramework.Contract"> <soapenv:Header/> <soapenv:Body> <ser:GetTransactionData> <ser:transactionQueryRequest> <web:Hash>557b2622a688ea804be037314b724ef2af7b101834ea997d588687a891c4369059744a381ba068c0c571ea7b903716802c4b95f771bfddd0d92597fc98e0dfd2</web:Hash> <web:ProductId>3904</web:ProductId> <web:TransactionReference>0000009</web:TransactionReference> </ser:transactionQueryRequest> </ser:GetTransactionData> </soapenv:Body> </soapenv:Envelope>





我不知道如何发送请求可以任何一个帮助。



他们也提供了一些参考链接:



http://testwebpay.interswitchng.com/test_paydirect/services/webpayservice.svc [ ^ ]



https://testwebpay.interswitchng.com/test_paydirect/services/TransactionQueryWs.asmx [ ^ ]



提前致谢。



And i don't know how to send a request can any one help.

and they provided some reference links also:

http://testwebpay.interswitchng.com/test_paydirect/services/webpayservice.svc[^]

https://testwebpay.interswitchng.com/test_paydirect/services/TransactionQueryWs.asmx[^]

Thanks in advance.

推荐答案

你需要用 __ doRequest



You need to do it with __doRequest

<?php
error_reporting(E_ALL);
ini_set(‘display_errors’, true);
ini_set(‘display_startup_errors’, true);


test ='xmlns:xsi = http://www.w3.org/2001/XMLSchema-instance xmlns:xsd = http://www.w3.org/2001/XMLSchema xmlns:soap = http://schemas.xmlsoap.org/soap/envelope/>
< soap:Body>
<! -
将XML保存在此处以使用SOAP发送请求。并且你会通过阅读预定义的XML标签来获得响应。
- >
< / soap:Body >
< / soap:Envelope > ';

// 更改此变量。
test = ‘xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <!– Keep your XML here to send request using SOAP. And yo will get response by reading predefine XML tags. –> </soap:Body> </soap:Envelope>’; //Change this variables.


location_URL ='http: // write_your_location_url.asmx';
location_URL = ‘http://write_your_location_url.asmx’;


这篇关于PHP中的WebService SOAP请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆