Skip to content

Commit 566c596

Browse files
committed
improve sample source code
1 parent 92c4abb commit 566c596

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

UPGRADE-2.0.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ The main change is that the property `$soapclient` in the abstract class `Abstra
66
```php
77
class MyService extends AbstractSoapClientBase
88
{
9-
try {
10-
$this->setResult(self::getSoapClient()->CreateQueue($body));
11-
return $this->getResult();
12-
} catch (\SoapFault $soapFault) {
13-
$this->saveLastError(__METHOD__, $soapFault);
14-
return false;
9+
public function CreateQueue(\Api\StructType\ApiCreateQueue $body)
10+
{
11+
try {
12+
$this->setResult(self::getSoapClient()->CreateQueue($body));
13+
return $this->getResult();
14+
} catch (\SoapFault $soapFault) {
15+
$this->saveLastError(__METHOD__, $soapFault);
16+
return false;
17+
}
1518
}
1619
}
1720
```
@@ -22,12 +25,15 @@ class MyService extends AbstractSoapClientBase
2225
```php
2326
class MyService extends AbstractSoapClientBase
2427
{
25-
try {
26-
$this->setResult($this->getSoapClient()->CreateQueue($body));
27-
return $this->getResult();
28-
} catch (\SoapFault $soapFault) {
29-
$this->saveLastError(__METHOD__, $soapFault);
30-
return false;
28+
public function CreateQueue(\Api\StructType\ApiCreateQueue $body)
29+
{
30+
try {
31+
$this->setResult($this->getSoapClient()->CreateQueue($body));
32+
return $this->getResult();
33+
} catch (\SoapFault $soapFault) {
34+
$this->saveLastError(__METHOD__, $soapFault);
35+
return false;
36+
}
3137
}
3238
}
3339
```

0 commit comments

Comments
 (0)