When creating a new server instance based on WildFly 12 Runtime, the default classpath entries of such runtime do not include javax.websocket.
The workaround is to manually amend the default classpath entries for that runtime and add the missing module.
javax.websocket has always been there by default until WildFly 11 Runtime, I don't see why it shouldn't be there with WildFly 12 Runtime