Hello jUDDI users:
We are getting over the task of creating a publisher and then creating a
corresponding TModel "on the fly", that is, programmatically. We had dig
through jUDDI's code base and find it ourselves (hopefully, we have right
solutions which won't affect our future deployments with jUDDI!).
Anyway, why does EntityCreator.buildFromString(...) throw ClassCastException
whereas EntityCreator.buildFromDoc(...) does not? See below for an example.
THIS SNIPPET WORKS [EntityCreator.buildFromDoc]:
============================================
org.uddi.api_v3.TModel tmIn =
(org.uddi.api_v3.TModel)EntityCreator.buildFromDoc(tModelXml,
"org.uddi.api_v3");
(wheretModelXml is a file that we create using java.io package, save it
temporarily, and read from it again -- since buildFromString throws the
exception below..).
THIS SNIPPET THROWS ClassCastException [EntityCreator.buildFromString]:
==========================================================
org.uddi.api_v3.TModel tmIn =
(org.uddi.api_v3.TModel)EntityCreator.buildFromString("<custom run-time created
saveTModel string>", "org.uddi.api_v3");
For our requirement, EntityCreator.buildFromString(...) is lot more desirable,
but it doesn't like the ClassCast of its return type to TModel.
Any thoughts, ideas, insight? Thank you.