How Swift consume SOAP WebService from Dynamics NAVISION

大城市里の小女人 提交于 2019-12-30 11:03:17

问题


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


回答1:


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.




回答2:


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.




回答3:


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:

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)



来源:https://stackoverflow.com/questions/25173066/how-swift-consume-soap-webservice-from-dynamics-navision

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!