|
Posted by Chris Hemmings on 10/10/05 12:40
Hello,
Can anyone explain how this works, and, how to fix it. I'm can't find
any documentation on the problem I am having.
I'm using a .NET webservice and a PHP SOAP call using version 5.0.4.
The returned result does not seem correct because of all the stuff at
the top, the 'xs' stuff. This makes the result invalid XML because
there are two roots to the document, <xs:schema> and <diffgr:diffgram>
I use the following call to the service and this seems to work correctly.
<?php
$client = new
SoapClient(
"http://xxxxxxx/authorswebservice/authorsservice.asmx?WSDL"
);
$response=$client->GetAuthors();
$xmls=$response->GetAuthorsResult->any;
?>
$xmls then contains:
<xs:schema xmlns:mstns="http://www.tempuri.org/authors1.xsd"
xmlns="http://www.tempuri.org/authors1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="authors1"
targetNamespace="http://www.tempuri.org/authors1.xsd"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="authors1" msdata:IsDataSet="true" msdata:Locale="en-GB">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="authors">
<xs:complexType>
<xs:sequence>
<xs:element name="au_id" type="xs:string" />
<xs:element name="au_lname" type="xs:string" />
<xs:element name="au_fname" type="xs:string" />
<xs:element name="city" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:authors" />
<xs:field xpath="mstns:au_id" />
</xs:unique>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<authors1 xmlns="http://www.tempuri.org/authors1.xsd">
<authors diffgr:id="authors19" msdata:rowOrder="1">
<au_id>807-91-6654</au_id>
<au_lname>Panteley</au_lname>
<au_fname>Sylvia</au_fname>
<city>Rockville</city>
</authors>
<authors diffgr:id="authors20" msdata:rowOrder="2">
<au_id>846-92-7186</au_id>
<au_lname>Hunter</au_lname>
<au_fname>Sheryl</au_fname>
<city>Palo Alto</city>
</authors>
<authors diffgr:id="authors21" msdata:rowOrder="3">
<au_id>893-72-1158</au_id>
<au_lname>McBadden</au_lname>
<au_fname>Heather</au_fname>
<city>Vacaville</city>
</authors>
<authors diffgr:id="authors22" msdata:rowOrder="4">
<au_id>899-46-2035</au_id>
<au_lname>Ringer</au_lname>
<au_fname>Anne</au_fname>
<city>Salt Lake City</city>
</authors>
<authors diffgr:id="authors23" msdata:rowOrder="5">
<au_id>998-72-3567</au_id>
<au_lname>Ringer</au_lname>
<au_fname>Albert</au_fname>
<city>Salt Lake City</city>
</authors>
</authors1>
</diffgr:diffgram>
Any thoughts why this is happening, and, how I can get rid of the 'xs'
stuff.
Thanks,
Chris.
Navigation:
[Reply to this message]
|