Hi, I'm trying to return a response in soap standars, here is my server
code


        public OMElement myAction(String someInput) throws Exception {
                SOAPEnvelope soapEnvelope =
MessageContext.getCurrentMessageContext().getEnvelope();
                OMFactory fac = OMAbstractFactory.getOMFactory();
                OMNamespace namespace  =
fac.createOMNamespace("http://myurl.com";, "someval");
                OMElement element = fac.createOMElement(someInput,
namespace);
                soapEnvelope.getBody().addChild(element);
                return soapEnvelope;
        }

I'm getting this exception:

Caused by: javax.xml.stream.XMLStreamException: Can not output XML
declaration, after other output has already been done.

any clue ?? I'm doing good writing a soap envelope ?

thanks
Rodrigo

This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law.  If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system.  If you
have any questions about this e-mail please notify the sender
immediately.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to