1 Reply Latest reply on Apr 22, 2005 4:13 AM by Thomas Diesler

    Unable to deserialize array as RPC/encoded input argument

    David AZOULAY Newbie

      Hello,

      I've got a EJB with these two service-endpoint methods :

      public ContentArray getAllContents()
      public void updateAllContents(ContentArray contentArray)

      where ContentArray is :

      public class ContentArray {
      private Content[] contentArray;

      public Content[] getContentArray() {
      return contentArray;
      }

      public void setContentArray(Content[] contentArray) {
      this.contentArray = contentArray;
      }
      }

      And Content :

      public class Content implements Serializable {
      private long id;
      private String title;
      private String body;
      (...)

      public Content() {
      this(0);
      }

      public Content(long id) {
      this.id = id;
      }

      public long getId() {
      return this.id;
      }

      public void setId(long id) {
      this.id = id;
      }

      public String getBody() {
      return body;
      }

      public String getTitle() {
      return title;
      }

      public void setBody(String string) {
      body = string;
      }

      public void setTitle(String string) {
      title = string;
      }
      (...)
      }

      I use wscompile to generate the WSDL file and the jaxrpc mapping file for rpc/encoded style.

      I have generated 2 plain webservice clients : one Java client using wscompile and one .net (C#) client using VisualStudio standard feature.

      NB : My target is to use the .net client, the Java client is just here to avoid investigating .net specific issues

      With both I have the same problem :

      I can retreive a ContentArray object calling getAllContents() but when I call updateContentArray(ContentArray contentArray) I always get the following error :

      org.xml.sax.SAXException: No deserializer defined for array type {http://com.xxx.yyy}Content

      Maybe is there something magical I should put by hand in ws4ee-deployment.xml although the generated WSDD file has already a mapping defined automatically (at least with JBoss 4.0.2RC1) for Content and ContentArray.

      Any help would be apreciated !


      PS :

      As a temporary "workaround" I turned to document/litteral style and then everything works fine...
      But the generation procedure is far too manual at these stage to be really usable in a project context :-(
      I suppose it will be easier in next versions...