You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/05/13 22:30:53 UTC

DO NOT REPLY [Bug 19905] New: - SOAPMessage.writeTo prints 'processing instruction' against SOAP 1.1 spec

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19905>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19905

SOAPMessage.writeTo prints 'processing instruction' against SOAP 1.1 spec

           Summary: SOAPMessage.writeTo prints 'processing instruction'
                    against SOAP 1.1 spec
           Product: Axis
           Version: 1.1rc2
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Basic Architecture
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: jfraney@ssi-corp.com


The following code segment: 
 
	MessageFactory mf = null; 
	SOAPMessage msg = null; 
	try { 
	    mf = MessageFactory.newInstance(); 
	    msg = mf.createMessage(); 
	} 
	catch(SOAPException e) { 
	    System.err.println("can't create message " + e); 
	    e.printStackTrace(); 
	} 
	try { 
	    msg.writeTo(System.out); 
	} 
	catch (SOAPException e) { 
	    System.err.println("can't print message " + e); 
	} 
	catch (IOException e) { 
	    System.err.println("can't print message " + e); 
	} 
 
 
has the output: 
 
<?xml version="1.0" encoding="UTF-8"?> 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
 <soapenv:Body/> 
</soapenv:Envelope> 
 
The first line ("<?xml...?>") is a processing instruction and should not be 
appearing.  See SOAP 1.1 section 3.