What's wrong with my code?

What's wrong with my code? SearchSearch
Author Message
newbie
Posted on Friday, September 12, 2003 - 09:18 am:   

Hi,all, I write a MMS client,send a http POST request to MMSC,now I ONLY know my MMSC url is MMSC.stdServer.com and my wap gateway(10.0.0.123:9201), in gerneral, I send post as the following step:
POST mmsc.stdserver.com/cgi/.../.../postrequest.asp http1.1
but i don't know what /cgi/.../.../ is, so What should I send the wsp-POST to MMSC server?
thanks a lot.
ylcp97
Posted on Monday, September 15, 2003 - 04:36 am:   

You should ask your operator for MMSC url.
If CMCC, it's "mmsc.monternet.com".

This is a http post sample( for http header):

POST / HTTP/1.1
Content-Type: application/vnd.wap.mms-message
Content-Length: 23738
User-Agent: Javam1.4.0_01
Host: mmsc.monternet.com
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
...

This a wsp_post:
URL="mmsc.monternet.com"
Content-Type: application/vnd.wap.mms-message
...
newbie
Posted on Monday, September 15, 2003 - 05:03 am:   

thanks ylcp97,
yes, now i use CMCC whose gateway is 10.0.0.172:9201, and I use http1.1 as the following step:
1.Create a gprs connection (APN:cmwap) success!
2. create a socket( af_inet,SOCK_STREAM,0); succ
3. connect(10.0.0.172,9201), timeout!!!! why?
4. send( "CONNECT mmsc.monternet.com http1.1 \r\n")
5. send ("POST / HTTP/1.1
Content-Type: APP/vnd.wap.mms-message
Content-Length: 23738
Host: mmsc.monternet.com
....")
the step above about send mms is RIGHT? would you please tell me in detail? I can contact you by email? (my email is: tiger_mail@sina.com) thanks a lot.
ylcp97
Posted on Tuesday, September 16, 2003 - 03:43 am:   

Are you sending your POST command with HTTP or WSP?
WAP only supports UDP.

You should have a WAP stack on the top of ip/udp.
newbie
Posted on Tuesday, September 16, 2003 - 06:13 am:   

Hi,ylcp97
thanks for your quickly reply!
yes, i'm sending POST command. I hear that WSP-CONNECT to wap gateway is required before sending POST command,so I do this. now I get a reply from wap gateway like this: 20 CF 4E 01, do you know it? thanks again.
Anonymous
Posted on Tuesday, September 16, 2003 - 06:48 am:   

maybe it's s-methodinvoke or s-methodresult etc.
newbie
Posted on Tuesday, September 16, 2003 - 07:18 am:   

who would explain in details ?what and why and how? thanks a lot
ylcp97
Posted on Tuesday, September 16, 2003 - 09:01 am:   

Look at
http://support.nowsms.com/discus/messages/12/736.html
ylcp97
Posted on Tuesday, September 16, 2003 - 09:10 am:   

You should set the url to "http://mmsc.monternet.com", not "mmsc.monternet.com http1.1 \r\n", if connecting to W/G via WSP.

It is seemed that you can not connect to a W/G via TCP/IP/HTTP. You may connect to MMSC's VASP on a contract with the operator, if you want to send MM messages via TCP/HTTP.
newbie
Posted on Tuesday, September 16, 2003 - 11:18 am:   

hi,ylcp97

You should set the url to "http://mmsc.monternet.com", not "mmsc.monternet.com http1.1 \r\n", if connecting to W/G via WSP.


how and where should i set the URL?

It is seemed that you can not connect to a W/G via TCP/IP/HTTP. You may connect to MMSC's VASP on a contract with the operator, if you want to send MM messages via TCP/HTTP.

yes, i want send mm. if want to connect VASP( what's VASP ?), is it a need that I connect VASP with WSP-Connect before send WSP-POST request?
thanks .
newbie
Posted on Tuesday, September 16, 2003 - 11:20 am:   

Hi, if operator use SMTP instead of HTTP, is my thought right?
ylcp97
Posted on Wednesday, September 17, 2003 - 10:50 am:   

Go to http://lyy00.xilubbs.com/ for some tips,if you are Chinese, when you want to send MM messages via SMTP.
newbie
Posted on Thursday, September 18, 2003 - 10:22 am:   

hi,ylcp97,
Could you give me a raw UDP package of WSP_CONNECT request and WSP-POST request for my
analyzation? thanks a lot.