简体   繁体   English

NativeScript中的SOAP Web服务

[英]SOAP Web Services in NativeScript

I am new in nativescript app development, I want to use SOAP web services in nativescript, ie how to implement SOAP request & response in nativescript. 我是nativescript应用程序开发的新手,我想在nativescript中使用SOAP Web服务,即如何在nativescript中实现SOAP请求和响应。 Please give me suggestions, didn't find any way to implement SOAP, all search results are implemented in JavaScript code. 请给我建议,没有找到任何实现SOAP的方法,所有搜索结果都是用JavaScript代码实现的。

I do open github issues, please check - https://github.com/NativeScript/NativeScript/issues/2284 Thanks :) 我打开github问题,请检查 - https://github.com/NativeScript/NativeScript/issues/2284谢谢:)

Well, their is no built in soap handling. 好吧,他们没有内置肥皂处理。 However, you can make you own in a couple steps. 但是,您可以通过几个步骤让自己拥有。

  1. NativeScript has built in http requests, and XMLHttpRequest and Fetch; NativeScript内置了http请求,以及XMLHttpRequest和Fetch; this means you can query and receive back data you want from any service url. 这意味着您可以从任何服务URL查询和接收所需的数据。 http://docs.nativescript.org/api-reference/modules/ http .html , https://docs.nativescript.org/cookbook/fetch , http://docs.nativescript.org/cookbook/http http://docs.nativescript.org/api-reference/modules/ HTTP的.htmlhttps://docs.nativescript.org/cookbook/fetchhttp://docs.nativescript.org/cookbook/http

    In addition, their is a third party plugin called nativescript-apiclient which makes it easier to deal with http requests with changing parameters. 此外,它们是一个名为nativescript-apiclient的第三方插件,可以更轻松地处理带有更改参数的http请求。 (ie http://somewhere/getdata/ {token}/{data} where you can just pass in a token and data value...) See http://plugins.nativescript.rocks for different plugins available. (即http:// somewhere / getdata / {token} / {data},您可以在其中传递令牌和数据值...)请参阅http://plugins.nativescript.rocks以获取可用的不同插件。

  2. NativeScript has a XML parser built in, Soap responses are typically XML based. NativeScript内置了XML解析器,Soap响应通常基于XML。 So you can easily instantiate the xml engine to parse your soap requests ( http://docs.nativescript.org/cookbook/xml-parser ) 因此,您可以轻松地实例化xml引擎来解析您的soap请求( http://docs.nativescript.org/cookbook/xml-parser

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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