Here's the stub I calling: public com.galileo.webservices.SubmitXmlResponseSubmitXmlResult submitXml(java.lang.String profile, com.galileo.webservices.SubmitXmlRequest request, com.galileo.webservices.SubmitXmlFilter filter )throws java.rmi.RemoteException { ... }
The constructor for the SubmitXmlRequest and SubmitXmlFilter classes take (MessageElement[] _any) as it's argument. I have a string of XML ... <stuff>...</stuff>. So my problem is how to convert my xml String into an array of MessageElement's. Ideally I want to avoid this altogether and have stubs that take and return String's of XML, but it looks like AXIS/WSDL2JAVA is forcing me to convert String's to object which it will serialise again... Seems a waste :-( So it would be grate if you can tell me how to generate the MessageElement array. It would be brillient if you could tell me how to avoid all this xml String's <-> object serialisation/deserialisation that I don't really want :-) >-----Original Message----- >From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] >Sent: 03 April 2007 22:01 >To: axis-user@ws.apache.org; [EMAIL PROTECTED] >Subject: Re: AXIS style > >I'm not sure where you got the idea that document style will map the >message to DOM-- unless your coding at the raw XML level -- but then >you wouldn't be using a stub. > >Document style will map the message to a Java object. If you define >the message in the WSDL as an opaque xs:string, then Axis will map it >to a String. (Be careful with this though -- the encoding/decoding >process is not especially robust.) If the WSDL describes the schema of >the message, then the stub should map the message to a corresponding >object (typically a bean). > >The only reason why Axis would map it to DOM is if you configure Axis >to use the "Message" style. (That would be defined in your >client-config.xml.) > >If you're using Axis2, then it maps the message to AXIOM (the Axis2 >StAX-based object model) rather than DOM, although you can also use a >databinding framework to map it from AXIOM to a Java object. > >Perhaps you can show us a little more of what you're doing? Keep in >mind that the normal use case for both Axis and Axis2 is to map the >XML to a Java object model. > >Anne > > >On 4/3/07, Paul Mahoney <[EMAIL PROTECTED]> wrote: >> Sorry, I was unclear. I have a String containing my xml. >With the document >> style I need to parse it into a DOM node tree and pass it to >the stub. The >> response is also a DOM node tree I'll need to convert to a >String. I want >> AXIS to step back, and just take my XML String and return an String >> containing XML. But wsdl2jave is putting in place layers of >code to consume >> and generate DOM node object trees. As far as I can see, >wsdl2java is doing >> this because the WSDL file say style="document". The service >may want to use >> DOM node trees, but why should I? >> >> >-----Original Message----- >> >From: Philipp Leitner [mailto:[EMAIL PROTECTED] >> >Sent: 03 April 2007 20:36 >> >To: axis-user@ws.apache.org >> >Subject: Re: AXIS style >> > >> >what do you mean with "turn my xml into DOM" ? The Document >> >Object Model >> >(if this the meaning of DOM that you are referring to, since >> >there are a >> >few different ones) is just one possibility to represent XML, >> >and afaik >> >not one used by Axis. I guess what you mean with "DOM" is >> >actually Axiom. >> > >> >If that's what you meant ... no, I don't think there's any >way to make >> >Axis2 not use Axiom. >> > >> >/philipp >> > >> >Paul Mahoney schrieb: >> >> I have used wsdl2java to generate stubs for a web service >> >that specifies >> >> document style. Consequently the stubs want me to turn my >> >xml into DOM and I >> >> need to turn the returned DOM back to XML :-( >> >> >> >> Is there anyway I can tell wsdl2javs to use message style as >> >I want to work >> >> with xml not DOM? Is does seem strange that the web service >> >appears to be >> >> dictating the client use DOM. >> >> >> >> >> >> >--------------------------------------------------------------------- >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> > >> >>--------------------------------------------------------------------- >> >To unsubscribe, e-mail: [EMAIL PROTECTED] >> >For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]