创建 Web 服务 (WCF) 以与 QuickBooks 集成

发布于 2024-07-30 18:39:58 字数 590 浏览 3 评论 0原文

我正在将我们的自定义 Web 应用程序与 QuickBooks Enterprise 9 集成。我的想法是我可以使用 QuickBooks 作为我的“数据库”。 当一个人创建发票时,发票实际上仅存储在 QuickBooks 中。 当一个人查看发票列表时,他们实际上正在查看 QuickBooks 发票列表。 我想确保数据仅存储在一个位置。

我意识到我可以使用 QB Web 连接器,但问题是我无法控制对 QB 的请求何时实际得到处理(该工作取决于 Web 连接器)。

因此,我有我的 Web UI 作为 QuickBooks“面孔”,但我没有任何好方法来访问和访问位于内部服务器上的 QuickBooks 文件。 我的想法是我可以创建一个 WCF Web 服务并将其安装在 QuickBooks 服务器上。 然后,Web 服务就可以成为我的集成点。 然后,我的自定义 Web 应用程序可以使用该 Web 服务,并且我可以访问我的 QuickBooks 文件。

我的问题是:WCF 应用程序可以连接并运行 QuickBooks 吗? 如果没有,我可以创建一个 Windows 服务作为我的集成点吗? 如果是这样,我的自定义 Web 应用程序可以“使用”Windows 服务吗?

I am in the process of integrating our custom web app with QuickBooks Enterprise 9. My thought is that I could use QuickBooks as my "database" of sorts. When a person creates an invoice, the invoice is actually stored only in QuickBooks. When a person views a list of invoices, they are actually viewing a list of QuickBooks invoices. I want to make sure the data is stored in only one location.

I realize that I could use the QB Web Connector, but the problem with that is I wouldn't have control over when the requests to QB actually get processed (That job is up to the Web Connector).

So I have my web UI to act as the QuickBooks "face," but I don't have any good way to get to and from the QuickBooks file located on an internal server. What I was thinking was that I could create a WCF web service and install it on the QuickBooks server. The web service could then be my integration point. My custom web app could then consume the web service and, viola, I have access to my QuickBooks files.

My question is this: Can a WCF app connect and run QuickBooks? If not, could i create a Windows service to act as my point of integration? If so, can my custom web app "consume" a windows service?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

海的爱人是光 2024-08-06 18:39:58

我首先警告您,对于可从远程网站访问的可靠后端数据库来说,QuickBooks 可能不是您的最佳选择。 事实上……这可能是一个非常非常糟糕的选择。

您应该拥有自己的应用程序数据库,然后如果您还需要与 QuickBooks 交换数据,请在应用程序的正常生命周期之外作为单独的同步过程进行此操作。

由于多种原因,QuickBooks 通常对于始终在线类型的应用程序来说不够可靠:

  • Flaky SDK 连接
  • 更新和单用户模式将
    阻止您访问 QuickBooks
  • 难以从非 GUI 进程(Windows 服务和 IIS 进程)建立 SDK 连接 话

虽如此...

是的,您可以创建一个 WCF Web 服务,将其托管在 QuickBooks 计算机上,并使您的 WCF Web 服务向/从 QuickBooks 中继消息。

是的,您还可以创建一个执行相同操作的 Windows 服务。

不要将其实现为 Windows 服务,并且不要在 IIS 中实现它 - 而是将其实现为与 QuickBooks 一起运行的 GUI 应用程序。

如果您尝试将事物实现为 Windows 服务或在 IIS 中,QuickBooks SDK 要求您有一个可用的 GUI(它使用 GUI COM 消息泵进行事件分派或类似的东西...)来处理请求,因此您将可能需要使用 QBXMLRP2e.exe 之类的东西来跨越 QuickBooks 和非 GUI Windows 服务/IIS 之间的进程边界。 我的经验是,这是一个巨大的痛苦,并且还需要使用 DCOM 权限。

我在 我的 QuickBooks 集成 wiki 上有一个示例和一些文档。

IDN 论坛是提问的好地方。

我对您的建议是:

  • 使用 Web Connector 和 QuickBooks
    并放弃将所有数据保存在一个地方的希望。 将数据缓存在真实数据库中,并通过定期查询 QuickBooks 来更新数据。 我现在几乎已经完成了构建解决方案来完成此任务,并且效果非常好。

或者

  • 使用不同的帐户系统。 NetSuite 相当不错。 我不确定还有什么,但如果我是你,我会寻找基于 SQL 或具有强大 SOAP/REST API 的东西。

I'll start by warning you that QuickBooks probably isn't your best choice for a reliable back-end database accessible from a remote website. In fact... it's probably a really, really bad choice.

You should have your own application database, and then if you need to also exchange data with QuickBooks, do that outside of the normal lifecycle of your app, as a separate sync process.

QuickBooks generally isn't reliable enough for always-online type of applications due to a number of reasons:

  • Flaky SDK connections
  • Updates and single-user mode will
    lock you out of accessing QuickBooks
  • Difficulty in establishing SDK connections from non-GUI processes (Windows Services and IIS processes)

With that said...

Yes, you could create a WCF web service, host it on the QuickBooks machine, and make your WCF web service relay messages to/from QuickBooks.

Yes, you could also create a Windows Service that does the same sort of thing.

Do NOT implement it as a Windows service, and do NOT implement it within IIS - instead implement it as a GUI app that runs alongside QuickBooks.

If you try to implement things as a Windows service or within IIS, the QuickBooks SDK requires you have a GUI available (it users a GUI COM message pump for events dispatching or something like that...) to process requests, so you'll probably need to use something like QBXMLRP2e.exe to straddle the process boundary between QuickBooks and your non-GUI Windows service/IIS. My experience has been that it's a gigantic pain in the butt, and requires mucking with DCOM permissions as well.

I have an example and some documentation on my QuickBooks integration wiki.

The IDN Forums are a good place to ask questions.

My recommendation to you would be to either:

  • Use the Web Connector and QuickBooks
    and give up hope of keeping all of your data in one place. Cache the data in a real database, and update it by querying QuickBooks periodically. I'm almost done building a solution to do exactly this right now, and it works fantastic.

OR

  • Use a different account system. NetSuite is pretty nice. I'm not sure what else is out there, but if I were you I'd look for something SQL-based or with a strong SOAP/REST API.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文