Symbian Learning Notes (18)--preliminary study on the use of the WebServices API (medium)

Source: Internet
Author: User

To continue just now, look at the specific code, first CONNECTL implementation:

View Plaincopy to Clipboardprint?

Voidcwebengine::connectl ()

{

CSENXMLSERVICEDESCRIPTION*PATTERN=CSENXMLSERVICEDESCRIPTION::NEWLC ();

Pattern->setframeworkidl (Kdefaultbasicwebservicesframeworkid);

Pattern->setendpointl (Kwsendpoint);

Deleteiconnection;

Iconnection=null;

ICONNECTION=CSENSERVICECONNECTION::NEWL (*this,*pattern);

Cleanupstack::P Opanddestroy (pattern);

}

void CWebEngine::ConnectL()
{
CSenXmlServiceDescription* pattern = CSenXmlServiceDescription::NewLC();
pattern->SetFrameworkIdL(KDefaultBasicWebServicesFrameworkID);
pattern->SetEndPointL(KWSEndPoint);
delete iConnection;
iConnection = NULL;
iConnection = CSenServiceConnection::NewL(*this, *pattern);
CleanupStack::PopAndDestroy(pattern);
}

Notice here that unlike that AddressBook example, we have declared that different frame types are kdefaultbasicwebservicesframeworkid, and that they only need to provide endpoint without contract. The value of the Kwsendpoint is stated before the CPP: _lit8 (Kwsendpoint, "http://192.168.0.201/uim/PService.asmx");

CSENSERVICECONNECTION::NEWL two parameters, one is that they are responsible for processing callbacks, and the second is a csenxmlservicedescription responsible for parameter configuration.

I simply print out the status value in the callback SetStatus.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.