简体   繁体   English

非wsdl模式的Java SOAP客户端

[英]Java SOAP client with non-wsdl mode

I wrote an client/server application to delegate jobs from an centralized server with jobqueue to a lot of clients.我编写了一个客户端/服务器应用程序,将作业从带有作业队列的集中式服务器委托给许多客户端。 Clients request information/jobs from the server and send new information/jobs (some parameters arrays, with sometimes up to 8000 array-elements) to the server.客户端从服务器请求信息/作业并将新信息/作业(一些参数 arrays,有时多达 8000 个数组元素)发送到服务器。

The client and server are in PHP using SOAP in non-wsdl mode so far.到目前为止,客户端和服务器在非 wsdl 模式下使用 SOAP 处于 PHP 中。

This is the example (unfortunately in German) I used: http://www.ordix.de/ORDIXNews/3_2008/Open_Source/PHP5_SOAP_WebServices.html这是我使用的示例(不幸的是德语): http://www.ordix.de/ORDIXNews/3_2008/Open_Source/PHP5_SOAP_WebServices.html

This works fine.这工作正常。 But now I want to optimize the client side(eg implement multithreading) and switch the clients to Java.但现在我想优化客户端(例如实现多线程)并将客户端切换到 Java。

I'm not very expierenced in Java.我对 Java 不是很熟悉。 So I searched the web for many hours to find a simple but not to old school solution.所以我搜索了 web 几个小时,以找到一个简单但不是老派的解决方案。 Ideally where I do not have to touch the server script.理想情况下,我不必接触服务器脚本。

Now I'm a little bit confused.现在我有点困惑。 I found Apache XML-RPC as obsolete library.我发现 Apache XML-RPC 作为过时的库。 JAX-RPC is now integrated in JAX-WS and at first sight a little bit to complex. JAX-RPC 现在集成在 JAX-WS 中,乍一看有点复杂。

With Redstone XML-RPC I found another alternative but don't really know if this is the solution for me.使用 Redstone XML-RPC,我找到了另一种选择,但不知道这是否适合我。

Before learning the ropes.. Is one of my mentioned libraries a good way to consume my non-wsd SOAP server script by a Java SOAP client?在学习绳索之前.. 我提到的库之一是通过 Java SOAP 客户端使用我的非 wsd SOAP 服务器脚本的好方法吗?

This is exactly the question I wanted to ask, but isn't answered so far: Easiest way to write a Java SOAP client that consumes a non-wsdl PHP SOAP server? This is exactly the question I wanted to ask, but isn't answered so far: Easiest way to write a Java SOAP client that consumes a non-wsdl PHP SOAP server?

Thank you in advance for bringing light into the dark!提前感谢您将光明带入黑暗!

My understanding is that you want to send custom SOAP requests over HTTP to the web service without using wsdl generated stubs etc.我的理解是,您想通过 HTTP 将自定义 SOAP 请求发送到 web 服务而不使用 ZDD3BDA2F06064E 生成的 ZDD3BDA2F06064 等。
This is possible.这个有可能。
Check out the Dispatch API in jax-ws or CXF查看 jax-ws 或 CXF 中的 Dispatch API
jax-ws-dispatch jax-ws-调度
Dispatch Client 派遣客户
You can use axis2 also.您也可以使用axis2。
But you can also use SAAJ and create SOAP objects with your XML to send to server and get the response.但是您也可以使用 SAAJ 并使用 XML 创建 SOAP 对象以发送到服务器并获取响应。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM