MIME multipart format?

JacoErasmus

New member
Joined
Dec 28, 2004
Messages
3
Im developing a MMS library in .Net (C#) in conformance with the MM7 format. MM7 is a service point for a VASP (Value Added Service Provider) into the MMSC (Multimedia Messaging Service Center). The standard specifies SOAP over HTTP with the the content of the MMS also attached as MIME parts.

The following is a post being done to the MMSC:

Code:
POST /mm7/receiver.aspx HTTP/1.1
Connection: Keep-Alive
Content-Length: 28745
Content-Type: multipart/related; boundary="mms_content"; type=text/xml; start"<mm7_content>"
Expect: 100-continue
Host: 127.0.0.1
SOAPAction: 

--mms_content
Content-Type:text/xml; charset="utf-8"
Content-ID:<mm7_content>
<?xml version=1.0 ?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
	<env:Header>
		<mm7:TransactionID xmlns:mm7="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3" mustUnderstand="1">Exact0001</mm7:TransactionID>
	</env:Header>
	<env:Body>
		<SubmitReq xmlns="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3">
			<MM7Version>5.3.0</MM7Version>
			<Recipients>
				<To>
					<Number>49123456789</Number>
					<RFC2822Address>tester@testers.net</RFC2822Address>
				</To>
			</Recipients>
			<MessageClass>Informational</MessageClass>
			<TimeStamp>2004-12-28T15:03:47.4785209+02:00</TimeStamp>
			<EarliestDeliveryTime>2004-12-28T15:03:47.4785209+02:00</EarliestDeliveryTime>
			<ExpiryDate>2005-01-04T15:03:47.4785209+02:00</ExpiryDate>
			<DeliveryReport>false</DeliveryReport>
			<ReadReply>false</ReadReply>
			<Priority>High</Priority>
			<Subject>MMS Test</Subject>
			<DistributionIndicator>false</DistributionIndicator>
			<Content href="cid:exact_mms_content" allowAdaptations="false"/>
		</SubmitReq>
	</env:Body>
</env:Envelope>
--mms_content
Content-Type:multipart/mixed; boundary="mms_content_parts";
Content-ID:<exact_mms_content>
--mms_content_parts
Content-Type:text/plain
Content-ID:<text0.txt>
Content-Transfer-Encoding:base64

VGVzdCBNdWx0aW1lZGlhIE1lc3N...a

--mms_content_parts
Content-Type:image/jpeg
Content-ID:<image1.jpg>
Content-Transfer-Encoding:base64

/9j/4AAQSkZJRgABAQEASABIAAD/2wB...

--mms_content_parts--
--mms_content--

When posted the MMSC returns the following error: "MM7 multipart/related message must have exactly two(2) parts".

Could anyone point out where the fault lies? Any help will be much appreciated.

Kind Regards!
 
I was wondering... does the combination of escape characters play a roll when creating a new line? Could this be a problem if I use Windows combination, and the server is running Unix (Java Servlets)?

Another thing... Where should blank lines be put? After headers? After content? I am now all confused...

Regards!
 
I have solved the problem! :D

Just wanted to inform those of you who have read the post... the problem was with the boundary values. I think the server didnt recoqnize the inner boundries (boundries of the multipart/mixed MIME part) as unique. I know generate boundaries with random characters (e.g. =_LPBzMxWwwsCopFKSyT2E1HLUqJtq) and this fixed the problem! Now I can send MMS...
 
Last edited by a moderator:
Do you plan share your MMS NET library with others? I am now developing universal messaging server which is processing messages from different in/out channels (SMS,SMTP,POP3,XMPP,...) with integrated NET scripting for postprocessing messages and MMS is part which I would like to integrate.

Ales
 
Back
Top