Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 09-25-2006
ChenQingQing ChenQingQing is offline
Registered User
 
 
Join Date: May 2006
Posts: 27
Question slice2java

ICE version 3.01

I use slice2java --stream to produce some java code from slice. But the code produced shows some problem with Ice.StringSeqHelper's read and write methods. the code call this methods with a InputStream or OutputStream parameter while StringSeqHelper class requires with BasicStream.

what is the wrong?
__________________
QingQing Chen

BeiJing Gaov Visual Tech Co., Ltd.

Mysee.com

Internal Administration Project
Reply With Quote
  #2 (permalink)  
Old 09-25-2006
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,060
You need to provide much more information when you ask for help, otherwise its impossible for us to help.

Please provide the slice file you are trying to compile, the slice2java command you are using, the Ice version, the JDK version you are using and the error messages that occur when you try to compile.
Reply With Quote
  #3 (permalink)  
Old 09-25-2006
ChenQingQing ChenQingQing is offline
Registered User
 
 
Join Date: May 2006
Posts: 27
Quote:
Originally Posted by matthew
You need to provide much more information when you ask for help, otherwise its impossible for us to help.

Please provide the slice file you are trying to compile, the slice2java command you are using, the Ice version, the JDK version you are using and the error messages that occur when you try to compile.
slice: (parts)

1. in modul management
struct UUID {
string idString;
};

2. in module SourceServer
struct ResourceUrl {
short resClass;
management::UUID resId;
};

struct Resource {
ResourceUrl resUrl;
int refCount;
Ice::StringSeq components;
};

---------------------------------------------------------------
slice2java command:

slice2java --stream --output-dir src -I*** -I*** ***
---------------------------------------------------------------
Ice version

3.01
---------------------------------------------------------------
JDK:
java version "1.5.0_06"
---------------------------------------------------------------
No slice2java runtime errors

Java doesn't need to complie

actually, there are serveral slice files with lots ice object. only with one
Resource.java with this problem

part of Resource.java code
...
public void
__write(Ice.OutputStream __outS)
{
resUrl.__write(__outS);
__outS.writeInt(refCount);
Ice.StringSeqHelper.write(__outS, components); //here the problem
}

public void
__read(Ice.InputStream __inS)
{
resUrl = new ResourceUrl();
resUrl.__read(__inS);
refCount = __inS.readInt();
components = Ice.StringSeqHelper.read(__inS); //here the problem
}
__________________
QingQing Chen

BeiJing Gaov Visual Tech Co., Ltd.

Mysee.com

Internal Administration Project
Reply With Quote
  #4 (permalink)  
Old 09-25-2006
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,060
The problem is that streaming support is not generated for the builtin sequence types so therefore the correct override is not present for the Ice::StringSeq. We will discuss this issue internally. However, in the meantime what you can do is add your own sequence<string> type ... something like:

Code:
sequence<string> MyStringSeq; 
struct Resource
{
ResourceUrl resUrl;
int refCount;
MyStringSeq components;
};
Reply With Quote
  #5 (permalink)  
Old 09-25-2006
rellik78 rellik78 is offline
Registered User
 
 
Join Date: Sep 2006
Posts: 14
hai,Chen.I am from Beijing too and I am learning Ice now.
My MSN is w_sea78@hotmail.com.We can exchange and
share the knowledge about Ice.
__________________
Name:Hai Wang
Eanglish name:Jason
Company:North Microelectronics
website:bj-nmc.cn
Our project:an industrial package
Project discriptions:
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is slice2java dashie Help Center 7 09-04-2006 07:21 AM
run slice2java for WinXP torrecam Help Center 1 02-21-2005 11:33 AM
slice2java command anitha Help Center 3 10-14-2004 10:35 PM
Patch for slice2java, v1.5.1 michi Patches 0 08-19-2004 06:53 PM
slice2java alexander Bug Reports 6 12-16-2003 02:15 PM


All times are GMT -4. The time now is 10:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.