when using C# null content from any array. WSDL trouble ?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ladon |
Fix Committed
|
Medium
|
Unassigned |
Bug Description
i think that WSDL generation may be broken, or at least incompatible with C# implementation of it as when trying to consume SOAP 1.1 from C#, any array will have null value even if Ladon will actually send some XML data.
i have seen another bug reported here telling that WSDL Array are broken, BTW the provided patch do not help, i think this is still broken and may be inner elements should be contained inside specific node rather than in "item" ?
here is how to reproduce this from the AlbumService example provided :
1/ from any Visual Studio project, as Console Application, first create a Service Web reference like explained here : http://
2/ code for the C# apps
---8<---
using System;
using System.Collections;
using System.
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using ConsoleApplicat
namespace ConsoleApplication6
{
class Program
{
static void Main(string[] args)
{
var filteredAlbums = albumService.
if (filteredAlbums
{
}
}
}
}
---8<---
when checking the result with SOAP UI, of course an XML result is provided, if we intercept the data sent with Fiddler to the C# program here is what is provided so one can check that is not a 'null' answer, BTW may be some inconsistencies occurs between the WSDL definition and/or namespace and the result provided, that prevent C# to understand how to unserialize the result ?
---8<---
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://
<SOAP-ENV:Body SOAP-ENV:
<
<result>
<item>
<band>
</band>
<songs>
<item>The Big Kahuna [Bonus Track].mp3</item>
<item>She Loves Me Not.mp3</item>
<item>She Loves Me Not [Spinna Crazy Dub Mix] [Bonus Track].mp3</item>
<item>Got That Feeling.mp3</item>
</songs>
</item>
<item>
<band>
</band>
<songs>
<item>The Celts.mp3</item>
<item>On My Way Home.mp3</item>
<item>The Memory Of Trees.mp3</item>
</songs>
</item>
<item>
<band>
</band>
<songs>
<item>New Year's Eve.mp3</item>
<item>Mom In Love, Daddy In Space.mp3</item>
</songs>
</item>
<item>
<band>
</band>
<songs>
<item>The Trial.mp3</item>
<item>Is There Anybody Out There?.mp3</item>
<item>Run Like Hell.mp3</item>
<item>The Show Must Go On.mp3</item>
<item>In The Flesh.mp3</item>
<item>Hey You.mp3</item>
</songs>
</item>
<item>
<band>
</band>
<songs>
<item>The Happiest Days Of Our Lives.mp3</item>
<item>One Of The Turns.mp3</item>
<item>In The Flesh?.mp3</item>
<item>The Thin Ice.mp3</item>
</songs>
</item>
</result>
<
</SOAP-ENV:Body>
</SOAP-
---8<---
Changed in ladon: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
I am going to confirm this since there is a problem. I have been in the situation once before but I could not find out what Windows's SOAP implementation expects. I could however conclude that Ladon's WSDL and SOAP envelope generation is consistent and upholding the SOAP standards. The problem is rather that Microsoft's SOAP client implementation is more or less build to work with the Microsoft SOAP server implementation. SOAP is rather flexible which is a problem in the real world, cause very few clients can live up to this flexibility. gSOAP is one of the best client implementations I know of, and it handles Ladons SOAP implementation just fine. So does Suds for Python and most of the PHP SOAP clients. Suds is the client i have used for testing.
BTW: the soap11 interface in Ladon has namespaces, and that doesn't work with Microsoft either, so I doubt that is the problem.
Just to go into solution mode in your case, I suggest you use JSON-WSP instead, there is a C# client here and that works: /github. com/mikrov/ jsonwsp- cs
https:/
Best regards Jakob