Urgent !!Please!!! mm7 interface and encoding problem

Urgent !!Please!!! mm7 interface and encoding problem SearchSearch
Author Message
russell
New member
Username: Flosed

Post Number: 4
Registered: 05-2005
Posted on Friday, August 19, 2005 - 03:44 am:   

I have serveral questions

1) in the nowsms document"Submitting MMS Messages to the Gateway" part

<The HTTP headers of your POST must include a "Content-length:" header,> is mentioned serveral times
but never mention how to caculate the length in different protocol including mm7,mm1,mm4 etc and deffirent encoding ,can anyone explain in detail ?

here is a corrupted mm7 soap:

POST /mm7 HTTP/1.1
Host:www.mmssdk.com
Content-type: multipart/mixed; boundary="mime-boundary-e8bbc8db-917b-4d92-b217-5b511ed9f210";type=text/xml; start="MM_7"
Content-Length: 2862
Connection: close
SOAPAction: ""

--mime-boundary-e8bbc8db-917b-4d92-b217-5b511ed9f210
Content-type:text/xml; charset=utf-8
Content-ID:MM_7

<?xml version='1.0' ?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<h3:TransactionID xsi:type="SOAP-ENC:string" SOAP-ENV:mustUnderstand="1" xmlns:h3="MM7" SOAP-ENC:root="1">XXXXXX</h3:TransactionID>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<a1:SubmitReq id="ref-1" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/MMSComposition/MMSCompose">
<MM7Version xsi:null="1"/>
<SenderIdentification>
<VASPID xsi:null="1"/>
<VASID xsi:null="1"/>
</SenderIdentification>
<SenderAddress></SenderAddress>
<Recipients>
<To>12345678901</To>
<Cc></Cc>
<Bcc></Bcc>
</Recipients>
<ServiceCode xsi:null="1"/>
<LinkedID xsi:null="1"/>
<MessageClass>personal</MessageClass>
<TimeStamp>2005-08-18T14:37:23.8125000+08:00</TimeStamp>
<ExpiryDate>2005-08-18T14:37:23.8125000+08:00</ExpiryDate>
<EarliestDeliveryTime>2005-08-18T14:37:23.8125000+08:00</EarliestDeliveryTime>
<DeliveryReport>true</DeliveryReport>
<ReadReply>true</ReadReply>
<ReplyCharging>false</ReplyCharging>
<replyDeadline xsi:null="1"/>
<replyChargingSize xsi:null="1"/>
<Priority>high</Priority>
<Subject xsi:null="1"/>
<allowAdaptations>false</allowAdaptations>
<ChargedParty xsi:null="1"/>
<DistributionIndicator>false</DistributionIndicator>
<Content xsi:null="1"/>
<ContentType xsi:null="1"/>
<Content href="cid:mms_cid" />
</a1:SubmitReq>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

--mime-boundary-e8bbc8db-917b-4d92-b217-5b511ed9f210
Content-type:multipart/related; start=<mysmil.smil>; boundary="mime-boundary-192c9dd8-4702-41ae-a176-a9245d3ee317"
Content-ID:<mms_cid>

--mime-boundary-192c9dd8-4702-41ae-a176-a9245d3ee317
Content-type:application/smil;
Content-ID: <mysmil.smil>

<smil>
<head>
<meta name="SDK USED" content="Mobile Technologies"/>
<meta name="CopyRight" content=""/>
<layout>
<root-layout width="200%" height="200%"/>
<region id="defaultImage" width="100%" height="50%" left="0" top="0" fit="fill"/>
<region id="defaultText" width="100%" height="50%" left="0" top="50%" fit="hidden"/>
</layout>
</head>
<body>
<par dur="1ms">
<text src="text_238365.txt"></text>
</par>
</body>
</smil>

--mime-boundary-192c9dd8-4702-41ae-a176-a9245d3ee317
Content-type:text/plain;
Content-ID:<text_238365.txt>
Content-location:text_238365.txt

测试内容
--mime-boundary-192c9dd8-4702-41ae-a176-a9245d3ee317--

--mime-boundary-e8bbc8db-917b-4d92-b217-5b511ed9f210--


I wonder the Content-length is not set right ,is it?


2) have any know the mms sdk compatible with nowsms
or how to generate the mm7/mm1 package throught the nowsms interface



any response is welcome!!!!
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 4796
Registered: 10-2002
Posted on Friday, August 26, 2005 - 10:26 pm:   

Hi Russell,

I can't tell you what the Content-length header should be, because it is the exact number of bytes (characters) after the HTTP header, until the end of your data.

So it's hard to calculate based upon a posting here, because we can't always see spaces or line breaks, or other control characters that might be present.

Here's a trick that I use to calculate Content-length when I'm performing a manual test. I save the content to Notepad without the HTTP header ... then I check to see the size of the file.

Doing that with your example above, I came up with a value of 2904, but it is important to note that this will vary depending on how you cut & paste.

And the example worked just fine.

However, you should note that the example is NOT using standard MM7. It is using Ericsson's non-standard variant of MM7. That's fine, NowSMS will accept either the standard or the Ericsson variant.

-bn