Spring WebServiceTemplate URL

时间:2018-11-12 10:39:36

标签: spring-ws

Spring guides a webservice is published中的locationUri“ / ws”处。 使用WebServiceTemplate的marshallSendAndReceive方法在“ webservice is consumed”处进行getCountryRequest http://localhost:8080/ws/countries

使用soapUI时,我在“ http://localhost:8080/ws/”处使用Web服务,并在SOAP正文中指定Web服务的名称。

那么WebServiceTemplate如何完全使用“ countries”后缀,以及如何精确映射到名称为getCountryRequest的消息?

1 个答案:

答案 0 :(得分:0)

要回答我自己的问题: wsdl正在将Web服务发布在

<soap:address location="http://localhost:8080/ws"/>

但是MessageDispatcherServlet正在监听“ http://localhost:8080/ws/ *”。 因此,该URL下的所有内容都将传递到SOAP上并且可以正常工作。

我可以使用http://localhost:8080/ws/http://localhost:8080/ws/countries(我仍然想知道为什么WebServiceTemplate不仅仅使用WSDL SOAP地址)。 没关系。