Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/398.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用SpringBoot的SOAP和RESTWebService_Java_Spring_Rest_Soap_Spring Boot - Fatal编程技术网

Java 使用SpringBoot的SOAP和RESTWebService

Java 使用SpringBoot的SOAP和RESTWebService,java,spring,rest,soap,spring-boot,Java,Spring,Rest,Soap,Spring Boot,我正在开发我的第一个springboot应用程序,它同时包含Soap和restwebservice。我必须将url中的请求作为参数传递。我能够在URL中传递Rest服务的请求。是否可以在URL中为SOAPwebservice发送请求 好的,我不知道你的意图是什么,但是关于SOAP --------------- ---------------- | | someMethodInvoke | | |

我正在开发我的第一个
springboot
应用程序,它同时包含Soap和rest
webservice
。我必须将url中的请求作为参数传递。我能够在URL中传递Rest服务的请求。是否可以在URL中为
SOAP
webservice
发送请求

好的,我不知道你的意图是什么,但是关于SOAP

---------------                      ----------------
|             |   someMethodInvoke   |              |
|  Your API   | -------------------->| WEB Service  |
|             |<-------------------- |              |
---------------    someResult        ----------------
首先扩展
WebServiceGatewaySupport
,这样您就可以调用
getWebServiceTemplate()
,它返回的正好是您需要的:
org.springframework.ws.client.core.WebServiceTemplate
。下面是一个如何使用
WebServiceTemplate

当然,有很多因素,比如安全性、连接性等等,可能需要设置。但这取决于WS。但基本上就是这样:

  • 从WSDL(模式)生成.java类
  • 用信息填充生成的对象
  • 使用一些WebServiceTemplate来调用端点

  • 希望我给了你一些指导。

    好的,我不知道你的意图是什么,但是关于肥皂

    ---------------                      ----------------
    |             |   someMethodInvoke   |              |
    |  Your API   | -------------------->| WEB Service  |
    |             |<-------------------- |              |
    ---------------    someResult        ----------------
    
    首先扩展
    WebServiceGatewaySupport
    ,这样您就可以调用
    getWebServiceTemplate()
    ,它返回的正好是您需要的:
    org.springframework.ws.client.core.WebServiceTemplate
    。下面是一个如何使用
    WebServiceTemplate

    当然,有很多因素,比如安全性、连接性等等,可能需要设置。但这取决于WS。但基本上就是这样:

  • 从WSDL(模式)生成.java类
  • 用信息填充生成的对象
  • 使用一些WebServiceTemplate来调用端点

  • 希望我给了你一些指导。

    不。因为
    SOAP
    请求基本上是
    POST
    请求,它不允许你将请求数据作为URL的一部分发送。@arpit所以我们只能通过SOAP UI工具以XML格式发送SOAP请求,对吗?是的!,soap只允许发送xml@Arpit非常感谢。是否可以在单个应用程序中同时开发SOAP和REST。1.Rest:通过RESTURL将参数传递给应用程序。2.SOAP:通过点击同一应用程序的SOAP URL,将XML通过SOAPUI传递给该应用程序。因为
    SOAP
    请求基本上是
    POST
    请求,它不允许您将请求数据作为URL的一部分发送。@arpit所以我们只能通过SOAP UI工具以XML格式发送SOAP请求,对吗?是的!,soap只允许发送xml@Arpit非常感谢。是否可以在单个应用程序中同时开发SOAP和REST。1.Rest:通过RESTURL将参数传递给应用程序。2.SOAP:通过点击同一应用程序的SOAP URL,将XML通过SOAPUI传递给该应用程序