0 Replies Latest reply on Mar 17, 2003 4:32 PM by Peter McCombs

    Web service deserializing woes!

    Peter McCombs Newbie

      If it isn't one thing, it's another. :)

      Now I have a web service deployed, and a test client written.

      The web service is a facade Session bean generated by xdoclet, so it exposes the findByPrimaryKey, update and remove methods.

      For parameters, these methods accept and/or return one of these complex data types:

      UserPK (My primary key class)
      UserData (For the Data Object pattern)

      In my web-services.xml file, I have a typeMapping section for both of these types so that they can be properly deserialized by the server. Without that typeMapping, I get errors about not finding an appropriate deserializer.

      Anyway, now I get the following error at runtime (from my client test program):

      org.xml.sax.SAXException: Invalid element in com.cic.ejb.user.UserData - primaryKey

      I do not understand this error. There is no field or method in my UserData class called "primaryKey". The closest I can find is the "getPrimaryKey" method, which instantiates a new UserPK object, populates it with the entity id value (an Integer) and returns it to the caller.

      This error happens in the client test program when I attempt to invoke the remote findByPrimaryKey method on the UserFacadeService. The findByPrimaryKey method accepts a UserPK and returns a UserData type.

      Any ideas? Want to see the code?

      Thanks!

      -Peter