What is the difference between NetSuitePortType and NetSuiteService?

爱⌒轻易说出口 提交于 2019-12-11 00:54:42

问题


The netsuite documentation indicates to use NetSuiteService; but I cannot find that object to instantiate. I have NetSuitePortTypeClient instead. Was a step missed when I imported the Service Reference?

I followed the instructions on page 23 of this documentation: http://www.netsuite.com/portal/partners/integration/download/SuiteTalkWebServicesPlatformGuide_2013.1.pdf


回答1:


The NetSuite/SuiteTalk documentation says to add a Web Reference, not a Service reference.

The Service Reference has the NetSuitePortTypeClient or NetSuiteChannelTypeClient classes. I don't know all the differences between the Service Reference and Web Reference technologies, but you have to provide more parameters for those to classes, that are provided automatically for you with the NetSuite class of a Web Reference. A Service Reference is generated with SVCUTIL.exe under the covers by VS for you.

The Web Reference has the NetSuite class you can instantiate. This is generated with WSDL.exe under the covers by VS for you. You can add a Web Reference in VS2010 down at the bottom left of the Add Service Reference form, click on Advanced, then click on Add Web Referenceat the bottom left again, and then enter the URL to where the WSDL is defined. Don't forget that NetSuite has multiple different versions, from 2010 up to 2014, so pick the most recent that works for you.

Use the Web Reference for NetSuite, it's easier.

Bo.



来源:https://stackoverflow.com/questions/23528274/what-is-the-difference-between-netsuiteporttype-and-netsuiteservice

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