Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Dynamics AX AIF. Set Message headers in Java

$
0
0

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());
    }
In my Java application I use next:

    ((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.

Viewing all articles
Browse latest Browse all 72043

Trending Articles