axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ajith Ranabahu" <ajith.ranab...@gmail.com>
Subject Re: [Axis2] Can not output XML declaration, after other output has already been done
Date Thu, 06 Jul 2006 15:44:00 GMT
A quick clarification!
Does the problem occur after receiving a response ?

Ajith

On 7/6/06, John Ferron <johnferron@alliantenergy.com> wrote:
>
>
> All,
>
> I'm getting the following nested exception:
>
>  Can not output XML declaration, after other output has already been done.;
> nested exception is:
>         javax.xml.stream.XMLStreamException: Can not output
> XML declaration, after other output has already been done.; nested exception
> is:
>         org.apache.axis2.AxisFault: Can not output XML declaration, after
> other output has already been done.; nested exception is:
>         javax.xml.stream.XMLStreamException: Can not output
> XML declaration, after other output has already been done.; nested exception
> is:
>         org.apache.axis2.AxisFault: Can not output XML declaration, after
> other output has already been done.; nested exception is:
>         javax.xml.stream.XMLStreamException: Can not output
> XML declaration, after other output has already been done.; nested exception
> is:
>         org.apache.axis2.AxisFault: Can not output XML declaration, after
> other output has already been done.; nested exception is:
>         javax.xml.stream.XMLStreamException: Can not output
> XML declaration, after other output has already been done.; nested exception
> is:
>         org.apache.axis2.AxisFault: Can not output XML declaration, after
> other output has already been done.; nested exception is:
>         javax.xml.stream.XMLStreamException: Can not output
> XML declaration, after other output has already been done.; nested exception
> is:
>         org.apache.axis2.AxisFault: Can not output XML declaration, after
> other output has already been done.; nested exception is:
>         javax.xml.stream.XMLStreamException: Can not output
> XML declaration, after other output has already been done.; nested exception
> is:
>         org.apache.axis2.AxisFault: Can not output XML declaration, after
> other output has already been done.; nested exception is:
>         javax.xml.stream.XMLStreamException: Can not output
> XML declaration, after other output has already been done.; nested exception
> is:
>         org.apache.axis2.AxisFault: Can not output XML declaration, after
> other output has already been done.; nested exception is:
>         javax.xml.stream.XMLStreamException: Can not output
> XML declaration, after other output has already been done.
>
> The following method that sends the data is as follows:  The request element
> that I am passing through to this method is the SOAP envelope which has the
> complete SOAP message that I want to send.
>
> private void sendRecieve(String urlStr, OMElement requestElement) throws
> Exception {
>   URL url = null;
>   OMElement responseElement = null;
>   try {
>    url = new URL(urlStr);
>    log.info("URL: " + urlStr);
>   } catch (MalformedURLException e) {
>    StringFunctions.exceptionToString(e);
>   }
>
>   Options options = new Options();
>   options.setTo(new EndpointReference(url.toString()));
>   options.setProperty(MessageContextConstants.CHUNKED,
> Constants.VALUE_FALSE);
>
>   ServiceClient sender = new ServiceClient();
>   sender.setOptions(options);
>   log.info("Sending: ");
>   log.info(requestElement.toStringWithConsume());
>   responseElement = sender.sendReceive(requestElement);
>   if (responseElement == null) {
>    log.info("Null response");
>   } else {
>    log.info(responseElement.toStringWithConsume());
>   }
>  }
>
> Any help would be greatly appreciated
>
> John


-- 
Ajith Ranabahu

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message