Swift calls WebService

Source: Internet
Author: User

As a relatively new language, Swift's tutorials are few and far between, let alone how to say Swift's tutorial on invoking other frameworks, and today it takes a lot of time to implement Swift call WebService.

First iOS call WebService basically search is OC to implement, about how Swift calls OC please Google, so the question is equal to OC how to call WebService, here to provide you with a very fast website, The Send and parse tool used to generate soap: Http://easywsdl.com/WsdlGenerator


The generated folder contains the imported methods, follow the steps to import.

To invoke in Swift, you first have to introduce a bridging file and then set the parameters according to Swift's syntax, such as the method declaration in the original OC:

-(nsstring*) Getanproblembank: ( int ) In0 __error: (nserror* *) __error;

Called in Swift, it has to be changed to:

Getanproblembank (3, __error: nil)



Swift calls WebService

Related Article

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.