2012-02-08 31 views
0

我正在使用BizTalk Server 2010和WCF-WSHttp適配器調用Web服務。 Web服務在HTTPS上發佈,並且必須使用使用證書籤名的WS-Security發送請求。使用WCF-WSHttp BizTalk 2010適配器調用WS-Security + SSL服務時出錯

這些適配器配置:

常規 - >交通運輸 - >類型:WCF-WSHttp

WCF-WSHttp屬性:

常規 - >地址:HTTPS服務端點。

常規 - >安全 - >安全模式:TransportWithMessageCredential

常規 - >安全 - >信息安全 - >郵件客戶端憑據類型:證書

常規 - >安全 - >信息安全 - > Algoritm套房:256

常規 - >安全 - >協商服務憑證:是

常規 - >安全 - >建立安全上下文:是

常規 - >安全性 - >客戶端證書 - > ThumbPrint:用於簽署消息的證書。

我不把任何東西放在常規選項卡的SOAP操作標題文本框中。

當我調用服務,我得到了以下錯誤消息:

An error occurred while processing the message, refer to the details section for more information 
Message ID: {A3234833-0453-4DCA-BB9C-7AAA9A865B90} 
Instance ID: {54417DE1-3E08-4AB4-8BE2-B5565650ECFF} 
Error Description: System.ServiceModel.ProtocolException: El tipo de contenido text/xml;charset=utf-8 del mensaje de respuesta no coincide con el tipo de contenido del enlace (application/soap+xml; charset=utf-8). Si usa un codificador personalizado, asegurese de que el método IsContentTypeSupported se implemente correctamente. Los primeros 553 bytes de la respuesta fueron: '<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
<soapenv:Body> 
    <soapenv:Fault> 
    <faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode> 
    <faultstring>no SOAPAction header!</faultstring> 
    <detail> 
    <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">zefdesw02</ns2:hostname> 
    </detail> 
    </soapenv:Fault> 
</soapenv:Body> 
</soapenv:Envelope>'. ---> System.Net.WebException: Error en el servidor remoto: (500) Error interno del servidor. 
    en System.Net.HttpWebRequest.GetResponse() 
    en System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) 
    --- Fin del seguimiento de la pila de la excepción interna --- 

Server stack trace: 
    en System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout) 
    en System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout) 
    en System.ServiceModel.Security.TlsnegoTokenProvider.OnOpen(TimeSpan timeout) 
    en System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout) 
    en System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 
    en System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout) 
    en System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout) 
    en System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout) 
    en System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 
    en System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout) 
    en System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 
    en System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout) 
    en System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout) 
    en System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout) 
    en System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout) 
    en System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 
    en System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout) 
    en System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 
    en System.ServiceModel.Channels.CommunicationObject.Open() 

Exception rethrown at [0]: 
    en System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) 
    en System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) 
    en System.ServiceModel.ICommunicationObject.Open() 
    en Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.GetChannel[TChannel](IBaseMessage bizTalkMessage, ChannelFactory`1& cachedFactory) 
    en Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage) 

看來,遠程服務器不理解SOAP客戶端消息或SOAP消息沒有被很好地形成(它不是不是一個SOAP消息或它沒有被標記)。

有人可以幫助我嗎?

+0

有關這方面的消息嗎?從BizTalk調用Axis2 web服務時遇到問題... – mousio 2013-05-30 08:14:44

回答

0

根據翻譯,它看起來像發送的內容類型對於目標服務期望的內容不正確。看起來您正在調用Apache Axis服務,因此您可能需要構建端點行爲來處理來自Apache的響應。在其他線程上,我聽說有人需要自定義發送的內容,因爲目標服務不是WCF。

相關問題