// test custom binary declaration
XSTypeDefinition xsType = schemaModel.getTypeDefinition(">PingMsg", "http://jboss.org/test/ws/xop/doclit");
assertNotNull("Root type def not found", xsType);
XOPScanner scanner = new XOPScanner();
if (xsType instanceof XSComplexTypeDefinition)
{
XSComplexTypeDefinition xsComplexType = (XSComplexTypeDefinition)xsType;
XSTypeDefinition resultType = scanner.findXOPTypeDef(xsComplexType);
assertNotNull("Unable to find xop typedef in schema", resultType);
}
scanner.reset();
// test the xmime binary declaration
xsType = schemaModel.getTypeDefinition(">PingMsgResponse", "http://jboss.org/test/ws/xop/doclit");
assertNotNull("Root type def not found", xsType);
if (xsType instanceof XSComplexTypeDefinition)
{
XSComplexTypeDefinition xsComplexType = (XSComplexTypeDefinition)xsType;
XSTypeDefinition resultType = scanner.findXOPTypeDef(xsComplexType);
assertNotNull("Unable to find XOP typedef in schema", resultType);
}
}