I don't think the Call interface really buys you very much except more work.
My recommendation is that you define a schema for your input and output XML structures, plug that schema into your WSDL, and let Axis do the work for you. Axis will automatically validate the XML type information as it's parsing the message, although if you have complex patterns or value restrictions, Axis won't do that level of validation. If that level of validation is necessary, you should use a handler. Regardless of whether you are using the stub interface or the call interface, you want to do the validation before Axis starts manipulating the Body, and that must be done in a handler. Anne On 6/4/05, James Taylor <[EMAIL PROTECTED]> wrote: > Hi, > I want to develope an application that takes a xml request to book > flights > for a passenger. I need to map this to java objects and access a database > backend - which will also have to be mapped to the java objects so luckily > they > are nearly the same. As I was new to axis an web services I just took in a xml > string and parsed it to a xml representation using SAX and worked with the > beans from there. > But now I've gained a little understanding of web services I want to be > able to do it more efficiently. I think Its silly to do it my way as the info > is in xml anyways. Guess my approach was pretty insular but I got it to work > and learned a little on the way... well now would like to able to do this > using > document style approach but am not to sure on how to validate the shema and > pull > the xml I want out of the soap message. Also I want to add a little more > functionality to the xml mapped beans to accommodate for the > database/persistance mapping. > I think the axis wsdl2java will map the objects to xml and take care of > the > serialization but will it validate it first to see if its ok before sending > the > message? > See I think I might have more control if I use the call interface instead > of the wsdl2java to get at the xml but I'd have to map the xml to java beans > right??!! > Just want to see what the people who use this think. > Regards, > James. > -- > Between the question and the answer lies free will >
