M
msdnuniv
Hello!
i am desparetely trying to consume a PHP Webservice in VB.NET 2005.
I can add the webreference, compile without errors and see the methods of
the webservice.
But on runtime it tells me {"There is an error in XML document (6, 62)."}.
Inner Exception:
{"Cannot assign object of type System.Xml.XmlNode[] to an object of type
System.String."}
Envelope that comes from the webservice:
_________________________________________
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:ns1='urn:xmethods-mhd_ArticleDetails'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:ns2='http://xml.apache.org/xml-soap'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<SOAP-ENV:Body>
<ns1:getArticleDetailsResponse>
<details xsi:type='ns2:Map'>
<item>
<key xsi:type='xsd:string'>
title
</key>
<value xsi:type='xsd:string'>
SGB 3 Sozialgesetzbuch Drittes Buch
</value>
</item>
<item>
<key xsi:type='xsd:string'>
headline
</key>
<value xsi:type='xsd:string'>
Viertes Kapitel: Leistungen an Arbeitnehmer Achter
Abschnitt: Entgeltersatzleistungen Zweiter Unterabschnitt: Arbeitslosengeld
Erster Titel: Regelvoraussetzungen
</value>
</item>
</details>
</ns1:getArticleDetailsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Relevant part of WSDL (no complex types because i did not get them to import
at all in .NET):
__________________________
<message name="getArticleDetailsRequest">
<part name="artId" type="xsd:int"/>
</message>
<message name="getArticleDetailsResponse">
<part name="details" type="xsd:ArrayOfString"/>
</message>
____________
Strange: I defined ArrayOfString, but .NET expects just string.
How can I get that to run?
Thank you!
Best Regards,
Dirk
i am desparetely trying to consume a PHP Webservice in VB.NET 2005.
I can add the webreference, compile without errors and see the methods of
the webservice.
But on runtime it tells me {"There is an error in XML document (6, 62)."}.
Inner Exception:
{"Cannot assign object of type System.Xml.XmlNode[] to an object of type
System.String."}
Envelope that comes from the webservice:
_________________________________________
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:ns1='urn:xmethods-mhd_ArticleDetails'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:ns2='http://xml.apache.org/xml-soap'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<SOAP-ENV:Body>
<ns1:getArticleDetailsResponse>
<details xsi:type='ns2:Map'>
<item>
<key xsi:type='xsd:string'>
title
</key>
<value xsi:type='xsd:string'>
SGB 3 Sozialgesetzbuch Drittes Buch
</value>
</item>
<item>
<key xsi:type='xsd:string'>
headline
</key>
<value xsi:type='xsd:string'>
Viertes Kapitel: Leistungen an Arbeitnehmer Achter
Abschnitt: Entgeltersatzleistungen Zweiter Unterabschnitt: Arbeitslosengeld
Erster Titel: Regelvoraussetzungen
</value>
</item>
</details>
</ns1:getArticleDetailsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Relevant part of WSDL (no complex types because i did not get them to import
at all in .NET):
__________________________
<message name="getArticleDetailsRequest">
<part name="artId" type="xsd:int"/>
</message>
<message name="getArticleDetailsResponse">
<part name="details" type="xsd:ArrayOfString"/>
</message>
____________
Strange: I defined ArrayOfString, but .NET expects just string.
How can I get that to run?
Thank you!
Best Regards,
Dirk