Actually you are doing the right thing.
I just run a similar test starting from this copybook:
01 LOV036.
15 LOV036-CLE-PDD-SUIV PIC X(200).
I then changed the cobolElement type and xsd restriction just like you did (both are needed):
<complexType name="Lov036">
<sequence>
<cb:cobolElement cobolName="LOV036-CLE-PDD-SUIV" levelNumber="15" picture="X(200)" srceLine="2" type="OCTET_STREAM_ITEM"/>
</appinfo>
</annotation>
<simpleType>
<restriction base="hexBinary">
</sequence>
</complexType>
<element name="lov036" type="tns:Lov036">
<annotation>
<appinfo>
<cb:cobolElement cobolName="LOV036" levelNumber="1" srceLine="1" type="GROUP_ITEM"/>
</appinfo>
</annotation>
</element>
Then I re-generate the binding code (important) and ran this test successfully:
public void testApp() throws Exception {
byte[] hostData = new byte[200];
for (int i = 0; i < 200; i++) {
hostData[i] = (byte) i;
}
Lov036Transformers xf = new Lov036Transformers();
byte[] javaData = xf.toJava(hostData).getLov036ClePddSuiv();
assertEquals("0001020304", HostData.toHexString(javaData).substring(0, 10));
}
Could it be you did not regenerate the transformers?