如何直接从Java调用一个esql/c程序

huangapple 未分类评论46阅读模式
英文:

How to call an esql/c program from Java directly

问题

我需要检查直接从Java调用ESQL/C程序的可行性。这些ESQL应用程序部署在Linux上,可以生成多个实例。

目前,它们是通过Camel应用程序从.NET调用的,该应用程序会查找端口,并通过使用Soap和XML进行调用。

在搜索过程中,我找到了一些关于从ESQL/C调用Java的链接,但没有找到反过来的情况。是否有人尝试过从Java调用ESQL/C?

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:ns="http://tempuri.org/ns.xsd">
    <SOAP-ENV:Body>
        <ns:gatewayValidate>
            <in>
                <serverId>tpmDss</serverId>
                <Request>getData&#x1F;&#x1E;101&#x1F;def&#x1F;1&#x1F;5660&#x1F;3001&#x1F;1&#x1F;</Request>
            </in>
        </ns:gatewayValidate>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

在这里,serverId包含将使用请求载荷调用的应用程序的名称。

我知道可以使用JNI来调用C++ DLL,但恐怕我无法编辑这些遗留的ESQL/C程序。

英文:

I am having a requirement to check the feasibility of being able to call ESQL/C programs directly from java. These ESQL applications are deployed in Linux and can be spawned multiple instances.

Currently they are being called from .NET via Camel application which finds the port and makes call via XML using Soap.

While searching I got few links to call Java from ESQL/C but couldn't find any for vice versa. Has anyone tried to call ESQL/C from Java?

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;SOAP-ENV:Envelope
  xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
  xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;
  xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
  xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
  xmlns:ns=&quot;http://tempuri.org/ns.xsd&quot;&gt;
    &lt;SOAP-ENV:Body&gt;
        &lt;ns:gatewayValidate&gt;
            &lt;in&gt;
                &lt;serverId&gt;tpmDss&lt;/serverId&gt;
                &lt;Request&gt;getData&amp;#x1F;&amp;#x1E;101&amp;#x1F;def&amp;#x1F;1&amp;#x1F;5660&amp;#x1F;3001&amp;#x1F;1&amp;#x1F;&lt;/Request&gt;
            &lt;/in&gt;
        &lt;/ns:gatewayValidate&gt;
    &lt;/SOAP-ENV:Body&gt;
&lt;/SOAP-ENV:Envelope&gt;

Here serverId contains the name of the application which would be called with the payload in Request.

I am aware about JNI for calling C++ DLL's but I am afraid I don't have control to edit these legacy ESQL/C programs.

huangapple
  • 本文由 发表于 2020年5月4日 19:19:07
  • 转载请务必保留本文链接:https://java.coder-hub.com/61590996.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定