title: Java Webservice returning null object to a .net client
body: <p>Can any one figure out my problem is... </p>
  
  <p>I'm calling a webmethod of a Java Webservice (Axis 1.4) from a .Net client. That method returns a Map object, and if i call it from an Axis client works fine, but in my c# code it´s always null.</p>
  
  <p>That's the WSDL:</p>
  
  <pre><code>&lt;wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:http.service.enlaces.portlet.ext.com" xmlns:intf="urn:http.service.enlaces.portlet.ext.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://model.enlaces.portlet.ext.com" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:http.service.enlaces.portlet.ext.com"&gt;
  
  &lt;wsdl:types&gt;
  
  &lt;schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xml.apache.org/xml-soap"&gt;
  &lt;import namespace="urn:http.service.enlaces.portlet.ext.com"/&gt;
  &lt;import namespace="http://model.enlaces.portlet.ext.com"/&gt;
  &lt;import namespace="http://schemas.xmlsoap.org/soap/encoding/"/&gt;
  &lt;complexType name="mapItem"&gt;
     &lt;sequence&gt;
   &lt;element name="key" nillable="true" type="xsd:anyType"/&gt;
   &lt;element name="value" nillable="true" type="xsd:anyType"/&gt;
     &lt;/sequence&gt;
  &lt;/complexType&gt;
  &lt;complexType name="Map"&gt;
     &lt;sequence&gt;
     &lt;element maxOccurs="unbounded" minOccurs="0" name="item" type="apachesoap:mapItem"/&gt;
     &lt;/sequence&gt;
  &lt;/complexType&gt;   
  &lt;/schema&gt;
   &lt;/wsdl:types&gt;
  
  &lt;wsdl:message name="getFoldersAndBookmarksRequest" /&gt;
  &lt;wsdl:message name="getFoldersAndBookmarksResponse"&gt;
      &lt;wsdl:part name="getFoldersAndBookmarksReturn" type="apachesoap:Map" /&gt;
  &lt;/wsdl:message&gt;
  
  &lt;wsdl:portType name="BookmarksEntryServiceSoap"&gt;
  &lt;wsdl:operation name="getFoldersAndBookmarks"&gt;
        &lt;wsdl:input name="getFoldersAndBookmarksRequest"  message="intf:getFoldersAndBookmarksRequest" /&gt;
        &lt;wsdl:output name="getFoldersAndBookmarksResponse" message="intf:getFoldersAndBookmarksResponse" /&gt;
      &lt;/wsdl:operation&gt;
    &lt;/wsdl:portType&gt;
  
  &lt;wsdl:binding name="Portlet_Bookmarks_BookmarksEntryServiceSoapBinding" type="intf:BookmarksEntryServiceSoap"&gt;
      &lt;wsdlsoap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" /&gt;
    &lt;wsdl:operation name="getFoldersAndBookmarks"&gt;
        &lt;wsdlsoap:operation soapAction="" /&gt;
        &lt;wsdl:input name="getFoldersAndBookmarksRequest"&gt;
          &lt;wsdlsoap:body use="encoded" namespace="urn:http.service.enlaces.portlet.ext.com" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /&gt;
        &lt;/wsdl:input&gt;
        &lt;wsdl:output name="getFoldersAndBookmarksResponse"&gt;
          &lt;wsdlsoap:body use="encoded" namespace="urn:http.service.enlaces.portlet.ext.com" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /&gt;
        &lt;/wsdl:output&gt;
      &lt;/wsdl:operation&gt;
  &lt;/wsdl:binding&gt;
  </code></pre>
  
  <p>and my c# auto-generated code:</p>
  
  <pre><code>[System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="urn:http.service.enlaces.portlet.ext.com", ResponseNamespace="urn:http.service.enlaces.portlet.ext.com")]
  [return: System.Xml.Serialization.SoapElementAttribute("getFoldersAndBookmarksReturn")]
  public Map getFoldersAndBookmarks() {
      object[] results = this.Invoke("getFoldersAndBookmarks", new object[0]);
      return ((Map)(results[0]));
  }
  
  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3082")]
  [System.SerializableAttribute()]
  [System.Diagnostics.DebuggerStepThroughAttribute()]
  [System.ComponentModel.DesignerCategoryAttribute("code")]
  [System.Xml.Serialization.SoapTypeAttribute(Namespace="http://xml.apache.org/xml-soap")]
  public partial class Map {
  
      private mapItem[] itemField;
  
      /// &lt;comentarios/&gt;
      public mapItem[] item {
          get {
              return this.itemField;
          }
          set {
              this.itemField = value;
          }
      }
  }
  </code></pre>
  
  <p>I,ve seen everywhere unfortunately, i don't find the solution. 
  Please, there are anyone what knows it?</p>