Those "<in0>" tags frame the first "Parameter" being submitted to your "Operation". If you had a second parameter, this would be descibed as "<in1>" and so on.
"jobParam" is be a Node, right? I would venture this will solve your problem. Try this: DOMSource source = *new* DOMSource( jobParam.getFirstChild() ); The xml declaration at the top is throwing you off. Its not that Xfire is inserting the "<in0>" tag. You're just one Node higher up in the document tree than you want to be. Cheers, John Page -----Original Message----- From: Ciaran [mailto:[EMAIL PROTECTED] Sent: Sat 2/10/2007 1:17 PM To: [email protected] Subject: Re: [xfire-user] XFire is adding unwanted <in0> tags to XML w3c Document. Can I prevent this? Not really sure, but my first shot in the dark would be the client is defaulting to using 'doc-lit-wrapped' and you may intend to be using document-literal/bare [non-wrapped] conventions? You may well be able to configure this on the client? - Ciaran On 2/8/07, Kabir Sondhi <[EMAIL PROTECTED]> wrote: > > Hey Guys, > > > > I've been struggling with this problem and would appreciate if someone > could help me out. I have XFire running on a server with Tomcat. I have an > XFire client that I created in Eclipse. In the client, I'm reading an xml > file and putting in a org.w3c.dom.Document object.I'm doing this with the > following code snippet: > > > > DOMParser parser = *new* DOMParser(); > > parser.parse(file); > > document = parser.getDocument(); > > > > When I call the web service, I pass this document as a parameter. On the > server, I take the document and convert it to xml and output it to a > stream. The code for that is below: > > > > // Use a Transformer for output > > TransformerFactory tFactory = TransformerFactory.*newInstance* > (); > > Transformer transformer = tFactory.newTransformer(); > > > > DOMSource source = *new* DOMSource(jobParam); > > StringWriter buffer = *new* StringWriter(); > > StreamResult result = *new* StreamResult(buffer); > > transformer.setOutputProperty(OutputKeys.*INDENT*, "yes"); > > transformer.transform(source, result); > > > > *return* buffer.toString(); > > > > The problem I'm having is, XFire seems to be adding an <in0> tag to the > xml file. I need the xml file to be exactly how it was on the client side. > However, an extra tag is being added. > > > > XML File on client side > > > > <?xml version="1.0" encoding="UTF-8"?> > > <service-level-query> > > <query> > > <job-id> > > 1170785289253 > > </job-id> > > </query> > > </service-level-query> > > > > XML File on Server side > > > > <?xml version="1.0" encoding="UTF-8" standalone="no"?> > > <in0 xmlns="DetailedHealthCheckDemo" xmlns:xsi=" > http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:anyType"> > > <service-level-query> > > <query> > > <job-id> > > 1170785289253 > > </job-id> > > </query> > > </service-level-query> > > </in0> > > > > As seen above, the <in0 tag is being added by XFire. I need it to not add > this. Is it possible to prevent it from doing that. Perhaps a property > that I need to set. > > I also tried creating the document on the client using the > DocumentBuilderFactory, for which I had to turn the namespaceaware property > to true otherwise XFire would throw an exception. That resulted in the same > xml file on the server. > > > > Thanks, I appreciate the help. > > > > *Kabir* > -- - Ciaran (I now have far too many G-Mail invites available, anyone who wants one, gets one)
<<winmail.dat>>
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
