我的测试开始于 http://www.ejbtutorial.com/corba/tutorial-for-corba-hello-world-using-java 并且工作得很好。
因为这是使用端口1050的客户端和服务器,(在使用TCPDUMP的Linux中,我开始跟踪数据捕获并且稍后将使用WIRESHARK保存到PCAP中)
“命令行:”
root @ ubuntu:〜/ add / AdditionServer#java StartClient -ORBInitialPort 1050 -ORBInitialHost localhost
屏幕输出:
欢迎使用加法系统:
输入:
1
输入b:
5
添加的结果是:6
在从客户端到服务器的数据捕获的某些部分:
> General Inter-ORB Protocol
> GIOP Header
> Magic: GIOP
> Version: 1.0
> .... ...0 = Little Endian: False
> Message type: Request (0)
> Message size: 248 Reassembled GIOP in frame: 4 General Inter-ORB Protocol Request
> ServiceContextList
> Sequence Length: 3
> ServiceContext
> 0000 0000 0000 0000 0000 0000 .... .... = VSCID: 0x000000
> .... .... .... .... .... .... 0001 0001 = SCID: Unknown (0x11)
> Sequence Length: 2
> Endianness: Big Endian (0)
> Context Data: .
> ServiceContext
> 0000 0000 0100 1110 0100 0101 .... .... = VSCID: 0x004e45
> .... .... .... .... .... .... 0000 0000 = SCID: 0x00
> Sequence Length: 2
> Endianness: Big Endian (0)
> Context Data: .
> ServiceContext
> 0000 0000 0000 0000 0000 0000 .... .... = VSCID: 0x000000
> .... .... .... .... .... .... 0000 0110 = SCID: SendingContextRunTime (0x06)
> Sequence Length: 166
> Endianness: Big Endian (0)
> Context Data: ......(IDL:omg.org/SendingContext/CodeBase:1.0............j........127.0.1.1..8............8..............................
> ................... ...............&......
> Request id: 5
> Response expected: 1
> Object Key length: 4
> Object Key: 494e4954
> Operation length: 3
> Request operation: get
> Requesting Principal Length: 0
> Stub data: 0000000c4e616d655365727669636500
我的问题是如何使ContextList序列长度:3到序列 长度:0使用Java代码?
非常感谢