axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Davis" <gazat...@gmail.com>
Subject MIME Boundary Problem in Axis
Date Wed, 19 Jul 2006 18:55:15 GMT
Hi.

We're having a peculiar problem with the MIME boundary and start field
in the HTTP/SOAP request.  The boundary delimiter sent in the header
is different than the boundary being used to delimit the individual
MIME messages.   We're using Axis 1.4 and the latest version of Sun's
Activation Framework and Mail Framework.  From a source code point of
view, we're not doing anything beyond what is in a tutorial.  I've
attached a relevant fragment of our source code and the actual HTTP
request captured.  Has anyone encountered a situation like this?

Any help would be greatly appreciated!

Thanks,
Matt


<<<< Source Fragment >>>>
SOAPPart sp;
SOAPEnvelope se;

// Create message factory
MessageFactory mf = MessageFactoryImpl.newInstance();

// Construct base message
SOAPMessage msg = mf.createMessage();
se.getBody().addAttribute(se.createName("SOAP-SEC:id"), "Body");
se.getBody().addDocument(
		XMLUtils.newDocument(new ByteArrayInputStream(request
				.getBytes())));

// Add attachements, if any exist
if (attachments != null) {
	for (int i = 0; i < attachments.length; i++) {
		AttachmentPart ap =
msg.createAttachmentPart(attachments[i].getData(),
attachments[i].getMimeType());
		
		ap.setContentId(attachments[i].getContentId());
		msg.addAttachmentPart(ap);
	}
}
msg.saveChanges();

// Connect and send
SOAPConnection conn = SOAPConnectionFactory.newInstance()
		.createConnection();

SOAPMessage response = null;;
try {
	response = conn.call(msg, url);
	
} catch (SOAPException e) {
	logger.fatal(e);
	throw e;
}
<<< >>>





<<< MIME Message Captured by TCP sniffer >>>

POST /request HTTP/1.0
Content-Type: multipart/related; type="text/xml";
start="<23DCC2238041C471E10010668012F1E7>";
boundary="----=_Part_7_12122257.1153328467218"
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: localhost:8080
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 17823


------=_Part_8_11305824.1153332521953
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <DD9113C160D03E7E697DCB6D985DA360>

<?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">
  <soap message truncated>
 <soapenv:Body/>
</soapenv:Envelope>
------=_Part_8_11305824.1153332521953
Content-Type: text/xml
Content-Transfer-Encoding: binary
Content-Id: <urn:uuid:4d55fd3c-4d4e-7d46-1f31-0016ce22b761>

<message truncated>

------=_Part_8_11305824.1153332521953--

<<< >>>

---------------------------------------------------------------------
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