0 Replies Latest reply on Sep 9, 2003 2:13 PM by flitzie

    client has unmarshalling problem with IDL struct from JBoss

    flitzie Newbie

      I wrote an EJB that returns a simple IDL struct. The c++ client (mico 2.3.10) receives the result without any problems, but the unmarshalled values are wrong.
      I enabled hexdump in the jacorb.properties file to see the messages. The values set by the EJB are at the end of the message. But my client prints out the other values of the message.
      I thought it could be a marshalling problem from Java String (IDL wstring) to IDL string. So I generate with idlj respectively Jacorb's idl compiler the Helper and Holder Java classes and added them to the EJB, but without success. Even modifying TestBeanHelper.java

      _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);

      with

      _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc
      (org.omg.CORBA.TCKind.tk_string);

      didn't help.

      I don't realy understand the message from JBoss. Why is JBoss sending this 2147483393 and 'http://ravy:8083/' ?

      Do I have to configure JacORB or add some classes into my EJB for marshal/unmarshal long and string types?

      TIA

      flitzie


      --------------------------------------------------

      //IDL struct
      module ejb {
      module test {
      struct TestBean {
      long count;
      string name;
      };
      };
      };

      //java class of IDL struct
      public final class TestBean implements org.omg.CORBA.portable.IDLEntity
      {
      public int count = 0;
      public String name = null;

      public TestBean() {}

      public TestBean( int c, String n ) {
      count = c;
      name = n;
      }
      }

      //SessionBean
      public TestBean getBean()
      {
      TestBean tbean = new TestBean();
      tbean.count = 12;
      tbean.name = "it works";
      return tbean;
      }


      //server.log

      Hexdump [sendMessages()] len=82,82
      2003-09-07 23:05:54,437 INFO [STDOUT] 47
      2003-09-07 23:05:54,437 INFO [STDOUT] 49
      2003-09-07 23:05:54,437 INFO [STDOUT] 4F
      2003-09-07 23:05:54,437 INFO [STDOUT] 50
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 01
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 01
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 46
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] GIOP .... ...F ....
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 05
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 7F
      2003-09-07 23:05:54,437 INFO [STDOUT] FF
      2003-09-07 23:05:54,437 INFO [STDOUT] FF
      2003-09-07 23:05:54,437 INFO [STDOUT] 01
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 12
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] .... .... .... ....
      2003-09-07 23:05:54,437 INFO [STDOUT] 68
      2003-09-07 23:05:54,437 INFO [STDOUT] 74
      2003-09-07 23:05:54,437 INFO [STDOUT] 74
      2003-09-07 23:05:54,437 INFO [STDOUT] 70
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 3A
      2003-09-07 23:05:54,437 INFO [STDOUT] 2F
      2003-09-07 23:05:54,437 INFO [STDOUT] 2F
      2003-09-07 23:05:54,437 INFO [STDOUT] 72
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 61
      2003-09-07 23:05:54,437 INFO [STDOUT] 76
      2003-09-07 23:05:54,437 INFO [STDOUT] 79
      2003-09-07 23:05:54,437 INFO [STDOUT] 3A
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 38
      2003-09-07 23:05:54,437 INFO [STDOUT] 30
      2003-09-07 23:05:54,437 INFO [STDOUT] 38
      2003-09-07 23:05:54,437 INFO [STDOUT] 33
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] http ://r avy: 8083
      2003-09-07 23:05:54,437 INFO [STDOUT] 2F
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 0C
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 7F
      2003-09-07 23:05:54,437 INFO [STDOUT] FF
      2003-09-07 23:05:54,437 INFO [STDOUT] FF
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 09
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] /... .... .... ....
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 69
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 74
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 20
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 77
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 6F
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 72
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 6B
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 73
      2003-09-07 23:05:54,437 INFO [STDOUT]
      2003-09-07 23:05:54,437 INFO [STDOUT] .i.t . .w .o.r .k.s
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT] 00
      2003-09-07 23:05:54,437 INFO [STDOUT]
      ..


      Server answer:
      2147483393
      http://ravy:8083/