HighTechTalks DotNet Forums  

xml error in webservice SOAP response ?

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss xml error in webservice SOAP response ? in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jurjen de Groot
 
Posts: n/a

Default xml error in webservice SOAP response ? - 12-29-2007 , 09:26 AM






I'm 'consuming' a webservice written by a 3rd party wich uses Borland Soap
Server.
This all works fine, using the WSDL i've generated a Webservice and all
works fine,.... well almost. There are some 'webmethods' wich return a
exception.

System.InvalidOperationException was unhandled by user code


Message="There is an error in XML document (2, 1292)."

InnerException: System.InvalidOperationException
Message="The referenced element with ID '1' was not found in the
document."


Using a httpAnalyzer I've retrieved the response-XML (see below). I was just
wondering if it's possible that the problem is an array-indexing problem,
..NET using index '0' for the first entry and borland (seems to be) using
index '1' for their first entry ?


Anyone know about this ? (or know of a solution)

Best regards,
Jurjen de Groot
Netherlands.


<?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"
xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/">

<soap-env:body
soap-enc:encodingstyle="http://schemas.xmlsoap.org/soap/envelope/">

<ns1:get_res_kindsresponse xmlns:ns1="urn:uIntf-IMyInterface"
xmlns:ns2="urn:uIntf">

<return xsi:type="SOAP-ENC:Array"
soap-enc:arraytype="NS2:TReservationKind[1]"><item href="#1"/></return>

<ns2:treservationkind id="1" xsi:type="NS2:TReservationKind">

<res_type_num xsi:type="xsd:int">1</res_type_num>

<name xsi:type="xsd:string">Zaterdag</name>

<price1 xsi:type="xsd:double">21</price1>

<price2 xsi:type="xsd:double">23.5</price2>

<price_unit xsi:type="xsd:int">0</price_unit>

<price_sw_time xsi:type="xsd:string">6:00</price_sw_time>

</ns2:treservationkind>

</ns1:get_res_kindsresponse>

</soap-env:body>

</soap-env:envelope>


Reply With Quote
  #2  
Old   
Jurjen de Groot
 
Posts: n/a

Default Re: xml error in webservice SOAP response ? - 01-04-2008 , 04:03 AM






It would seem that not all webservices are created equal, this webservice is
not .NET compatible. Various options will have to be set on the 3rd party
SOAP server to make it compatible with .NET,
(http://qc.borland.com/wc/qcmain.aspx?d=14222 )


"Jurjen de Groot" <Jurjen.de.Groot (AT) xs4all (DOT) nl> wrote

Quote:
I'm 'consuming' a webservice written by a 3rd party wich uses Borland Soap
Server.
This all works fine, using the WSDL i've generated a Webservice and all
works fine,.... well almost. There are some 'webmethods' wich return a
exception.

System.InvalidOperationException was unhandled by user code


Message="There is an error in XML document (2, 1292)."

InnerException: System.InvalidOperationException
Message="The referenced element with ID '1' was not found in the
document."


Using a httpAnalyzer I've retrieved the response-XML (see below). I was
just wondering if it's possible that the problem is an array-indexing
problem, .NET using index '0' for the first entry and borland (seems to
be) using index '1' for their first entry ?


Anyone know about this ? (or know of a solution)

Best regards,
Jurjen de Groot
Netherlands.


?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"
xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"

soap-env:body
soap-enc:encodingstyle="http://schemas.xmlsoap.org/soap/envelope/"

ns1:get_res_kindsresponse xmlns:ns1="urn:uIntf-IMyInterface"
xmlns:ns2="urn:uIntf"

return xsi:type="SOAP-ENC:Array"
soap-enc:arraytype="NS2:TReservationKind[1]"><item href="#1"/></return

ns2:treservationkind id="1" xsi:type="NS2:TReservationKind"

res_type_num xsi:type="xsd:int">1</res_type_num

name xsi:type="xsd:string">Zaterdag</name

price1 xsi:type="xsd:double">21</price1

price2 xsi:type="xsd:double">23.5</price2

price_unit xsi:type="xsd:int">0</price_unit

price_sw_time xsi:type="xsd:string">6:00</price_sw_time

/ns2:treservationkind

/ns1:get_res_kindsresponse

/soap-env:body

/soap-env:envelope



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.