title: Using Complex datatype with python SUDS client
body: <p>I am trying to call webservice from python client using SUDS. When I call a function with a complex data type as input parameter, it is not passed correctly, but complex data type is getting returned correctly froma webservice call.</p>
  
  <pre><code>Webservice Type:
      Soap Binding 1.1
      Document/Literal 
  Webserver: 
      Weblogic 10.3 
  Python Version: 2.6.5, SUDS version: 0.3.9
  </code></pre>
  
  <p>here is the code I am using:</p>
  
  <p>Python Client:</p>
  
  <pre><code>from suds.client import Client
  url = 'http://192.168.1.3:7001/WebServiceSecurityOWSM-simple_ws-context-root/SimpleServicePort?WSDL'
  client = Client(url)
  print client
  
  #simple function with no operation on input...
  result = client.service.sopHello()
  print result
  result = client.service.add10(10)
  print result
  
  params = client.factory.create('paramBean')
  print params
  
  params.intval = 10
  params.longval = 20
  params.strval = 'string value'
  #print "params"
  print params
  
  try:
      result = client.service.printParamBean(params)
      print result
  except WebFault, e:
      print e
  
  try:
      result = client.service.modifyParamBean(params)
      print result
  except WebFault, e:
      print e
  
  print params
  </code></pre>
  
  <p>webservice java class:</p>
  
  <pre><code>package simple_ws;
  
  import javax.jws.Oneway;
  import javax.jws.WebMethod;
  import javax.jws.WebService;
  import javax.jws.soap.SOAPBinding;
  
  
  public class SimpleService {
      public SimpleService() {
  
      }
  
      public void sopHello(int i) {
          System.out.println("sopHello: hello");
      }
  
  
      public int add10(int i) {
          System.out.println("add10:");
          return 10+i;
      }
  
  
      public void printParamBean(ParamBean pb) {
          System.out.println(pb);
  
      }
      public ParamBean modifyParamBean(ParamBean pb) {
          System.out.println(pb);
          pb.setIntval(pb.getIntval()+10);
          pb.setStrval(pb.getStrval()+"blah blah");
          pb.setLongval(pb.getLongval()+200);
          return pb;
      }
  
  }
  </code></pre>
  
  <p>and the bean Class:</p>
  
  <pre><code>package simple_ws;
  
  public class ParamBean {
      int intval;
      String strval;
      long longval;
  
      public void setIntval(int intval) {
          this.intval = intval;
      }
  
      public int getIntval() {
          return intval;
      }
  
      public void setStrval(String strval) {
          this.strval = strval;
      }
  
      public String getStrval() {
          return strval;
      }
  
      public void setLongval(long longval) {
          this.longval = longval;
      }
  
      public long getLongval() {
          return longval;
      }
  
      public String toString() {
          String stri = "\nInt val:" +intval;
          String strstr = "\nstrval val:" +strval;
          String strl = "\nlong val:" +longval;
  
          return stri+strstr+strl;
      }
  }
  </code></pre>
  
  <p>so, as issue is like this:</p>
  
  <p>on call: <code>client.service.printParamBean(params)</code> in python client, 
  output on server side is:</p>
  
  <pre><code>Int val:0
  strval val:null
  long val:0
  </code></pre>
  
  <p>but on call: <code>client.service.modifyParamBean(params)</code></p>
  
  <p>Client output is:</p>
  
  <pre><code>(reply){
     intval = 10
     longval = 200
     strval = "nullblah blah"
   }
  </code></pre>
  
  <p>What am i doing wrong here??</p>