Skip to content

Commit c993e25

Browse files
committed
Add example
1 parent 4f2452e commit c993e25

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

examples/ext-soap-transport.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
use Soap\Engine\SimpleEngine;
4+
use Soap\ExtSoapEngine\AbusedClient;
5+
use Soap\ExtSoapEngine\ExtSoapDriver;
6+
use Soap\ExtSoapEngine\ExtSoapOptions;
7+
use Soap\ExtSoapEngine\Transport\ExtSoapClientTransport;
8+
use Soap\ExtSoapEngine\Transport\TraceableTransport;
9+
10+
require_once dirname(__DIR__).'/vendor/autoload.php';
11+
12+
$engine = new SimpleEngine(
13+
ExtSoapDriver::createFromClient(
14+
$client = AbusedClient::createFromOptions(
15+
ExtSoapOptions::defaults('http://www.dneonline.com/calculator.asmx?wsdl', [
16+
'connection_timeout' => 0,
17+
])
18+
)
19+
),
20+
$transport = new TraceableTransport(
21+
$client,
22+
new ExtSoapClientTransport($client)
23+
)
24+
);
25+
26+
$result = $engine->request('Add', [['intA' => 1, 'intB' => 2]]);
27+
28+
var_dump($result);
29+
var_dump($transport->collectLastRequestInfo());

0 commit comments

Comments
 (0)