473,406 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Web service client not understanding response

Hi there,

I am using a web service in VS2003 (the service itself is a dll - I think it
is made in Delphi).
When calling it, I get an InvalidOperationException: "There is an error in
XML document (2, 5587)", with an inner exception: "The referenced element
with ID '2' was not found in the document."

I use SOAP toolkit to trace the messages. Below are the return message and
the schema (shortened for clarity). They look fine to me (xmlspy validates
them fine).

Any help is greatly appreciated. I have no idea where to look.
Thanks,
Michel

<?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:berekenResponse xmlns:NS1="urn:TraditionalLifeIntf-TraditionalLife"
xmlns:NS2="bbGoudseTraditionalLife">
<NS2:UitvoerData id="1" xsi:type="NS2:UitvoerData">
<Verloop xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="NS2:TRisicoVerloopValue[16]">
<item href="#2"/>
</Verloop>
</NS2:UitvoerData>
<NS2:TRisicoVerloopValue id="2" xsi:type="NS2:TRisicoVerloopValue">
<xsd:datum xsi:type="xsd:date">2004-07-21</xsd:datum>
</NS2:TRisicoVerloopValue>
<return href="#1"/>
</NS1:berekenResponse>
</SOAP-ENV:Body></SOAP-ENV:Envelope>

The schema:

<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema" name="TraditionalLifeservice"
targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:ns1="bbGoudseTraditionalLife">
<types>
<xs:schema targetNamespace="bbGoudseTraditionalLife"
xmlns="bbGoudseTraditionalLife">
<xs:complexType name="UitvoerData">
<xs:sequence>
<xs:element name="Verloop" type="ns1:TRisicoVerloopValues"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TRisicoVerloopValues">
<xs:complexContent>
<xs:restriction base="soapenc:Array">
<xs:sequence/>
<xs:attribute ref="soapenc:arrayType"
n1:arrayType="ns1:TRisicoVerloopValue[]"
xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TRisicoVerloopValue">
<xs:sequence>
<xs:element name="datum" type="xs:date"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
</definitions>
Nov 21 '05 #1
3 2372
can you not use literal rather than SOAP section-5 encoding ?

"Michel" <mi****@nospam.nl> wrote in message
news:cd**********@reader13.wxs.nl...
Hi there,

I am using a web service in VS2003 (the service itself is a dll - I think it is made in Delphi).
When calling it, I get an InvalidOperationException: "There is an error in
XML document (2, 5587)", with an inner exception: "The referenced element
with ID '2' was not found in the document."

I use SOAP toolkit to trace the messages. Below are the return message and
the schema (shortened for clarity). They look fine to me (xmlspy validates
them fine).

Any help is greatly appreciated. I have no idea where to look.
Thanks,
Michel

<?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:berekenResponse xmlns:NS1="urn:TraditionalLifeIntf-TraditionalLife"
xmlns:NS2="bbGoudseTraditionalLife">
<NS2:UitvoerData id="1" xsi:type="NS2:UitvoerData">
<Verloop xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="NS2:TRisicoVerloopValue[16]">
<item href="#2"/>
</Verloop>
</NS2:UitvoerData>
<NS2:TRisicoVerloopValue id="2" xsi:type="NS2:TRisicoVerloopValue">
<xsd:datum xsi:type="xsd:date">2004-07-21</xsd:datum>
</NS2:TRisicoVerloopValue>
<return href="#1"/>
</NS1:berekenResponse>
</SOAP-ENV:Body></SOAP-ENV:Envelope>

The schema:

<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema" name="TraditionalLifeservice"
targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:ns1="bbGoudseTraditionalLife">
<types>
<xs:schema targetNamespace="bbGoudseTraditionalLife"
xmlns="bbGoudseTraditionalLife">
<xs:complexType name="UitvoerData">
<xs:sequence>
<xs:element name="Verloop" type="ns1:TRisicoVerloopValues"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TRisicoVerloopValues">
<xs:complexContent>
<xs:restriction base="soapenc:Array">
<xs:sequence/>
<xs:attribute ref="soapenc:arrayType"
n1:arrayType="ns1:TRisicoVerloopValue[]"
xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TRisicoVerloopValue">
<xs:sequence>
<xs:element name="datum" type="xs:date"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
</definitions>

Nov 21 '05 #2
Hi Dino,

Thanks for the answer. The problem was the return envelope. The line:
<return href="#1"/>
Should be earlier in the response.

I've received a new service version and now it works fine.

Thanks,
Michel

"Dino Chiesa [Microsoft]" <di****@online.microsoft.com> wrote in message
news:Ob**************@TK2MSFTNGP12.phx.gbl...
can you not use literal rather than SOAP section-5 encoding ?

"Michel" <mi****@nospam.nl> wrote in message
news:cd**********@reader13.wxs.nl...
Hi there,

I am using a web service in VS2003 (the service itself is a dll - I think
it
is made in Delphi).
When calling it, I get an InvalidOperationException: "There is an error

in XML document (2, 5587)", with an inner exception: "The referenced element with ID '2' was not found in the document."

I use SOAP toolkit to trace the messages. Below are the return message and the schema (shortened for clarity). They look fine to me (xmlspy validates them fine).

Any help is greatly appreciated. I have no idea where to look.
Thanks,
Michel

<?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:berekenResponse xmlns:NS1="urn:TraditionalLifeIntf-TraditionalLife"
xmlns:NS2="bbGoudseTraditionalLife">
<NS2:UitvoerData id="1" xsi:type="NS2:UitvoerData">
<Verloop xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="NS2:TRisicoVerloopValue[16]">
<item href="#2"/>
</Verloop>
</NS2:UitvoerData>
<NS2:TRisicoVerloopValue id="2" xsi:type="NS2:TRisicoVerloopValue">
<xsd:datum xsi:type="xsd:date">2004-07-21</xsd:datum>
</NS2:TRisicoVerloopValue>
<return href="#1"/>
</NS1:berekenResponse>
</SOAP-ENV:Body></SOAP-ENV:Envelope>

The schema:

<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema" name="TraditionalLifeservice" targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:ns1="bbGoudseTraditionalLife">
<types>
<xs:schema targetNamespace="bbGoudseTraditionalLife"
xmlns="bbGoudseTraditionalLife">
<xs:complexType name="UitvoerData">
<xs:sequence>
<xs:element name="Verloop" type="ns1:TRisicoVerloopValues"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TRisicoVerloopValues">
<xs:complexContent>
<xs:restriction base="soapenc:Array">
<xs:sequence/>
<xs:attribute ref="soapenc:arrayType"
n1:arrayType="ns1:TRisicoVerloopValue[]"
xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TRisicoVerloopValue">
<xs:sequence>
<xs:element name="datum" type="xs:date"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
</definitions>


Nov 21 '05 #3

You'll be needing this :

Unofficial SOAP Bug fixes for Delphi - then your ws will workd wit
VS2003. Complex types are still iffy tho.

http://bdn.borland.com/article/0,1410,28514,00.html
Hope that helps

Wayne Jennings
Michel wrote:
*Hi there,

I am using a web service in VS2003 (the service itself is a dll -
think it
is made in Delphi).
When calling it, I get an InvalidOperationException: "There is a
error in
XML document (2, 5587)", with an inner exception: "The reference
element
with ID '2' was not found in the document."

I use SOAP toolkit to trace the messages. Below are the retur
message and
the schema (shortened for clarity). They look fine to me (xmlsp
validates
them fine).

Any help is greatly appreciated. I have no idea where to look.
Thanks,
Michel

<?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:berekenRespons
xmlns:NS1="urn:TraditionalLifeIntf-TraditionalLife"
xmlns:NS2="bbGoudseTraditionalLife">
<NS2:UitvoerData id="1" xsi:type="NS2:UitvoerData">
<Verloop xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="NS2:TRisicoVerloopValue[16]">
<item href="#2"/>
</Verloop>
</NS2:UitvoerData>
<NS2:TRisicoVerloopValue id="2" xsi:type="NS2:TRisicoVerloopValue">
<xsd:datum xsi:type="xsd:date">2004-07-21</xsd:datum>
</NS2:TRisicoVerloopValue>
<return href="#1"/>
</NS1:berekenResponse>
</SOAP-ENV:Body></SOAP-ENV:Envelope>

The schema:

<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema
name="TraditionalLifeservice"
targetNamespace="http://tempuri.org/
xmlns:tns="http://tempuri.org/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:ns1="bbGoudseTraditionalLife">
<types>
<xs:schema targetNamespace="bbGoudseTraditionalLife"
xmlns="bbGoudseTraditionalLife">
<xs:complexType name="UitvoerData">
<xs:sequence>
<xs:element name="Verloop" type="ns1:TRisicoVerloopValues"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TRisicoVerloopValues">
<xs:complexContent>
<xs:restriction base="soapenc:Array">
<xs:sequence/>
<xs:attribute ref="soapenc:arrayType"
n1:arrayType="ns1:TRisicoVerloopValue[]"
xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TRisicoVerloopValue">
<xs:sequence>
<xs:element name="datum" type="xs:date"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
</definitions>

-
waynejenning
-----------------------------------------------------------------------
Posted via http://www.mcse.m
-----------------------------------------------------------------------
View this thread: http://www.mcse.ms/message881418.htm

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Marty McDonald | last post by:
If I invoke a web service, and it throws an exception, I can see the exception if the client app is a .Net app. However, if the client app is not a .Net app, I only receive the HTTP 500 error. I...
0
by: KumarForG | last post by:
hi, i have a webservice and it's client in dotnet. the client is coded to assign the proxy property to the service object, with the proxy url and authentication details. however, there is a...
10
by: Alphonse Giambrone | last post by:
I am trying to develop a web service to accept a file uploaded via http post from a vba (Access) application. Thanks to helpful links in a vb newsgroup and my previous work with WinInet api I was...
3
by: Hans Merkl | last post by:
Hi, I am helping to build a web app that's pretty much a wrapper around a web service. The question now is how to store the handle of the web service object between requests. My client is using...
5
by: Gardar | last post by:
I have a .net webservice, developed with c++ managed extensions. The websrvice returns an xml-document with a reference to a server side xml-stylesheet in the format <?xml-stylesheet href =...
4
by: jf li | last post by:
I have a Asp.net web application and a Asp.net Web service application. The Web application is using HtmlInputFile to get a 50M size of file selected by end user, read the data of this file and...
2
by: John A | last post by:
I have a Web Service that I am reponsible for that we use for data integration purposes. Recently I have been tasked with sending some of this data to a third party. Because they need to receive...
5
by: Peter Lapic | last post by:
I have to create a image web service that when it receives an imageid parameter it will return a gif image from a file that has been stored on the server. The client will be an asp.net web page...
8
by: semedao | last post by:
Hi , I need to develop some feature of web service that can notify client - "Push" operation - and fast somebody know if it's possible , and how? When I say "Push" I mean - pure push :) , not...
6
by: nickname | last post by:
I want to pass some xml to a web service method, the xml will confirm to a defined schema. Lets say the schema is defined as: <xs:schema attributeFormDefault="unqualified"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.