What's wrong with my code? | Search |
NowSMS Support Forums ⬆ MMS & SMS Technical Discussions (unsupported) ⬆ Archive through October 29, 2003 ⬆ |
◄ ► |
Author | Message | |||
newbie |
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 |
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 |
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 |
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 |
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 |
maybe it's s-methodinvoke or s-methodresult etc. | |||
newbie |
who would explain in details ?what and why and how? thanks a lot | |||
ylcp97 |
Look at http://support.nowsms.com/discus/messages/12/736.html | |||
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. 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 |
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 |
Hi, if operator use SMTP instead of HTTP, is my thought right? | |||
ylcp97 |
Go to http://lyy00.xilubbs.com/ for some tips,if you are Chinese, when you want to send MM messages via SMTP. | |||
newbie |
hi,ylcp97, Could you give me a raw UDP package of WSP_CONNECT request and WSP-POST request for my analyzation? thanks a lot. |