.net - Debug C# webservice client -


i ran strange problem using c# webservice client call asp.net 2.0 webservice. service simple product search , returns array of products matching search term - see relevant part of wsdl file below.
c# client generated adding web reference in vs2010 (non-wcf) , comparison i'm using axis 1.4 java client.
using same search paramaters in both c# , java client call returns 50 products in c# client result array has length 1 while java client shows correct 50 elements.

i looking suggestions how locate problem - i've tried following:

  • compare xml returned webservice using tcp/ip monitor: xml looks identical c# vs. java , contains 50 products
  • compare http parameters using netcat: c# defaults http 1.1 while axis 1.4 uses http 1.0, changing c# client use http 1.0 no change anything
  • try soap 1.2 instead of soap 1.1: no effect
  • try httpgetprotocol, httppostprotocol instead of soap

any suggestions highly appreciated.


edit: full wsdl , generated code (reference.cs) can found here:
http://timmay.dk/reference.txt
http://timmay.dk/wsdl.txt

simplified wsdl part:

      <s:element name="search">     <s:complextype>       <s:sequence>         <s:element minoccurs="0" maxoccurs="1" name="searchterm" type="s:string" />         <s:element minoccurs="0" maxoccurs="1" name="startfrom" type="s:string" />         <s:element minoccurs="0" maxoccurs="1" name="numbertobereturned" type="s:string" />       </s:sequence>     </s:complextype>   </s:element>   <s:element name="searchresponse">     <s:complextype>       <s:sequence>         <s:element minoccurs="0" maxoccurs="1" name="searchresult" type="tns:searchresult" />       </s:sequence>     </s:complextype>   </s:element>   <s:complextype name="searchresult">     <s:sequence>       <s:element minoccurs="0" maxoccurs="1" name="products" type="tns:arrayofresponseproduct" />     </s:sequence>   </s:complextype>   <s:complextype name="arrayofresponseproduct">     <s:sequence>       <s:element minoccurs="0" maxoccurs="unbounded" name="responseproduct" nillable="true" type="tns:responseproduct" />     </s:sequence>   </s:complextype>   <s:complextype name="responseproduct">     <s:sequence>       <s:element minoccurs="0" maxoccurs="1" name="fields" type="tns:arrayofresponsefield" />     </s:sequence>     <s:attribute name="id" type="s:string" />   </s:complextype> 

from wsdl gather maxoccurs 1. seems should receive indeed 1 searchresult. however, result should contain object of type arrayofreponseproduct, contains unbounded amount of `responseproduct items. maybe not looking deep enough?

have tried check inside debugger variable inspectors (local, auto, immediate etc)? object typed, or untyped, in case may need cast first see contents?


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -