473,756 Members | 9,646 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 InvalidOperatio nException: "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:encodingSty le="http://schemas.xmlsoap .org/soap/envelope/">
<NS1:berekenRes ponse xmlns:NS1="urn: TraditionalLife Intf-TraditionalLife "
xmlns:NS2="bbGo udseTraditional Life">
<NS2:UitvoerDat a id="1" xsi:type="NS2:U itvoerData">
<Verloop xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType=" NS2:TRisicoVerl oopValue[16]">
<item href="#2"/>
</Verloop>
</NS2:UitvoerData >
<NS2:TRisicoVer loopValue id="2" xsi:type="NS2:T RisicoVerloopVa lue">
<xsd:datum xsi:type="xsd:d ate">2004-07-21</xsd:datum>
</NS2:TRisicoVerl oopValue>
<return href="#1"/>
</NS1:berekenResp onse>
</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="Tradition alLifeservice"
targetNamespace ="http://tempuri.org/" xmlns:tns="http ://tempuri.org/"
xmlns:soap="htt p://schemas.xmlsoap .org/wsdl/soap/"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
xmlns:mime="htt p://schemas.xmlsoap .org/wsdl/mime/"
xmlns:ns1="bbGo udseTraditional Life">
<types>
<xs:schema targetNamespace ="bbGoudseTradi tionalLife"
xmlns="bbGoudse TraditionalLife ">
<xs:complexTy pe name="UitvoerDa ta">
<xs:sequence>
<xs:element name="Verloop" type="ns1:TRisi coVerloopValues "/>
</xs:sequence>
</xs:complexType>
<xs:complexTy pe name="TRisicoVe rloopValues">
<xs:complexCont ent>
<xs:restricti on base="soapenc:A rray">
<xs:sequence/>
<xs:attribute ref="soapenc:ar rayType"
n1:arrayType="n s1:TRisicoVerlo opValue[]"
xmlns:n1="http://schemas.xmlsoap .org/wsdl/"/>
</xs:restriction>
</xs:complexConte nt>
</xs:complexType>
<xs:complexTy pe name="TRisicoVe rloopValue">
<xs:sequence>
<xs:element name="datum" type="xs:date"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
</definitions>
Nov 21 '05 #1
3 2382
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 InvalidOperatio nException: "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:encodingSty le="http://schemas.xmlsoap .org/soap/envelope/">
<NS1:berekenRes ponse xmlns:NS1="urn: TraditionalLife Intf-TraditionalLife "
xmlns:NS2="bbGo udseTraditional Life">
<NS2:UitvoerDat a id="1" xsi:type="NS2:U itvoerData">
<Verloop xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType=" NS2:TRisicoVerl oopValue[16]">
<item href="#2"/>
</Verloop>
</NS2:UitvoerData >
<NS2:TRisicoVer loopValue id="2" xsi:type="NS2:T RisicoVerloopVa lue">
<xsd:datum xsi:type="xsd:d ate">2004-07-21</xsd:datum>
</NS2:TRisicoVerl oopValue>
<return href="#1"/>
</NS1:berekenResp onse>
</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="Tradition alLifeservice"
targetNamespace ="http://tempuri.org/" xmlns:tns="http ://tempuri.org/"
xmlns:soap="htt p://schemas.xmlsoap .org/wsdl/soap/"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
xmlns:mime="htt p://schemas.xmlsoap .org/wsdl/mime/"
xmlns:ns1="bbGo udseTraditional Life">
<types>
<xs:schema targetNamespace ="bbGoudseTradi tionalLife"
xmlns="bbGoudse TraditionalLife ">
<xs:complexTy pe name="UitvoerDa ta">
<xs:sequence>
<xs:element name="Verloop" type="ns1:TRisi coVerloopValues "/>
</xs:sequence>
</xs:complexType>
<xs:complexTy pe name="TRisicoVe rloopValues">
<xs:complexCont ent>
<xs:restricti on base="soapenc:A rray">
<xs:sequence/>
<xs:attribute ref="soapenc:ar rayType"
n1:arrayType="n s1:TRisicoVerlo opValue[]"
xmlns:n1="http://schemas.xmlsoap .org/wsdl/"/>
</xs:restriction>
</xs:complexConte nt>
</xs:complexType>
<xs:complexTy pe name="TRisicoVe rloopValue">
<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******** ******@TK2MSFTN GP12.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 InvalidOperatio nException: "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:encodingSty le="http://schemas.xmlsoap .org/soap/envelope/">
<NS1:berekenRes ponse xmlns:NS1="urn: TraditionalLife Intf-TraditionalLife "
xmlns:NS2="bbGo udseTraditional Life">
<NS2:UitvoerDat a id="1" xsi:type="NS2:U itvoerData">
<Verloop xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType=" NS2:TRisicoVerl oopValue[16]">
<item href="#2"/>
</Verloop>
</NS2:UitvoerData >
<NS2:TRisicoVer loopValue id="2" xsi:type="NS2:T RisicoVerloopVa lue">
<xsd:datum xsi:type="xsd:d ate">2004-07-21</xsd:datum>
</NS2:TRisicoVerl oopValue>
<return href="#1"/>
</NS1:berekenResp onse>
</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="Tradition alLifeservice" targetNamespace ="http://tempuri.org/" xmlns:tns="http ://tempuri.org/"
xmlns:soap="htt p://schemas.xmlsoap .org/wsdl/soap/"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
xmlns:mime="htt p://schemas.xmlsoap .org/wsdl/mime/"
xmlns:ns1="bbGo udseTraditional Life">
<types>
<xs:schema targetNamespace ="bbGoudseTradi tionalLife"
xmlns="bbGoudse TraditionalLife ">
<xs:complexTy pe name="UitvoerDa ta">
<xs:sequence>
<xs:element name="Verloop" type="ns1:TRisi coVerloopValues "/>
</xs:sequence>
</xs:complexType>
<xs:complexTy pe name="TRisicoVe rloopValues">
<xs:complexCont ent>
<xs:restricti on base="soapenc:A rray">
<xs:sequence/>
<xs:attribute ref="soapenc:ar rayType"
n1:arrayType="n s1:TRisicoVerlo opValue[]"
xmlns:n1="http://schemas.xmlsoap .org/wsdl/"/>
</xs:restriction>
</xs:complexConte nt>
</xs:complexType>
<xs:complexTy pe name="TRisicoVe rloopValue">
<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 InvalidOperatio nException: "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:encodingSty le="http://schemas.xmlsoap .org/soap/envelope/">
<NS1:berekenRes pons
xmlns:NS1="urn: TraditionalLife Intf-TraditionalLife "
xmlns:NS2="bbGo udseTraditional Life">
<NS2:UitvoerDat a id="1" xsi:type="NS2:U itvoerData">
<Verloop xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType=" NS2:TRisicoVerl oopValue[16]">
<item href="#2"/>
</Verloop>
</NS2:UitvoerData >
<NS2:TRisicoVer loopValue id="2" xsi:type="NS2:T RisicoVerloopVa lue">
<xsd:datum xsi:type="xsd:d ate">2004-07-21</xsd:datum>
</NS2:TRisicoVerl oopValue>
<return href="#1"/>
</NS1:berekenResp onse>
</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="Tradition alLifeservice"
targetNamespace ="http://tempuri.org/
xmlns:tns="http ://tempuri.org/"
xmlns:soap="htt p://schemas.xmlsoap .org/wsdl/soap/"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
xmlns:mime="htt p://schemas.xmlsoap .org/wsdl/mime/"
xmlns:ns1="bbGo udseTraditional Life">
<types>
<xs:schema targetNamespace ="bbGoudseTradi tionalLife"
xmlns="bbGoudse TraditionalLife ">
<xs:complexTy pe name="UitvoerDa ta">
<xs:sequence>
<xs:element name="Verloop" type="ns1:TRisi coVerloopValues "/>
</xs:sequence>
</xs:complexType>
<xs:complexTy pe name="TRisicoVe rloopValues">
<xs:complexCont ent>
<xs:restricti on base="soapenc:A rray">
<xs:sequence/>
<xs:attribute ref="soapenc:ar rayType"
n1:arrayType="n s1:TRisicoVerlo opValue[]"
xmlns:n1="http://schemas.xmlsoap .org/wsdl/"/>
</xs:restriction>
</xs:complexConte nt>
</xs:complexType>
<xs:complexTy pe name="TRisicoVe rloopValue">
<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
4201
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 believe this is due mostly to the fact that the non-.Net apps are using POST instead of SOAP. If the non-.Net apps were using SOAP, they too would in fact "see" the exception. Is this true? Thanks!
0
303
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 particular configuration with seperate proxy and firewall where the invocation does not work.
10
827
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 able to write the code to do the upload. I know this works because I tested by posting to an asp page that saves the file. Now I need to create a .NET web service to accept and save the file. Of all the web service samples I found, the only ones...
3
1746
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 SQL server for session state so I don't think I can store the web service handle there since it's not serializable. Opening up a connection to this particular service is quite slow so I don't want to reopen it for every request.
5
2033
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 = 'StyleSheet.xsl' type = 'text/xsl'?> This allows the client to retrieve the stylesheet for rendering the xml, if needed. When I test this with IE it detects the stylesheet reference and tries to get the stylesheet file with the following "GET"
4
6211
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 pass the data to the web service. I already modified both web.config files and changed maxRequestLength to 60000(kb). When I debug the upload process, it seems the Web application can get the 50M file and read the data without problem, but when the...
2
1775
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 the data in real time. They have requested that I subscribe to a Web Service that they have published. The only problem is that they often take longer than 30 seconds to process my data before I get a response back from them. This is taking far...
5
5043
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 that calls the web service to render a vertical strip of images. After doing some research I am unable to find some vb.net code that can assist in what I want to achieve. The closest thing I found was
8
11184
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 mechanism of client checking for messages in interval... thanks
6
13824
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" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="books"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" name="book"> <xs:complexType>
0
9292
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9901
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9878
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8733
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6551
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3827
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3392
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2694
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.