我正试图致电肥皂服务,但遇到肥皂验证错误
我尝试通过以下代码调用服务
Object responseObject = null;
try
{
LOG.info("About to call {}", getDefaultUri());
// add service headers
GlobalServiceHeaderHelper globalServiceHeaderHelper = createsGlobalServiceHeader();
// call webservice
WebServiceTemplate temp = getWebServiceTemplate();
responseObject = getWebServiceTemplate().marshalSendAndReceive(inPayload, globalServiceHeaderHelper.getCallback());
}
catch (SoapFaultClientException e)
{
System.out.println(e.getRootCause() +Arrays.toString(e.getStackTrace()));
throw new WebServiceException("Exception from " + getDefaultUri() + " : "
+ e.getWebServiceMessage().getFaultReason(), e);
}
catch (WebServiceException e)
{
throw new WebServiceException("Exception from " + getDefaultUri(), e);
}
Caused by: org.springframework.ws.soap.client.SoapFaultClientException: Validation error
at org.springframework.ws.soap.client.core.SoapFaultMessageResolver.resolveFault(SoapFaultMessageResolver.java:38)
at org.springframework.ws.client.core.WebServiceTemplate.handleFault(WebServiceTemplate.java:830)
at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:624)