2017-06-26 2 views
0

Ich verwende IDL, um Java-Klassen zu kompilieren. Als ich versuchte zu kompilieren, sagte es, dass es Werttyp nicht erkennt. Hier ist die Zusammenstellung Befehl, Antwort und einen entsprechenden Code:IDL-Compiler erkennt Werttyp nicht

"C: \ Programme \ Java \ jdk1.8.0_121 \ bin \ idlj.exe" -fall StockMarket.idl

Erwartet einer der typedef' Struktur‘ union' enum 'const' Ausnahme' readonly' Attribut 'oneway' float' double' long 'short' unsigned' char' wchar 'boolean' Oktett' any' string 'wstring' '::' Leere' ValueBase'; encountered Valuetype'. StockInfo Valuetype {

Modul Stockmarket {

exception UnknownSymbol { 
    string symbol; 
}; 

typedef string StockSymbol; 

typedef sequence<StockSymbol> StockSymbolList; 

interface StockServer { 
    float getStockValue(in StockSymbol symbol) raises (UnknownSymbol); 

    StockSymbolList getStockSymbols(); 

    valuetype StockInfo { 
     public StockSymbol name; 
     public float value; 

     string toString(); 
    }; 

    sequence<StockInfo> getStockInfo(); 
}; 

};

+0

Veröffentlichen Sie die Schnittstelle, die Sie kompilieren. – duffymo

+0

Ich sehe nicht, wie die gesamte Schnittstelle notwendig ist, aber sicher. – Hiken

Antwort

0

Anscheinend muss die Definition von valuetypes außerhalb von Schnittstellen sein. Beats me warum.