×

Discussion Board

Results 1 to 7 of 7

Thread: WSF on Emulator

  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    28

    WSF on Emulator

    Hello again,

    have anybody run the Webservice framework on eumulator (SDK S60 3rd MR).
    i try to access o webservice with

    Code:
    CSenXmlServiceDescription *pServiceDesc = CSenXmlServiceDescription::NewLC(KServiceEndpoint, KNullDesC8());
    	pServiceDesc->SetFrameworkIdL(KDefaultBasicWebServicesFrameworkID);
     ...
    	iServiceConn = CSenServiceConnection::NewL(*this, pServiceDesc);
    i didnot get any error or crash and no prompt for connection (like HttpClient) and cannot see traffic neither at the emulator diagnostic monitor nor with ethereal.

    befor i got mad again because of missing doku.
    Please say that you have a BasicWebServices (not ID-WSF) run at emulator and can send me some code.

    Thanks a lot

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: WSF on Emulator

    I tried this code on s60 3rd edition and it works fine..u can check and see if it works on MR as well..should work..if Nokia has maintained BC which i am sure they would have :-)

    // Check for valid connection
    if(iConnection != NULL)
    {
    delete iConnection;
    iConnection = NULL;
    }

    // Create Service Pattern Object and set EndPoint and Contract
    CSenServicePattern* servicePattern = CSenServicePattern::NewLC(KEndPoint, KNullDesC8());
    // Set Framework Id
    servicePattern->SetFrameworkIdL(KDefaultBasicWebServicesFrameworkID);

    // Check if IAP Id valid
    if(iIAPId >= 0)
    {
    // Add Status to Log
    iLogger->AddToLog(KSetIAPIdToSerPattern, 0, EFalse, ETrue); // info msg: "Setting IAP id (aIapId) to service pattern"

    // Set Iap Id to Hide the select AP dialog
    servicePattern->SetConsumerIapIdL(iIAPId);
    }

    // Add Status to Log
    iLogger->AddToLog(KCreateConnObj, 0, EFalse, ETrue); // info msg: "Creating connection object"

    // Create new connection
    iConnection = CSenServiceConnection::NewL(*this, *servicePattern);

    CleanupStack::PopAndDestroy(servicePattern);
    servicePattern = NULL;


    Where iConnection = CSenServiceConnection;

    also make sure that the EndPoint is defined correctly..

    cheers
    mayank

  3. #3
    Registered User
    Join Date
    Mar 2006
    Posts
    28

    Re: WSF on Emulator

    I've got it!

    There was a fault with the Active Scheduler, so that setStatus wasnot called.
    because of that nothing happend.

    now i can see the soap packets.

    not to be continued

    thanks again mayank
    greetings
    erik

  4. #4
    Registered User
    Join Date
    Mar 2006
    Posts
    28

    Re: WSF on Emulator

    New problem.
    its not exactly the some topic, but i dont want to open a new thread.

    i have a problem with the envelope.
    the basic web service framework only offers sendL() or SubmitL() with a CSenEnvelope.

    I have to change the namespace.
    the current soap request looks like that:
    Code:
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>...
    i try to use CSenBaseFragment to change but i didnt get it.

    "Won't you please, please help me! "

  5. #5
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: WSF on Emulator

    there is a Send which takes Descriptors but then that doesnt work on "WS-I" so u cant possibly use that..

    I have the envelope which looks like this :-

    <n1:GetSomething xmlns:n1="http://myapp.com/soap"
    env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    </n1:GetSomething>

    And it works..and i dont think there should be an issue in changing the namespace..is there some errors that u r getting when u try to change it..?

    Cheers
    mayank

  6. #6
    Registered User
    Join Date
    Mar 2006
    Posts
    28

    Re: WSF on Emulator

    Thanks for replay,mayank

    but you mean the body, or. inside the body element there is no proplem with setBody().

    yes you're right with the descriptor. i can't use it #!?#%$&'!&#

    the webservice use another soap version and use the namespace:
    http://www.w3.org/2003/05/soap-envelope and so it should not work.
    i try with a webservice www.soapclient.com that use another namespace, too.( seem to be down at the moment. it was not me!)
    i got an error soap massage with fault at line 1 unkonwn prefix. in my oppinion there could be another prefix but with the right namespace.

    i didnot know how i can change the namespace of the envelope. !
    thats my big problem.

    thanks a lot
    are you using the

  7. #7
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: WSF on Emulator

    Well first thing to check is whether u r sending the right namespace i.e. the namespace that u r sending should be exposed on the webservices as well..otherwise u would get that invalid prefix error..!

    For instance :-

    _LIT(KQueryRequest, "<tns:getDeviceInfo xmlns:tns=\"http://webservice/jaws\"><tns:String_1>%S</tns:String_1><tns:String_2>%S</tns:String_2><tns:String_3>%S</tns:String_3><tns:String_4>%S</tns:String_4><tns:String_5>%S</tns:String_5></tns:getDeviceInfo>");

    _LIT8(KSoapAction, "http://164.164.151.220:8080/MyAp/MyAp/getDeviceInfo");

    HBufC* tempRequest;
    // Prepare SOAP message containing device information struct
    tempRequest->Des().Format((KQueryRequest), value1, value2, value3, value4, value5);
    request->Des().Append(*tempRequest);

    soapRequest->SetSoapActionL(KSoapAction);
    // Set the body to the SOAP message
    soapRequest->SetBodyL(*request);

    // Send Request
    iConnection->SendL(*soapRequest);

    And in this case if u see i have a namespace 'tns' which is exposed on the server...

    i hope this helps..

    cheers
    mayank

Similar Threads

  1. How To Make The S60 Emulator See My USB Bluetooth Dongle ?
    By Mo7ammed_01 in forum Bluetooth Technology
    Replies: 9
    Last Post: 2009-07-17, 02:33
  2. Replies: 21
    Last Post: 2008-06-25, 20:21
  3. Emulator to Emulator Bluetooth routing using NCF
    By letronje in forum Symbian Tools & SDKs
    Replies: 11
    Last Post: 2007-04-18, 13:41
  4. Emulator to Emulator Bluetooth connectivity using NCF
    By letronje in forum Bluetooth Technology
    Replies: 1
    Last Post: 2007-01-16, 08:21
  5. How To Make The S60 Emulator See My USB Bluetooth Dongle ?
    By Mo7ammed_01 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2006-07-25, 00:12

Posting Permissions

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