title: How to create new record from web service in ADF?
body: <p>I have created a class and published it as web service. I have created a web method like this:</p>
  
  <pre><code>    public void addNewRow(MyObject cob) {
      MyAppModule myAppModule = new MyAppModule();
      try {
          ViewObjectImpl vo = myAppModule.getMyVewObject1();
      ================&gt; vo object is now null
          Row r = vo.createRow();
          r.setAttribute("Param1", cob.getParam1());
          r.setAttribute("Param2", cob.getParam2());
          vo.executeQuery();
          getTransaction().commit();
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>As I have written in code, myAppModule.getMyVewObject1() returns a null object. I do not understand why! As far as I know AppModule has to initialize the object by itself when I call "getMyVewObject1()" but maybe I am wrong, or maybe this is not the way it should be for web methods. Has anyone ever faced this issue? Any help would be very appreciated.</p>