title: Consume Axis2 webservice from .net
body: <p>Created a new web service client for axis2 webservice on my .net application. Calling some methods of webservice. .Net is calling webservice and read xml response but can not deserialize it. Generated proxy code is normally for .net, its ok. wsdl is passed wsi compliance.</p>
  
  <p>With wireshark i saw xml response is very normal. web service is responses the request normally but xml data is seem wrongly. let me show same data and contracts.</p>
  
  <p>xml response:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;soapenv:Body&gt;
      &lt;ns:blablaResponse xmlns:ns="http://blabla"&gt;
        &lt;ns:return type="blablaMessage" xmlns:ax274="http://blabla/xsd" xmlns:ax272="http://blabla/xsd" xmlns:ax271="http://blabla/xsd"&gt;
          &lt;ax274:blablaNo&gt;1&lt;/ax274:blablaNo&gt;
          &lt;ax274:blablaNo&gt;2&lt;/ax274:blablaNo&gt;
          &lt;ax274:blablaNo&gt;3&lt;/ax274:blablaNo&gt;
          &lt;ax274:blablaDescription&gt;TEXT 1&lt;/ax274:blablaDescription&gt;
          &lt;ax274:blablaDescription&gt;TEXT 2&lt;/ax274:blablaDescription&gt;
          &lt;ax274:blablaDescription&gt;TEXT 3&lt;/ax274:blablaDescription&gt;
          &lt;ax274:statustype="blblaState"&gt;
            &lt;ax272:textMessage/&gt;
            &lt;ax272:code&gt;OK&lt;/ax272:code&gt;
          &lt;/ax274:status&gt;
        &lt;/ns:return&gt;
      &lt;/ns:blablaResponse&gt;
    &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>auto generated data contract:</p>
  
  <pre><code>&lt;System.Diagnostics.DebuggerStepThroughAttribute(), _
  System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
  System.Runtime.Serialization.DataContractAttribute(Name:="blablaResponse", [Namespace]:="http://blabla"), _
  System.SerializableAttribute()&gt; _
  Partial Public Class blablaMessage
      Inherits Object
      Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
  
      &lt;System.NonSerializedAttribute()&gt; _
      Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject
  
      Private blablaNoField As ServiceReference1.ArrayOf_xsd_int
  
      Private blablaDesriptionField As ServiceReference1.ArrayOf_xsd_string
  
      Private statusField As ServiceReference1.status
  
      &lt;Global.System.ComponentModel.BrowsableAttribute(False)&gt; _
      Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData
          Get
              Return Me.extensionDataField
          End Get
          Set(value As System.Runtime.Serialization.ExtensionDataObject)
              Me.extensionDataField = value
          End Set
      End Property
  
      &lt;System.Runtime.Serialization.DataMemberAttribute(IsRequired:=True)&gt; _
      Public Property blablaNo() As ServiceReference1.ArrayOf_xsd_int
          Get
              Return Me.blablaNoField
          End Get
          Set(value As ServiceReference1.ArrayOf_xsd_int)
              If (Object.ReferenceEquals(Me.blablaNoField, value) &lt;&gt; True) Then
                  Me.blablaNoField = value
                  Me.RaisePropertyChanged("blablaNo")
              End If
          End Set
      End Property
  
      &lt;System.Runtime.Serialization.DataMemberAttribute(IsRequired:=True)&gt; _
      Public Property blablaDescription() As ServiceReference1.ArrayOf_xsd_string
          Get
              Return Me.blablaDesriptionField
          End Get
          Set(value As ServiceReference1.ArrayOf_xsd_string)
              If (Object.ReferenceEquals(Me.blablaDesriptionField, value) &lt;&gt; True) Then
                  Me.blablaDesriptionField = value
                  Me.RaisePropertyChanged("blablaDescription")
              End If
          End Set
      End Property
  
      &lt;System.Runtime.Serialization.DataMemberAttribute(IsRequired:=True)&gt; _
      Public Property status() As ServiceReference1.IslemSonucu
          Get
              Return Me.statusField
          End Get
          Set(value As ServiceReference1.IslemSonucu)
              If (Object.ReferenceEquals(Me.statusField, value) &lt;&gt; True) Then
                  Me.statusField = value
                  Me.RaisePropertyChanged("status")
              End If
          End Set
      End Property
  
      Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
  
      Protected Sub RaisePropertyChanged(ByVal propertyName As String)
          Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
          If (Not (propertyChanged) Is Nothing) Then
              propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
          End If
      End Sub
  End Class
  </code></pre>
  
  <p>Tried wsdl.exe svcutil.exe with some various parameters thats all failed. It's seem a serialization problem with axis2 because different kind of elements in same xml parent. 
  For example blablaNo and blablaDescription.</p>
  
  <p>How can i solve this problem. Thanks.</p>