[Mono-list] Problem with Soap deserialization
Spencer, Matthew
MSpencer at ndsuk.com
Wed Jul 18 09:35:11 EDT 2007
Hi All
I have been trying to track down this problem for a while, but have come
up blank so I thought I would ask you guys for help.
I am trying to write a simple Soap client to talk to a UPnP Directory
Service. The code looks something like this:
[WebServiceBindingAttribute Name="ContentDirectory
Namespace="urn:schemas-upnp-org:service:ContentDirectory:1")]
class ContendDirectoryControl : Protocols.SoapHttpClientProtocol {
public ContentDirectoryControl(Uri peer) {
this.Url=peer.ToString();
}
[Protocols.SoapDocumentMethodAttribute
("urn:schemas-upnp-org:service:ContentDirectory:1#Browse",
RequestNamespace=... same as above ..., ResponseNamespace= ...
same as above ...,
Use= .... Literal, SoapParameterStyle=Wrapped)]
public BrowseResponse Browse(string ObjectID, string BrowseFlag,
string Filter, uint StartingIndex, uint RequestedCount, string
SortCriteria) {
object[] results=this.Invoke("Browse",new object[]
{ObjectID,BrowseFlag,Filter,StartingIndex,RequestedCount,SortCriteria);
return((BrowseResponse)results[0]);
}
}
class BrowseResponse {
public strring Result;
public uint NumberReturnedl
public uint TotalMatches;
public uint UpdateID;
}
The request fires off ok to the peer and a valid soap response is
generated, however it is never deserialized in the client code (I am
using mono 1.2.4 if that makes a difference). I have hacked through the
deserialize code (in XmlSerializationReaderInterpreter) and it only
seems to be wanting to work with the element 'BroserResponse' and not
any of the elements of the class.
Have I missed something silly here? There is probably some attribute I
need to set on the BrowseResponse class to make this work.
Any help would be greatly appreciated.
Regards
Matt
*********************************************************************************************************
This e-mail is confidential, the property of NDS Ltd and intended for the addressee only. Any dissemination, copying or distribution of this message or any attachments by anyone other than the intended recipient is strictly prohibited. If you have received this message in error, please immediately notify the postmaster at nds.com and destroy the original message. Messages sent to and from NDS may be monitored. NDS cannot guarantee any message delivery method is secure or error-free. Information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. We do not accept responsibility for any errors or omissions in this message and/or attachment that arise as a result of transmission. You should carry out your own virus checks before opening any attachment. Any views or opinions presented are solely those of the author and do not necessarily represent those of NDS.
To protect the environment please do not print this e-mail unless necessary.
NDS Limited Registered office: One Heathrow Boulevard, 286 Bath Road, West Drayton, Middlesex, UB7 0DQ, United Kingdom. A company registered in England and Wales Registered no. 3080780 VAT no. GB 603 8808 40-00
**********************************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070718/e887e4c0/attachment-0001.html
More information about the Mono-list
mailing list