Click here to Skip to main content
15,905,877 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to resolve the XML Error Pin
Pete O'Hanlon6-May-11 0:13
mvePete O'Hanlon6-May-11 0:13 
AnswerRe: How to resolve the XML Error Pin
Eddy Vluggen6-May-11 0:04
professionalEddy Vluggen6-May-11 0:04 
GeneralRe: How to resolve the XML Error Pin
meeram3956-May-11 0:14
meeram3956-May-11 0:14 
GeneralRe: How to resolve the XML Error Pin
Eddy Vluggen6-May-11 0:36
professionalEddy Vluggen6-May-11 0:36 
GeneralRe: How to resolve the XML Error Pin
meeram3956-May-11 1:21
meeram3956-May-11 1:21 
QuestionHow to format a datetime to display day of week and date? Pin
Goalie355-May-11 10:39
Goalie355-May-11 10:39 
AnswerRe: How to format a datetime to display day of week and date? Pin
dbrenth5-May-11 10:51
dbrenth5-May-11 10:51 
AnswerRe: How to format a datetime to display day of week and date? Pin
Luc Pattyn5-May-11 10:51
sitebuilderLuc Pattyn5-May-11 10:51 
AnswerRe: How to format a datetime to display day of week and date? Pin
PIEBALDconsult5-May-11 16:17
mvePIEBALDconsult5-May-11 16:17 
AnswerRe: How to format a datetime to display day of week and date? Pin
Richard MacCutchan5-May-11 21:27
mveRichard MacCutchan5-May-11 21:27 
AnswerRe: How to format a datetime to display day of week and date? Pin
Goalie3511-May-11 5:00
Goalie3511-May-11 5:00 
QuestionHow to avoid closing mdiparent form while we close mdichild.? Pin
Paramu19735-May-11 4:21
Paramu19735-May-11 4:21 
AnswerRe: How to avoid closing mdiparent form while we close mdichild.? Pin
DaveyM695-May-11 7:17
professionalDaveyM695-May-11 7:17 
GeneralRe: How to avoid closing mdiparent form while we close mdichild.? Pin
Paramu19736-May-11 3:09
Paramu19736-May-11 3:09 
GeneralRe: How to avoid closing mdiparent form while we close mdichild.? Pin
DaveyM696-May-11 7:11
professionalDaveyM696-May-11 7:11 
GeneralRe: How to avoid closing mdiparent form while we close mdichild.? Pin
Paramu19736-May-11 7:53
Paramu19736-May-11 7:53 
QuestionHow to Apply Proerty in Control Pin
Anubhava Dimri5-May-11 0:12
Anubhava Dimri5-May-11 0:12 
AnswerRe: How to Apply Proerty in Control Pin
dasblinkenlight5-May-11 0:29
dasblinkenlight5-May-11 0:29 
AnswerRe: How to Apply Proerty in Control Pin
Ravi Sant5-May-11 0:36
Ravi Sant5-May-11 0:36 
QuestionAdd virtual device Pin
Pranit Kothari4-May-11 23:43
Pranit Kothari4-May-11 23:43 
AnswerRe: Add virtual device Pin
Dave Kreskowiak5-May-11 1:47
mveDave Kreskowiak5-May-11 1:47 
GeneralRe: Add virtual device Pin
Pranit Kothari5-May-11 1:57
Pranit Kothari5-May-11 1:57 
GeneralRe: Add virtual device Pin
fjdiewornncalwe5-May-11 3:00
professionalfjdiewornncalwe5-May-11 3:00 
AnswerRe: Add virtual device Pin
jschell5-May-11 8:14
jschell5-May-11 8:14 
QuestionWeb Service Returns Null, No Exceptions Pin
GlobX4-May-11 17:26
GlobX4-May-11 17:26 
I'm having a problem with a web service in my C# code. I've consumed the web service by adding a web reference and all is good, the reference is consumed correctly I'm getting all my proxy types flow through etc. etc.

When I run a method on the service, however, the returned object is null and no exceptions are thrown:
C#
// after this line, response is null
MethodResponse response = service.Method(methodRequest);

I'm running Fiddler in the background (HTTPS decryption is turned off, even though I'm simply running on HTTP) and I'm getting a legitimate XML response back - it maps perfectly to my response types. I've added some code where I can manually copy the XML response from Fiddler into the code, use an XmlDeserializer, and it works just fine.

I have noticed one thing, though. The request I send has an XML declaration at the beginning of it, whereas the response does not. If I set up Fiddler's auto-responder with the legit response and add an XML declaration to it, I get an exception:
There is an error in XML document (120, 15).
Unexpected end of file while parsing Name has occurred. Line 120, position 15.

That line and position are a bit of a red-herring, as they don't point to anything useful in particular (not even the EOF), and as I said before, the XML is valid. Also, there is no Name element in the XML at all, so I'm assuming it means that it's trying to parse a tag name (which one it doesn't say), not finding the end of it for whatever reason and then passing the EOF.

Any ideas as to what's going on or where I should look next?


Typical n-tiered architecture:
DB <-> Junk(0) <-> ... <-> Junk(n-1) <-> Pretty

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.