I use the send client to access the web service. All my parameters are correct, there are no errors and, examining the answer with Wireshark, I definitely see that the correct answer is received at the network level. But at the java application level, my answer source is empty.
public void testDispatch(QName serviceName, QName portName, String endpointAddress, String action) throws Exception {
Service service = Service.create(serviceName);
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, endpointAddress);
String requestXml = buildRequestXml();
Dispatch<Source> dispatch = service.createDispatch(portName, Source.class, Service.Mode.MESSAGE);
dispatch.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, action);
Source request = new StreamSource(new StringReader(requestXml));
Source response = dispatch.invoke(request);
Transformer copier = TransformerFactory.newInstance().newTransformer();
copier.transform(response, new StreamResult(System.out));
}
I tried converting to DOMResult, the same, empty root root node. Any ideas?
source
share