通过SOAP将json数据发送到Web服务

时间:2021-02-22 15:22:21

I am bit confused regarding SOAP and REST and JSON

我对SOAP,REST和JSON感到有点困惑

I do not know what step and what is the right way to implement this in objective-C

我不知道在Objective-C中实现这一步的步骤是什么

I want to send json data to a web-service via SOAP.

我想通过SOAP将json数据发送到Web服务。

I should use RESTful or SOAP.

我应该使用RESTful或SOAP。

Any document or link would be appreciated.

任何文件或链接将不胜感激。

1 个解决方案

#1


1  

Let me give you some advise out of personal experience regarding this.

让我根据个人经验给你一些建议。

A few things first, if you are in control of the web service I would recommend going for RESTful and returning and sending JSON data as parsing it using Objective-C is very easy.

首先,如果您控制Web服务,我建议您使用RESTful并返回并发送JSON数据,因为使用Objective-C解析它非常容易。

There is a class library called SBJson you can use for the parsing of JSON data returned by the web service.

有一个名为SBJson的类库,可用于解析Web服务返回的JSON数据。

If you are not in control of what the web service will be returning and receiving, i.e. you didn't program the web service you can still use the SBJson classes for JSON data but I would recommend finding a XML library which you are comfortable in using.

如果您无法控制Web服务将返回和接收的内容,即您没有对Web服务进行编程,您仍然可以使用SBJson类来获取JSON数据,但我建议您找一个您喜欢使用的XML库。

http://www.raywenderlich.com is a great source of iOS tutorials with a in depth tutorial on XML parsing, which is used with SOAP.

http://www.raywenderlich.com是iOS教程的重要来源,提供有关XML解析的深入教程,该教程与SOAP一起使用。

The SBJSson library can be found at https://github.com/stig/json-framework/

SBJSson库可以在https://github.com/stig/json-framework/找到

Does these help?

这些有帮助吗?

#1


1  

Let me give you some advise out of personal experience regarding this.

让我根据个人经验给你一些建议。

A few things first, if you are in control of the web service I would recommend going for RESTful and returning and sending JSON data as parsing it using Objective-C is very easy.

首先,如果您控制Web服务,我建议您使用RESTful并返回并发送JSON数据,因为使用Objective-C解析它非常容易。

There is a class library called SBJson you can use for the parsing of JSON data returned by the web service.

有一个名为SBJson的类库,可用于解析Web服务返回的JSON数据。

If you are not in control of what the web service will be returning and receiving, i.e. you didn't program the web service you can still use the SBJson classes for JSON data but I would recommend finding a XML library which you are comfortable in using.

如果您无法控制Web服务将返回和接收的内容,即您没有对Web服务进行编程,您仍然可以使用SBJson类来获取JSON数据,但我建议您找一个您喜欢使用的XML库。

http://www.raywenderlich.com is a great source of iOS tutorials with a in depth tutorial on XML parsing, which is used with SOAP.

http://www.raywenderlich.com是iOS教程的重要来源,提供有关XML解析的深入教程,该教程与SOAP一起使用。

The SBJSson library can be found at https://github.com/stig/json-framework/

SBJSson库可以在https://github.com/stig/json-framework/找到

Does these help?

这些有帮助吗?