Я использую мыльную клиентскую библиотеку spring-ws для использования веб-сервиса.Получение следующей ошибки в клиенте.Это работает, когда я получаю доступ к сервису, используя HttpURLConnection с теми же SOAPAction и Content-Type в заголовке, что и у клиента spring-ws.Прочитав и попробовав различные рекомендации, размещенные в Интернете, я все еще испытываю эту проблему.Фрагмент кода ниже.Оцените помощь:
**Error**:
***The endpoint reference (EPR) for the Operation not found is
http://host:port/serviceUri и действие WSA = // хост: порт / serviceAction ***
**Note**: I've replaced the actual uri above with dummy value.
**Code Snippet:**
StreamSource streamSource = new StreamSource(new
StringReader(xmlPayload));
StringWriter writer = new StringWriter();
responseResult = new StreamResult(writer);
WebServiceMessageSender messageSender = new
HttpComponentsMessageSender();
webSvcTemplate.setMessageSender(messageSender);
MessageFactory msgFactory =
MessageFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
SaajSoapMessageFactory newSoapMessageFactory = new
SaajSoapMessageFactory(msgFactory);
webSvcTemplate.setMessageFactory(newSoapMessageFactory);
boolean status = webSvcTemplate.sendSourceAndReceiveToResult(uri,
stringSource, new SoapActionCallback(action), responseResult);
if (status) {
logger.debug("received successful response from: " + uri);
logger.debug(responseResult.toString());
}