When you use Axis to create a proxy for the WCF service, it generates a stub that automatically sets the header MustUnderstandforhttp://www.w3.org/2005/08/addressing
MustUnderstand false. . , , .
CommentWcfServiceLocator locator =new CommentWcfServiceLocator();
WSHttpBinding_ICommentServiceStub stub;
try {
stub = (WSHttpBinding_ICommentServiceStub) locator.getWSHttpBinding_ICommentService(new java.net.URL("http://www.google.com/CommentWcfService.svc"));
SOAPHeaderElement action = new SOAPHeaderElement(new QName("wsa:Action"), "http://tempuri.org/ICommentService/GetCommentSummaryByHotelId");
SOAPHeaderElement to = new SOAPHeaderElement(new QName("wsa:To"),
stub._getProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY));
action.setActor(null);
action.setNamespaceURI("http://www.w3.org/2005/08/addressing");
to.setActor(null);
to.setNamespaceURI("http://www.w3.org/2005/08/addressing");
stub.setHeader(action);
stub.setHeader(to);
stub._setProperty(Call.CHECK_MUST_UNDERSTAND, Boolean.FALSE);
stub.getCommentSummaryByHotelId("","02201158", 0);
}
catch(Exception EX){}
MustUnderstand veru .