简体   繁体   中英

BizTalk 2016/19: How to create Message to receive Access Token from Webservice with dynamic Sendport

Msg_Get_AccessToken = "";
Msg_Get_AccessToken(GUID) = ...;
Msg_Get_AccessToken(WebServiceHost) = "http://...";
Msg_Get_AccessToken(WCF.VariablePropertyMapping)= @"<?xml version='1.0' encoding='utf-16'?>
<BtsVariablePropertyMapping xmlns:xsi='http://www...' xmlns:xsd='http://www...'>
<Variable Name='var_GUID' PropertyName='GUID' PropertyNamespace='https://...'/>
</BtsVariablePropertyMapping">;
Msg_Get_AccessToken(WCF.BindingType)="WCF-WebHTTP";
Msg_Get_AccessToken(WCF.SecurityMode)="Transport";
Msg_Get_AccessToken(WCF.HttpMethodAndUrl)=@"<BtsHttpUrlMapping> <Operation Method='POST' Url='{var_GUID}'  /></BtsHttpUrlMapping>";
Msg_Get_AccessToken(WCF.HttpHeaders) = "Content-Type:application/x-www-form-urlencoded"+"grant_type=client_credentials&client_id=123&client_secret=3456&scope=https://...";
Msg_Get_AccessToken(WCF.SuppressMessageBodyForHttpVerbs)="POST";
Msg_Get_AccessToken(WCF.SecurityMode)="None";
Msg_Get_AccessToken(WCF.TransportClientCredentialType)="None";
Msg_Get_AccessToken(WCF.MaxReceivedMessageSize)=2147483647;
Msg_Get_AccessToken(BTS.RetryCount) = 5;
Msg_Get_AccessToken(BTS.RetryInterval) = 5;
Msg_Get_AccessToken(BTS.IsDynamicSend) = true;
P_GET_ACCESSTOKEN(Microsoft.XLANGs.BaseTypes.Address)=Msg_Get_AccessToken(WebServiceHost);
P_GET_ACCESSTOKEN(Microsoft.XLANGs.BaseTypes.TransportType)="WCF-WebHttp";

This is not working! I don't know how to transfer the information

"Content-Type:application/x-www-form-urlencoded"+"grant_type=client_credentials&client_id=1234&client_secret=5678&scope=https://..."; 

to the dynamic send port

Does anyone know how this might be done for the dynamic wcf-http send port?

We get access token with a WCF-behavior. Is that possible for you? See: Token behavior in BizTalk

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM