1

I am writing a .NET c# web service client, which queries a web service and gets a result set as response.

When I use this client to query the web service, it returns the result set but is returning only partial set. The same web service when invoked through SOAPUI returns 58 records, but in the .NET client it returns only 5. 58 is the expected number of records and I am not applying any filters while making the request from the .NET client.

These 5 records received by the .NET client have one of the elements returned with xsi:nil="true". The XSD of the resultset carries nillable property to be true for this element.

I have validated both the request and response in SOAP UI, these were validated fine.

Not sure why the .NET client is not able to receive the full data. Any thoughts?

Update: The reference class generated in .NET had [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] against the element marked as isnullable in XSD. So when I compose the post object, this element was getting added automatically. Since this was part of post the object, the web service was treating this as a filter condition hence returning records with xsi:nill=true. The issue is solved now. Thanks everyone for the support.

  • Are you using the most up to date version of the service in both SoapUI and in Visual Studio? – Greg Smith Nov 23 '12 at 20:10
  • Can you compare Raw data for both http requests: using SOAP UI and using .NET client? You can use [Fiddler](http://www.fiddler2.com/fiddler2/) to capture requests Raw data. Please take a look at everithing: http headers and POST data. – Alexander Stepaniuk Nov 23 '12 at 20:19
  • Is this a "Web Reference", or a "Service Reference"? The latter is the right one to use. – John Saunders Nov 23 '12 at 21:20

0 Answers0