3 Replies Latest reply on Feb 6, 2006 4:29 AM by thomas.diesler

    No serializer found for class

    asbin88

      Hi,
      I got a problem with a serializer class not found by jboss.
      This is a .Net Client trying to receive a complex object.
      I can send complex objects so apparently the deserializer was created by wscompile, but I can not receive objects from jboss.
      Is this a wscompile/net problem or what could be the problem?

      Allways getting this error:



      An unhandled exception of type 'System.InvalidOperationException' occurred in System.Web.Services.dll

      Additional information: Client found response content type of 'text/html;charset=utf-8', but expected 'text/xml'.
      The request failed with the error message:
      --
      <html><head><title>Apache Tomcat/5.5 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.jboss.axis.AxisFault: java.io.IOException: java.io.IOException: No serializer found for class org.mrbibjay.interfaces.UserDTO$ReadOnlyUserDTO in registry org.jboss.axis.encoding.TypeMappingImpl@159f498
      org.jboss.axis.AxisFault.makeFault(AxisFault.java:99)
      org.jboss.axis.MessagePart.writeTo(MessagePart.java:303)
      org.jboss.axis.MessagePart.getAsString(MessagePart.java:591)
      org.jboss.axis.MessagePart.getAsBytes(MessagePart.java:447)
      org.jboss.axis.Message.getContentType(Message.java:471)
      org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:977)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      </pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5</h3></body></html>
      --.


        • 1. Re: No serializer found for class
          asbin88

          I forgot to say that I'm using jboss4.0.3SP1 and the Complex UserDTO type doesn't contain any array's.
          Thanks for your help :-)

          • 2. Re: No serializer found for class
            asbin88

            Well because nobody answered to my last posts I try to describe the problem more detailed. Maybe somebody knows a solution.

            I have a CMP Entity-Bean named UserBean containing some values like name, id, rights and so on , nothing special only Strings and Booleans.

            After running wscompile with the documentliteral option I get a UserDTO_LiteralSerializer.java and some Class files among other things a UserDTO$ReadOnlyUserDTO.class.

            After deploing the Wevservice I can access it with my .NET Client and can call methodes on a Session Bean called UserManager.

            Everything works if I want to send a UserDTO object from Net to Jboss and I can create new Users in my database.

            What I want to do next is call a methode like this UserDTO getUser(String id).

            This doesn't work because JBoss cann't find a serializer for class or
            g.mrbibjay.interfaces.UserDTO$ReadOnlyUserDTO. It cann't find it because its not there wscompile didn't create a UserDTO$ReadOnlyUserDTO_LiteralSerializer.

            So what am I doing wrong?

            Help appreciated ;-)

            • 3. Re: No serializer found for class
              thomas.diesler

              The *_LiteralSerializer is a JWSDP specific artifact and not needed in jboss. What you should look out for is the mapping of the schma type to the java class in jaxrpc-mapping.xml and whether this shows up correctly in the generated *.wsdd