I need to pass MessageId from Java client to Dynamics AX using AIF. How can I set MessageId to XML Header section? In topic from MSDN I see next:
SalesOrderServiceClient salesOrderServiceClient = new SalesOrderServiceClient(); System.ServiceModel.OperationContextScope operContextScope; operContextScope = new System.ServiceModel.OperationContextScope(salesOrderServiceClient.InnerChannel); //"OperationContextScope" -> analog in Java? //"IClientChannel" -> how I can obtain it from proxy or service class? using(operContextScope) { System.ServiceModel.OperationContext.Current.OutgoingMessageHeaders.MessageId = new System.Xml.UniqueId(Guid.NewGuid()); }
((BindingProvider) proxy).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, usr); ((BindingProvider) proxy).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, pwd);
but this construction doesn't fill Header section, it's for SOAP.