Code Monkey home page Code Monkey logo

soap-ios's Introduction

SOAP-IOS

IOS SOAP

使用方法:

####1.引用kissxml(具体如何在项目中添加kissxml,这里就不写了)。

####2.将服务的WebService的wsdl文件添加到项目中 例如:将http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl 另存为WeatherWebService.xml。将此文件添加到项目中,后缀名必须为xml。

####3.获取soap信封

SoapUtility *soaputility=[[SoapUtility alloc] initFromFile:@"WeatherWebService"];这里的WeatherWebService是步骤2中添加的wsdl文件。不包含扩展名。

NSString *SoapXML=[soaputility BuildSoapwithMethodName:@"getWeatherbyCityName" withParas:@{@"theCityName": @"上海"}];

####4.获取soapAction

NSString *soapAction=[soaputility GetSoapActionByMethodName:method SoapType:SOAP];

####5.得到了soap信封和SoapAction,就可以用使用http post 来提交了。

SoapService *soaprequest=[[SoapService alloc] init];

soaprequest.PostUrl=@"http://www.webxml.com.cn/WebServices/WeatherWebService.asmx";

soaprequest.SoapAction=[soaputility GetSoapActionByMethodName:methodName SoapType:SOAP];

同步方式

ResponseData *result= [soaprequest PostSync:postData];

异步方式

[soaprequest PostAsync:postData Success:^(NSString *response) {

        [self.result setText:response];
        
    } falure:^(NSError *response) {
    
        [self.result setText:response.description];
        
    }];

主页:http://xujialiang.net

soap-ios's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

soap-ios's Issues

UserCredentials

Can't seem to find a way to set the userName and password?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.