如何将经典的 ASP Web 应用程序与 Java 组件连接起来?

发布于 2024-09-30 02:33:26 字数 610 浏览 1 评论 0原文

我们有几个经典的 ASP Web 应用程序,它们实例化 Visual Basic 6 组件、传递一个(可能很大的)XML 字符串,并返回一个(也可能很大的)XML 字符串。

该组件是我们与数据库交互的唯一方式。

我们计划使用 java 重写这个组件。这个想法是让 asp 应用程序的其余部分保持不变。

因此,我们需要执行一些 java 组件,从运行在 iis 上的经典 asp 传递和接收字符串...

我们正在寻找开销可能较小的东西(显然,我试图避免为每个组件调用 Web 服务) db 操作)

哪种方法是实现这样的事情的最佳方法?

非常感谢,

这是我们需要迁移的代码:

Private Function ComandoExecute( Xml )
Dim Comando

  Set Comando = Server.CreateObject("TramitesConsultaComando.clsComando")

  ComandoExecute = Comando.execute(Xml)

  Set Comando = Nothing

End Function

该组件是一个通过 com+ 运行的 dll

We have several classic asp web application that instantiates a visual basic 6 component, passes a (possibly huge) xml string, and gets back a (also possibly huge) xml string.

This component is the only way we have to interact with the database.

We are planning to rewrite this component using java. The idea is to left the rest of the asp application untouched.

So we need to execute some java component passing and receiving a string, from classic asp running on an iis...

We are looking for something with the less overhead possible (obviously, I'm trying to avoid having a web service call for each db operation)

which would be the best approach to achieve such a thing?

thanks a lot

this is the code we need to migrate:

Private Function ComandoExecute( Xml )
Dim Comando

  Set Comando = Server.CreateObject("TramitesConsultaComando.clsComando")

  ComandoExecute = Comando.execute(Xml)

  Set Comando = Nothing

End Function

The component is a dll that runs thru com+

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

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

发布评论

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

评论(2

Oo萌小芽oO 2024-10-07 02:33:26

您还可以查看其他序列化选项:

在 Java 端只需使用 Servlet,您可以将其嵌入到某些东西中例如 Jetty 或 Tomcat。这里有一个非常简单的示例:

http://docs.codehaus.org/display/JETTY/嵌入+Jetty

There are other options for serialization you could look at:

On the Java side just use a Servlet, you can embed this in something like Jetty or Tomcat. There's a very simple example here:

http://docs.codehaus.org/display/JETTY/Embedding+Jetty

影子的影子 2024-10-07 02:33:26

你可以在Java上编写套接字服务器,它将从aSP.NET页面接收数据,ASP.NET将打开套接字并发送信息,以防你想避免HTTP,但我同意Jon的观点,使用POST命令通过HTTP发送JSON,使用 Google GSON 库反序列化此 JSON 是更简单的方法。

you can write socket server on Java which will receive data from aSP.NET pages, ASP.NET will open socket and sent information this is in case you want to avoid HTTP, but I agree with Jon, sending JSON by HTTP using POST command and de-serialize this JSON using Google GSON library is much simpler approach.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文