Codeception / Codeception/module-soap

Issue in XML parser in SOAP function

未關閉
#7 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
PHP
星號
0
分支
4
PR 合併指標
30 天內沒有已合併 PR

描述

If I do:

``` php
$xml = new \Codeception\Util\XmlBuilder();
$xml->name->val('test')->parent()
->catid->val(4);

$I->sendSoapRequest('create', $xml);
```

The soap request works:

```
[Request] test4
```

However if I do:

```
$I->sendSoapRequest('create', 'test4');
```

It says:

```

[PHPUnit_Framework_Exception] DOMDocument::loadXML(): Extra content at the end of the document in Entity, line: 1

```

The problem I think is here: https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Xml.php#L27-L57

The parser seems able to parse a xml string wrapped in an outer tag ():

`$I->sendSoapRequest('create', 'test4');`

but not like:

`$I->sendSoapRequest('create', 'test4');`

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

從 Codeception/Util/Xml.php 第 27-57 行開始,追蹤 sendSoapRequest 如何處理 XML 引數。使用兄弟元素重現該故障,並將其與包裝後的範例進行比較。當未包裝的 name 和 catid 元素能夠被 SOAP 請求接受,且不再出現 DOMDocument 剖析例外時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
php
領域
api
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。