title: KSOAP2 java.lang.RuntimeException: Cannot serialize
body: <p>I am trying to use a method from a .net web service.</p>
  
  <p>The code behind for the web service has a '/' at the end of the namespace</p>
  
  <pre><code>[WebService(Namespace = "http://www.mynamespace.com/")]
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  </code></pre>
  
  <p>Here is the .net method call</p>
  
  <pre><code>POST /TelematicsWebService/Service.asmx HTTP/1.1
  Host: localhost
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  SOAPAction: "http://www.mynamespace.com/GetDevicesByBranch"
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;soap:Body&gt;
      &lt;GetDevicesByBranch xmlns="http://www.mynamespace.com/"&gt;
        &lt;branchNumber&gt;int&lt;/branchNumber&gt;
      &lt;/GetDevicesByBranch&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>Now the code calling the method looks like this</p>
  
  <pre><code>    @Override
      protected SoapObject doInBackground(Integer... branchNumber) {
  
          final String NAMESPACE = "http://www.mynamespace.com/";
          final String METHOD_NAME = "GetDevicesByBranch";
          final String SOAP_ACTION = NAMESPACE + METHOD_NAME;
          final String URL = "http://10.0.2.2/TelematicsWebService/Service.asmx";
  
          SoapObject response = null;
  
          try {
              SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
  
              PropertyInfo inputArgs = new PropertyInfo();
              inputArgs.setName("branchNumber");
              inputArgs.setValue(branchNumber);
              inputArgs.setType(Integer.class);
              request.addProperty(inputArgs);
  
              SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                      SoapEnvelope.VER11);
              envelope.dotNet = true;
              envelope.setOutputSoapObject(request);
  
              HttpTransportSE androidHttpTransport = new HttpTransportSE(URL,
                      25000);
              androidHttpTransport.call(SOAP_ACTION, envelope);
              response = (SoapObject) envelope.getResponse();
          } catch (Exception exception) {
              response = null;
          }
  
          return response;
      }
  </code></pre>
  
  <p>The line towards the end, <code>androidHttpTransport.call(SOAP_ACTION, envelope);</code>, throws an exception: <code>java.lang.RuntimeException: Cannot serialize: [Ljava.lang.Integer;@412e0cf0</code></p>
  
  <p>I can't find a solution to this issue, any suggestions?</p>