Why does .NET not issue messages or throw exceptions if it doesn't like
something in the response from a web service?? I am getting a response
object, but an array of custom objects within the response is null instead of
being populated. The SOAP response from the service looks good and I cannot
see anything wrong with the WSDL or XML schema. How do I get .NET to tell me
what it doesn't like? Is there a way to turn on some kind of tracing or
logging, or to get it to allow me to step into the deserialization code? 5 5535
You probably can in different ways... but I'd suggest u first use
tcpTrace [0] and check the soap messages and see if they conform to
schema (atleast visually); namespaces are right, elements are right.
[0] - http://www.pocketsoap.com/tcptrace/
frustratedWithD otNet wrote: Why does .NET not issue messages or throw exceptions if it doesn't like something in the response from a web service?? I am getting a response object, but an array of custom objects within the response is null instead of being populated. The SOAP response from the service looks good and I cannot see anything wrong with the WSDL or XML schema. How do I get .NET to tell me what it doesn't like? Is there a way to turn on some kind of tracing or logging, or to get it to allow me to step into the deserialization code?
--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com http://www.geniant.com
Thanks, but I already did that. I have a trace tool for the XML, and it looks
fine and conformant to the schema. This is document literal, BTW. No weird
soap encoding nonsense.
"Dilip Krishnan" wrote: You probably can in different ways... but I'd suggest u first use tcpTrace [0] and check the soap messages and see if they conform to schema (atleast visually); namespaces are right, elements are right.
[0] - http://www.pocketsoap.com/tcptrace/
frustratedWithD otNet wrote: Why does .NET not issue messages or throw exceptions if it doesn't like something in the response from a web service?? I am getting a response object, but an array of custom objects within the response is null instead of being populated. The SOAP response from the service looks good and I cannot see anything wrong with the WSDL or XML schema. How do I get .NET to tell me what it doesn't like? Is there a way to turn on some kind of tracing or logging, or to get it to allow me to step into the deserialization code?
-- HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com
Out of curiosity, did you also try taking your xml trace and writing a
small lil console app that tries to deserialize the trace that you have
into the expected type?
frustratedWithD otNet wrote: Thanks, but I already did that. I have a trace tool for the XML, and it looks fine and conformant to the schema. This is document literal, BTW. No weird soap encoding nonsense.
"Dilip Krishnan" wrote:
You probably can in different ways... but I'd suggest u first use tcpTrace [0] and check the soap messages and see if they conform to schema (atleast visually); namespaces are right, elements are right.
[0] - http://www.pocketsoap.com/tcptrace/
frustratedWit hDotNet wrote:
Why does .NET not issue messages or throw exceptions if it doesn't like something in the response from a web service?? I am getting a response object, but an array of custom objects within the response is null instead of being populated. The SOAP response from the service looks good and I cannot see anything wrong with the WSDL or XML schema. How do I get .NET to tell me what it doesn't like? Is there a way to turn on some kind of tracing or logging, or to get it to allow me to step into the deserialization code?
-- HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com
--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com http://www.geniant.com
No, how does one manually invoke deserialization for a fragment of XML?
"Dilip Krishnan" wrote: Out of curiosity, did you also try taking your xml trace and writing a small lil console app that tries to deserialize the trace that you have into the expected type?
frustratedWithD otNet wrote: Thanks, but I already did that. I have a trace tool for the XML, and it looks fine and conformant to the schema. This is document literal, BTW. No weird soap encoding nonsense.
"Dilip Krishnan" wrote:
You probably can in different ways... but I'd suggest u first use tcpTrace [0] and check the soap messages and see if they conform to schema (atleast visually); namespaces are right, elements are right.
[0] - http://www.pocketsoap.com/tcptrace/
frustratedWit hDotNet wrote:
Why does .NET not issue messages or throw exceptions if it doesn't like something in the response from a web service?? I am getting a response object, but an array of custom objects within the response is null instead of being populated. The SOAP response from the service looks good and I cannot see anything wrong with the WSDL or XML schema. How do I get .NET to tell me what it doesn't like? Is there a way to turn on some kind of tracing or logging, or to get it to allow me to step into the deserialization code?
-- HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com
-- HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com
Use the XmlSerializer class...
frustratedWithD otNet wrote: No, how does one manually invoke deserialization for a fragment of XML?
"Dilip Krishnan" wrote:
Out of curiosity, did you also try taking your xml trace and writing a small lil console app that tries to deserialize the trace that you have into the expected type?
frustratedWit hDotNet wrote:
Thanks, but I already did that. I have a trace tool for the XML, and it looks fine and conformant to the schema. This is document literal, BTW. No weird soap encoding nonsense.
"Dilip Krishnan" wrote: You probably can in different ways... but I'd suggest u first use tcpTrace [0] and check the soap messages and see if they conform to schema (atleast visually); namespaces are right, elements are right.
[0] - http://www.pocketsoap.com/tcptrace/
frustratedW ithDotNet wrote:
>Why does .NET not issue messages or throw exceptions if it doesn't like >somethin g in the response from a web service?? I am getting a response >object, but an array of custom objects within the response is null instead of >being populated. The SOAP response from the service looks good and I cannot >see anything wrong with the WSDL or XML schema. How do I get .NET to tell me >what it doesn't like? Is there a way to turn on some kind of tracing or >logging, or to get it to allow me to step into the deserialization code?
-- HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com
-- HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com
--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com http://www.geniant.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Linus |
last post by:
Hi,
I'm having problems with some very simple deserialization code
and would appreciate it very much if I could get some help here.
The following is the code:
=========================================================
XmlReader reader = new XmlTextReader("test.xml");
XmlValidatingReader vr = new XmlValidatingReader(reader);
|
by: Chrigel |
last post by:
Hi all,
We have problems deseralizing objects previously serialized as XML.
This did work fine with .NET 1.1 but since we have installed SP1,
deserializing fails (but serializing works). The error occurs within
the following line "return formatter.Deserialize(xmlReader) as
ParameterList;" and the "innerexception" sais "The root element is
missing.".
Thanks for any hints
|
by: Mike Sarbu |
last post by:
Hello all,
I have an XML file like this:
<?xml version="1.0" encoding="utf-8"?>
<SomeObject xmlns="http://www.abcinc.com/objectdefinition"
xmlns:someobj=http://www.abcinc.com/objectdefinition>
......
</SomeObject>
|
by: BH |
last post by:
I'm trying a simple object serialization and deserialization, and keep
getting this error:
System.Runtime.Serialization.SerializationException: Binary stream does not
contain a valid BinaryHeader, 0 possible causes, invalid stream or object
version change between serialization and deserialization.
Here's my code. it does nothing but to serialize a DataTable object into a
byte array, and then read the byte array back for...
|
by: parrot toes |
last post by:
Summary:
I have been trying to make requests of a web service provided by Axis using
a dotnet client with code generated by wsdl.exe and have
been getting exceptions when trying to process the response.
As a result of seraching news groups I guessed that the SOAP response
defines an array element in a way that causes the dotnet deserialization
routines to put the content in a generic object array (object) BUT the
content is supposed to...
| |
by: Greg Allen |
last post by:
I am consuming a web service and using the generated Reference.cs to access
the service and the objects associated with it.
I have run into a problem where some inherited classes are not being
deserialized. I have verified that the XML being returned by the service
contains the tags I am expecting, but they don't show up in the resulting
object. Here's the relevant portion of the Reference.cs file:
public class FormSection {
|
by: Marcus |
last post by:
I have a couple of classes looking like this:
========================================
public class AdminSettingsData
{
public string adminSettingsPath;
public string adminSettingsFile;
public string usersSettingsPath;
|
by: beachdog |
last post by:
I am building a client which accesses a web service (HTTP/SOAP), and I
think the response message is somehow not in agreement with my wsdl/
proxy class. I am able to access SOAP headers ok from the
deserialized response, but not elements in the body of the response.
Is there some way I can get some sort of debug tracing out of the
deserialization layer, or step thru it in debugger somehow, so I can
see how it is parsing the message and...
|
by: Vince Filby |
last post by:
Hi,
We are working with distributing Lucene.net. We have Master Index
Server which takes responsibility of distributing the index searching
to multiple Index Servers by calling the remote method Search(...) of
the Index Server. It is when the Master Server de-serializing the
response message from the Index Server, we got the following
SerializationException.
The Search method is overloaded:
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
| |
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
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...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |