#42410 [Opn->Fbk]: SOAP parsing problem on Item-Tags
| From: | jani@php.net | Date: | Fri, 24 Aug 2007 10:24:45 +0000 |
| Subject: | #42410 [Opn->Fbk]: SOAP parsing problem on Item-Tags | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-116602@lists.php.net to get a copy of this message | ||
ID: 42410
Updated by: jani@php.net
Reported By: andreas dot bohne-lang at medma dot uni-heidelberg dot
-Status: Open
+Status: Feedback
Bug Type: SOAP related
Operating System: MacOSX 1.4
PHP Version: 5.2.3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows (zip):
http://snaps.php.net/win32/php5.2-win32-latest.zip
For Windows (installer):
http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
Previous Comments:
------------------------------------------------------------------------
[2007-08-24 07:19:37] andreas dot bohne-lang at medma dot
uni-heidelberg dot
Description:
------------
The built-in SOAP drop the value of the record. eg: the '2005 Jul 1' of
the PubDate. NuSOAP can handle this.
<DocSum>
<Id>15980568</Id>
<Item Name="PubDate" Type="Date">2005 Jul 1</Item>
<Item Name="EPubDate" Type="Date"></Item>
<Item Name="Source" Type="String">Nucleic Acids Res</Item>
<Item Name="AuthorList" Type="List">
<Item Name="Author" Type="String">Bohne-Lang
A</Item>
...
stdClass Object
(
[DocSum] => stdClass Object
(
[Id] => 15980568
[Item] => Array
(
[0] => stdClass Object
(
[Name] => PubDate
[Type] => Date
)
[1] => stdClass Object
(
[Name] => EPubDate
[Type] => Date
)
[2] => stdClass Object
(
[Name] => Source
[Type] => String
)
Reproduce code:
---------------
<?
$client = new
SoapClient('http://www.ncbi.nlm.nih.gov/entrez/eutils/soap/eutils.wsdl',array('trace'
=> 1));
$result = $client->__soapcall('run_eSummary',array(
'parameters' => array('db' => 'pubmed',
'id'=>'15980568')));
echo "LastRequestHeaders:\n" .
$client->__getLastRequestHeaders() . "\n";
echo "LastRequest:\n" . $client->__getLastRequest() . "\n";
echo "LastResponseHeaders:\n" .
$client->__getLastResponseHeaders() . "\n";
echo "LastResponse:\n" . $client->__getLastResponse() . "\n";
print_r($result);
?>
Expected result:
----------------
NuSOAP output:
Array
(
[DocSum] => Array
(
[Id] => 15980568
[Item] => Array
(
[0] => Array
(
[!Name] => PubDate
[!Type] => Date
[!] => 2005 Jul 1
)
[1] => Array
(
[!Name] => EPubDate
[!Type] => Date
)
[2] => Array
(
[!Name] => Source
[!Type] => String
[!] => Nucleic Acids Res
)
[3] => Array
(
[Item] => Array
(
[0] => Array
(
[!Name] => Author
[!Type] => String
[!] => Bohne-Lang A
)
Actual result:
--------------
LastRequestHeaders:
POST /entrez/eutils/soap/soap_adapter_1_5.cgi HTTP/1.1
Host: www.ncbi.nlm.nih.gov
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.3
Content-Type: text/xml; charset=utf-8
SOAPAction: "esummary"
Content-Length: 321
LastRequest:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://www.ncbi.nlm.nih.gov/soap/eutils/esummary"><SOAP-ENV:Body><ns1:eSummaryRequest><ns1:db>pubmed</ns1:db><ns1:id>15980568</ns1:id></ns1:eSummaryRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
LastResponseHeaders:
HTTP/1.1 200 OK
Date: Fri, 24 Aug 2007 07:14:09 GMT
Server: Apache
Content-length: 2278
Content-Type: text/xml; charset="UTF-8"
Vary: Accept-Encoding
Connection: close
LastResponse:
<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
<SOAP-ENV:Body><eSummaryResult
xmlns="http://www.ncbi.nlm.nih.gov/soap/eutils/esummary">
<DocSum>
<Id>15980568</Id>
<Item Name="PubDate" Type="Date">2005 Jul 1</Item>
<Item Name="EPubDate" Type="Date"></Item>
<Item Name="Source" Type="String">Nucleic Acids Res</Item>
<Item Name="AuthorList" Type="List">
<Item Name="Author" Type="String">Bohne-Lang
A</Item>
<Item Name="Author" Type="String">Groch WD</Item>
<Item Name="Author" Type="String">Ranzinger R</Item>
</Item>
<Item Name="LastAuthor" Type="String">Ranzinger R</Item>
<Item Name="Title" Type="String">AISMIG--an interactive
server-side molecule image generator.</Item>
<Item Name="Volume" Type="String">33</Item>
<Item Name="Issue" Type="String">Web Server issue</Item>
<Item Name="Pages" Type="String">W705-9</Item>
<Item Name="LangList" Type="List">
<Item Name="Lang" Type="String">English</Item>
</Item>
<Item Name="NlmUniqueID" Type="String">0411011</Item>
<Item Name="ISSN" Type="String">0305-1048</Item>
<Item Name="ESSN" Type="String">1362-4962</Item>
<Item Name="PubTypeList" Type="List">
<Item Name="PubType" Type="String">Journal
Article</Item>
</Item>
<Item Name="RecordStatus" Type="String">PubMed - indexed for
MEDLINE</Item>
<Item Name="PubStatus" Type="String">ppublish</Item>
<Item Name="ArticleIds" Type="List">
<Item Name="pii"
Type="String">33/suppl_2/W705</Item>
<Item Name="doi"
Type="String">10.1093/nar/gki438</Item>
<Item Name="pubmed" Type="String">15980568</Item>
</Item>
<Item Name="DOI" Type="String">10.1093/nar/gki438</Item>
<Item Name="History" Type="List">
<Item Name="pubmed" Type="Date">2005/06/28
09:00</Item>
<Item Name="medline" Type="Date">2005/08/11
09:00</Item>
</Item>
<Item Name="References" Type="List"></Item>
<Item Name="HasAbstract" Type="Integer">1</Item>
<Item Name="PmcRefCount" Type="Integer">1</Item>
<Item Name="FullJournalName" Type="String">Nucleic acids
research</Item>
<Item Name="SO" Type="String">2005 Jul 1;33(Web Server
issue):W705-9</Item>
</DocSum>
</eSummaryResult>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
stdClass Object
(
[DocSum] => stdClass Object
(
[Id] => 15980568
[Item] => Array
(
[0] => stdClass Object
(
[Name] => PubDate
[Type] => Date
)
[1] => stdClass Object
(
[Name] => EPubDate
[Type] => Date
)
[2] => stdClass Object
(
[Name] => Source
[Type] => String
)
[3] => stdClass Object
(
[Item] => Array
(
[0] => stdClass Object
(
[Name] => Author
[Type] => String
)
[1] => stdClass Object
(
[Name] => Author
[Type] => String
)
[2] => stdClass Object
(
[Name] => Author
[Type] => String
)
)
[Name] => AuthorList
[Type] => List
)
[4] => stdClass Object
(
[Name] => LastAuthor
[Type] => String
)
[5] => stdClass Object
(
[Name] => Title
[Type] => String
)
[6] => stdClass Object
(
[Name] => Volume
[Type] => String
)
[7] => stdClass Object
(
[Name] => Issue
[Type] => String
)
[8] => stdClass Object
(
[Name] => Pages
[Type] => String
)
[9] => stdClass Object
(
[Item] => stdClass Object
(
[Name] => Lang
[Type] => String
)
[Name] => LangList
[Type] => List
)
[10] => stdClass Object
(
[Name] => NlmUniqueID
[Type] => String
)
[11] => stdClass Object
(
[Name] => ISSN
[Type] => String
)
[12] => stdClass Object
(
[Name] => ESSN
[Type] => String
)
[13] => stdClass Object
(
[Item] => stdClass Object
(
[Name] => PubType
[Type] => String
)
[Name] => PubTypeList
[Type] => List
)
[14] => stdClass Object
(
[Name] => RecordStatus
[Type] => String
)
[15] => stdClass Object
(
[Name] => PubStatus
[Type] => String
)
[16] => stdClass Object
(
[Item] => Array
(
[0] => stdClass Object
(
[Name] => pii
[Type] => String
)
[1] => stdClass Object
(
[Name] => doi
[Type] => String
)
[2] => stdClass Object
(
[Name] => pubmed
[Type] => String
)
)
[Name] => ArticleIds
[Type] => List
)
[17] => stdClass Object
(
[Name] => DOI
[Type] => String
)
[18] => stdClass Object
(
[Item] => Array
(
[0] => stdClass Object
(
[Name] => pubmed
[Type] => Date
)
[1] => stdClass Object
(
[Name] => medline
[Type] => Date
)
)
[Name] => History
[Type] => List
)
[19] => stdClass Object
(
[Name] => References
[Type] => List
)
[20] => stdClass Object
(
[Name] => HasAbstract
[Type] => Integer
)
[21] => stdClass Object
(
[Name] => PmcRefCount
[Type] => Integer
)
[22] => stdClass Object
(
[Name] => FullJournalName
[Type] => String
)
[23] => stdClass Object
(
[Name] => SO
[Type] => String
)
)
)
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42410&edit=1