all groups > dotnet web services > july 2004 >
You're in the

dotnet web services

group:

Web service client not understanding response


Web service client not understanding response Michel
7/21/2004 4:24:02 PM
dotnet web services:
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>

Re: Web service client not understanding response Dino Chiesa [Microsoft]
7/28/2004 5:12:41 PM
can you not use literal rather than SOAP section-5 encoding ?

[quoted text, click to view]

Re: Web service client not understanding response Michel
7/29/2004 1:24:11 PM
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

[quoted text, click to view]

Re: Web service client not understanding response waynejennings
8/11/2004 8:15:51 AM

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


[quoted text, click to view]


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