×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    2

    using an existing connection with gSOAP

    Hi all,
    I'm trying to use gSOAP in my application (S60 2nd Edition FP2, my device is Nokia 6680). I'd like to set gSOAP to use an existing connection, without displaying the IAP selection dialog box.
    I tried to set up a connection with RConnection's TCommDbConnPref object, but I have no idea how I may pass the connection object to gSOAP.
    Can anyone help me?
    Thanks in advance

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: using an existing connection with gSOAP

    There is an overload of RSocket::Open accepting RConnection object reference. Thus you should find where gSOAP actually opens the socket.

  3. #3
    Registered User
    Join Date
    Apr 2007
    Posts
    2

    Re: using an existing connection with gSOAP

    I write this reply just for everyone have same problem.
    Like wizard_hu_ said, I set up a RSocket object with the initialized RConnection object. Then, I wrote 4 function: MyOpen for open the socket, MyClose for close the socket, MyRead and MyWrite for read and write operations.
    Then, I pass the functions to soap object like this:

    Code:
    soap* s = soap_new();
    s->fopen = MyOpen;
    s->fread = MyRead;
    s->fwrite = MyWrite;
    s->fclose = MyClose;
    (of course, fopen and MyOpen have same prototype, so fread and MyRead and so on)
    Because gSOAP expectes a synchronous socket, you have to use User::WaitForRequest or Active Object and CActiveSchedulerWait object to synchronize read \ write operations. For pass the RSocket object to your My* functions, you may use the "user" member of soap object like this:

    Code:
    s->user = &mysocket; // mysocket is declared as RSocket mysocket
    so, you may use like this:

    Code:
    int MyOpen(struct soap* soap, others parameters ...)
    {
      RSocket* theSocket = reinterpret_cast<RSocket*>(soap->user);
      theSocket->Open(...);
      ... code...
    }
    Hope this help someone.

  4. #4
    Registered User
    Join Date
    Oct 2009
    Posts
    2

    Re: using an existing connection with gSOAP

    Hi JerleShannara
    I am a Chinese people, I use gsoap in symbian also encountered this problem, I follow your ways of doing this, but failed, very distressed, you can provide a demo for me? Thank you very much! My e-mail: javaku@vip.qq.com, very willing and your friends! (Sorry, I English is poor, there may be many mistakes!)

  5. #5
    Registered User
    Join Date
    Dec 2009
    Posts
    4

    Re: using an existing connection with gSOAP

    Hi hufaxi
    我也出现此问题了,请问您解决了嘛?
    如果您解决了,你能不能把解决方式和例子发我邮箱里?
    我现在急要解决这个问题, 先谢了

  6. #6
    Registered User
    Join Date
    Dec 2009
    Posts
    4

    Re: using an existing connection with gSOAP

    我的邮箱是:libing6522544@163.com

  7. #7
    Registered User
    Join Date
    Aug 2009
    Posts
    12

    Re: using an existing connection with gSOAP

    anyone resolve this problem?
    i using gsoap on 5800,the connection is WLAN,
    but it don't work , the same prolem as yours.
    the CALLBACK functions like SOAP SOCKET (*soap.fopen) maybe work,
    but i don't know how to use this functions ,any one can send some example code ?

    best regard
    akoo

Similar Threads

  1. GPRS connection status---urgent, please
    By fanyulong in forum Symbian
    Replies: 3
    Last Post: 2008-07-15, 07:54
  2. Bluetooth connection problem
    By GameTrax in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-12-08, 16:42
  3. HTTP connection on 6310i, 7650, 9210 and in sony-ericsson p800
    By mika1982 in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2003-07-24, 16:44
  4. Nokia 3585i and PC Suite 4.95; NO CONNECTION
    By chrism2202 in forum PC Suite API and PC Connectivity SDK
    Replies: 2
    Last Post: 2003-04-21, 12:10
  5. Replies: 5
    Last Post: 2003-02-07, 11:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×