How Swift consume SOAP WebService from Dynamics NA

2019-02-19 12:44发布

in XCode (for iOS 8) using Swift language, there is no Service Reference folder to add for NAV Web Service

Understand iOS 8 (Swift) does not have Web service reference to create Proxy. So, in this respect, how Swift can consume SOAP webservice from Microsoft Dynamics NAVISION? What are the methods or work around available?

Thanks

3条回答
劳资没心,怎么记你
2楼-- · 2019-02-19 13:32

Get a nightly build of free SoapUI. I say nightly only because some time ago it was only version that supported windows authorization, If your Nav web-service configured with another authorization type just use stable build.

SoapUI is able to consume provided web-service URL and make sample SOAP messages for you. You can even send those messages to your service to test if its work and inspect responses.

  1. Get URL to your web-service's WSDL.
  2. Create new project in SoapUI and paste URL into Initial WSDL\WADL field and hit Ok.
  3. WSDL will be processed and in project tree there will be listed all available functions (methods) of your service.
  4. By expanding and clicking on them you can create, view and run requests against your service.

Or watch this short video.

查看更多
smile是对你的礼貌
3楼-- · 2019-02-19 13:35

If you want to connect to the Dynamics NAV webservices, you should change the setting "ServicesUseNTLMAuthentication" in:

This setting is located in the CustomSettings.config file the NAV service folder.

You can use SoapUI for testing, as explained in the answer above.

查看更多
在下西门庆
4楼-- · 2019-02-19 13:45

For Swift 2.0, you can generate a Soap Client for your WSDL online at:

http://wsdl2swift.com

And then utilise the Operations by creating Request Objects:

enter image description here

Although still in beta, but still covers what you're looking for and provides you with a good base that you can feel free to modify. (Disclaimer: I'm the author)

查看更多
登录 后发表回答