0 Replies Latest reply on Jun 15, 2006 6:34 AM by craig.barker

    JSR-181 and external XSDs into a DOM object

    craig.barker

      Hi All,

      I resonably new to WS and could use abit of guidance. I'm not sure if what i'm trying to do is possible, if i'm just not seeing how to do it with the tools JBossWS provides or if I need to rethink my design.

      I have a legacy java object which accepts DOM objects as it's input and does some heavy data mapping of the DOM content into our legacy RDBMS system. I can't change that object so I need to get a DOM object (or at least a raw stream of XML that i can poke into a DOM object) to it.

      I also have a set of predefined XSD's which contain the types and structures of data that our clients will be sending into us. Outside these constraints I have complete freedom of design and so I though why not use the latest available standards.

      So i've happily created the usual 'hello world' 181 annotated bean exposed as a web service that?s all fine.

      My issues come when moving upto a fuller implementation.. is it possible to tell JBoss, when it creates the WSDL file representing my service, to import my XSD types (or will I have to hand write this file and supply a wsdlLocation in my @WebService). Secondly how do I get the raw XML into my Java webMethod? I though I had it with using @WebParam but this appears to always bind the parameter into an internal Java object representation of the XML value, I just want the actual XML itself.

      I suppose I could let the binding occur but then i'd need to remarshall the object back into a DOM before sending it off to my legacy datamapper...Also this would entail about 100 extra objects being created in my application, i'd rather the XML was passed straight through somehow.

      All advice and guidance gratefully accepted....

      Cheers

      Craig