CampCherry User Forum - All Discussions
Forum: Not signed in (Sign In)



    • CommentAuthoredgardo
    • CommentTimeOct 2nd 2008
     
    Someone could send me an example of SendMsg API using Classic ASP (not Java).


    thanks
    ecb
    •  
      CommentAuthorBrandon
    • CommentTimeOct 2nd 2008 edited
     
    See if the basic example below works for you?
    (You will have to replace the parameter values with your own variables for this to work in your live script)

    
    Dim web As New System.Net.WebClient()
      
    web.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
    Dim d As Byte() = System.Text.Encoding.ASCII.GetBytes("q=asp.net")
    Dim res As Byte() = web.UploadData("http://www.commzgate.net/gateway/SendMsg?ID=YourIDg&Password=YourPassword&Mobile=6598888888&Message=test&Type=A", "POST", d)
        
    Console.Write(System.Text.Encoding.ASCII.GetString(res))
    
    
    • CommentAuthoredgardo
    • CommentTimeOct 3rd 2008
     
    Hi Brandon,

    Thanks for your idea, Im gonna try it. Apparently this is not a Classic ASP but a Dot Net. Also, I dont understand these statement

    web.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
    Dim d As Byte() = System.Text.Encoding.ASCII.GetBytes("q=asp.net")

    I am using IIS Application in Visual Studio 6, so there is no User interface (form) involved. Kindly clarify much further.
    •  
      CommentAuthorBrandon
    • CommentTimeOct 3rd 2008 edited
     
    How about this in ASP?

    Dim objWinHttp
    Dim strResponseStatus
    Dim strResponseText
    
    
    Set objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
    
    
    objWinHttp.Open "POST", "http://www.commzgate.net/gateway/SendMsg", False
    
    
    objWinHttp.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    
    
    objWinHttp.Send "ID=YourIDg&Password=YourPassword&Mobile=6598888888&Message=test&Type=A" & Server.URLEncode(Now())
    
    strResponseStatus = objWinHttp.Status & " " & objWinHttp.StatusText
    
    strResponseText = objWinHttp.ResponseText
    
    Set objWinHttp = Nothing
    
    • CommentAuthoredgardo
    • CommentTimeOct 3rd 2008
     
    Yes this is ASP, I will try this

    thanks.
    • CommentAuthoredgardo
    • CommentTimeOct 8th 2008
     
    Hi Brandon,

    I've run the following script you gave me. but no success. The page cannot be displayed. Error in line 13. Unfortunately, I can not attached the file rejected by commzGATE.


    Dim strURL As String

    Dim objWinHttp
    Dim strResponseStatus
    Dim strResponseText

    Set objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5.1")

    objWinHttp.Open "POST", "http://127.0.0.1/servlet/commz.servlet.SendMsg", False

    objWinHttp.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"

    objWinHttp.Send "ID=Admin&Password=admin&Mobile=639157851356&Message=test&Type=A" & Server.URLEncode(Now())

    strResponseStatus = objWinHttp.Status & " " & objWinHttp.StatusText

    strResponseText = objWinHttp.ResponseText

    Set objWinHttp = Nothing

    Thanks.
    •  
      CommentAuthorBrandon
    • CommentTimeOct 9th 2008
     
    This seems to be some error in your ASP code.
    How are you executing the ASP script? Is it a web form that you use to post to the COMMZGATE server?
    • CommentAuthoredgardo
    • CommentTimeOct 10th 2008
     
    Brandon,

    Just execute the asp script. There is no web form just an asp script.

    In the browser:

    http://127.0.0.1:81/gw/gw_edtest.asp

    where 127.0.0.1 is my local web server
    81 is the port
    gw is the virtual folder
    gw_edtest.asp is my asp script


    Thanks,

    ED
    • CommentAuthoredgardo
    • CommentTimeOct 13th 2008
     
    Hi Brandon,

    Are you still there!!!!

    I think we have to remove this statement since there is no web form involve here:
    objWinHttp.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"

    Also, this statement:
    objWinHttp.Send "ID=Admin&Password=admin&Mobile=639157851356&Message=test&Type=A" & Server.URLEncode(Now())
    can we change mobile into no, Message into msg? What do you think?

    thanks.
    •  
      CommentAuthorBrandon
    • CommentTimeOct 13th 2008
     
    Hi ED,

    Yes, you can make changes as per the API Guide.
    I think you problem is a pure ASP programming issue, are you able to consult some ASP experts to solve your issue?

    Cheers
    • CommentAuthoredgardo
    • CommentTimeOct 15th 2008
     
    Hi Brandon,

    I guess your the only one asp expert i knew.


    Ed
    •  
      CommentAuthorBrandon
    • CommentTimeOct 16th 2008
     
    Hi ED,

    Sorry I cant help further as it is quite hard to do basic debugging for you remotely.
    Perhaps if you can ASP debugging, the solution to your problem will be quite obvious.

    See this: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/3c7830b4-df5c-41a2-9890-c201eb774c89.mspx?mfr=true


    Cheers
    • CommentAuthoredgardo
    • CommentTimeOct 27th 2008
     
    Hello everybody,

    I'm confuse with the first parameter Access ID in SendMsg API? What will i put in Access ID? It is the administrator login? Can anyone help me with this?
    • CommentAuthorkuowei
    • CommentTimeOct 28th 2008
     
    Hi ED,

    Are you using the COMMZGATE Enterprise Edition or online web API?

    (For online Web API , just refer Web portal guide line.)

    Cheers
    • CommentAuthoredgardo
    • CommentTimeOct 29th 2008
     
    Hi

    I am using commzGATE Enterprise Edition.


    Ed
    • CommentAuthorkuowei
    • CommentTimeOct 30th 2008
     
    Hi,

    the access ID can be created/modified under menu external API in your browser

    You can refer section6 in the Admin_guide_v22.pdf.

    KW
    • CommentAuthoredgardo
    • CommentTimeOct 31st 2008
     
    Hi Kuowei,

    thank you very much for the response but its not really clear to me.

    1. You mean i can put any access id in my code?
    2. My other question is how can i make a schedule execution of my asp script in commzGATE Enterprise edition?
    Lets say everyday at 8:00 am commzGATE server will execute my asp script.

    thanks

    Ed
    • CommentAuthoredgardo
    • CommentTimeOct 31st 2008
     
    Hello,

    Does anyone knows where to get the Admin guide or link to download it?


    Ed
    • CommentAuthorkuowei
    • CommentTimeNov 3rd 2008
     
    Hi,

    For schedule execution:
    What OS you use?
    if it is windows, pls refer below link:
    http://www.iopus.com/guides/winscheduler.htm

    if it is linux, pls refer below link:
    http://www.techiegyan.com/?p=127


    For commzGATE Enterprise edition admin guide, pls download from
    http://www.commzgate.sg/downloads/EnterpriseEdition_v2_2_Docs.zip

    BTW, this guide already included in the CD, right?


    KW
    • CommentAuthoredgardo
    • CommentTimeNov 4th 2008
     
    Hi KW

    thanks very much, I appreciated it very much.

    Ed
    • CommentAuthoredgardo
    • CommentTimeNov 5th 2008
     
    Hi,

    I've run my asp script in my commzGATE server (Enterprise/Windows 2000) and prompt me for username, password and domain. What does this mean? Does it mean I am successfull in accessing the SendMsg API but no authorization? I've included id as parameter and put admin but i did not specify password in my script.

    Regards,

    Ed
    • CommentAuthorassuntha
    • CommentTimeJul 31st 2009 edited
     
    I am using commzgate software. but in this i am unable to send a sms automatically.. earlierly it was working fine. After system crash i am facing this problem.I have to do any server registration? (SendMsg) can you guide me.. pls
    waiting for your reply...

    Thanks & Regards,
    Assuntha
    •  
      CommentAuthoradmin
    • CommentTimeAug 1st 2009
     
    Assuntha,

    Please send your commzgate log file found at \commzLog\commzgate.log to support@commzgate.com
    • CommentAuthorassuntha
    • CommentTimeAug 6th 2009
     
    Sir,
    I had sent a commzgate.log file to support@commzgate.com.

    Kindly check it and guide me how to resolve the problem.

    Thanks in Advance.

    Regards,
    Assuntha
    • CommentAuthorassuntha
    • CommentTimeAug 6th 2009 edited
     
    Waiting for your reply.... pls
    • CommentAuthorassuntha
    • CommentTimeAug 12th 2009
     
    Can i call you.. Can you give me your contact number?
    • CommentAuthorassuntha
    • CommentTimeAug 13th 2009
     
    Herewith i am sending the commzgate.log file as an attachement. kindly check it and guide me how to solve the issue..

 



Copyright © 2001-2010 Pacific Synergy Pte Ltd. All Rights Reserved. Contact Us   |   Customer Login