简体   繁体   中英

How to use WSDL for iPhone app?

I am trying to use a public web service in my iPhone app and I am not sure how to use WSDL. For example I have this WSDL . Now what XML or SOAP do I have to send to use this service?

Something similar to what I used in a demo SOAP msg:

<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
    "<soap:Envelope \n"
    "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" \n"
    "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n" 
    "xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" \n"
    "soap:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" \n"
    "xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"> \n"
    "<soap:Body> \n"
                       "<CelsiusToFahrenheit xmlns=\"http://tempuri.org/\">\n"
                       "<Celsius>23</Celsius>\n"
                       "</CelsiusToFahrenheit>\n"
    "</soap:Body> \n"
                       "</soap:Envelope>

hi i founded i great site that recieves a wsdl file or service and generates the proxy client code for you

http://www.wsdl2code.com

SampleServiceProxy *proxy = [[SampleServiceProxy alloc]initWithUrl:@"YOUR
            URL" AndDelegate:self];
    [proxy GetDouble];
    [proxy GetEnum];
    [proxy getEnum:kTestEnumTestEnum2];
    [proxy GetInt16];
    [proxy GetInt32];
    [proxy GetInt64];
    [proxy GetString];
    [proxy getListStrings];

This may help you

http://www.icodeblog.com/2008/11/03/iphone-programming-tutorial-intro-to-soap-web-services/

Here you find tutorial to make envelope for making request and send this envelop to server

如果可以找到类似于Apache Axis的生成C代码而不是Java代码的内容,则应该可以将生成的C代码与iOS的Objective-C程序一起使用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM