This project has moved. For the latest updates, please go here.

Testing ConsumePost

Aug 16, 2016 at 4:33 PM
I create an XML file like this:

<ns0:Event xmlns:ns0="http://RESTDEMO.Event">
<ns0:Id>TEST-01</ns0:Id>
<ns0:Date>2016-08-16</ns0:Date>
<ns0:Name>Neal Walters</ns0:Name>
</ns0:Event>

and dropped it, and get this error:
Error Description: System.ArgumentException: A property with the name 'http://schemas.microsoft.com/BizTalk/2003/http-properties#UserHttpHeaders' is not present.

Server stack trace:
at System.ServiceModel.Channels.MessageProperties.get_Item(String name)
at bLogical.BizTalk.RESTBehavior.BizTalkRESTTransmitHandler.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)

Based on the stack trace, I see it got into the Handler.

Also - I cloned your program for my application, and made changes.
I have to pass userid/password in header. But I get this error, and it's not in my TransmitHandler:

A message sent to adapter "WCF-Custom" on send port "sp_SquareTrade-RESTrequest" with URI "http://api-stage1.squaretrade.com/rest/depotevents/2/" is suspended.
Error details: System.InvalidOperationException: Envelope Version 'EnvelopeNone (http://schemas.microsoft.com/ws/2005/05/envelope/none)' does not support adding Message Headers.
at System.ServiceModel.Channels.MessageHeaders.ValidateHeaderKind(HeaderKind headerKind)
at System.ServiceModel.Channels.MessageHeaders.GetHeaderKind(MessageHeaderInfo headerInfo)
at System.ServiceModel.Channels.MessageHeaders.Insert(Int32 headerIndex, MessageHeader header)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfUtils.AddHeaders(Message message, String xmlHeaders)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfMarshaller.CreateWcfMessage(CreateWcfMessageSettings settings)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient2.SendRequestMessage(IBaseMessage bizTalkMessage, IRequestChannel channel)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient
2.SendMessage(IBaseMessage bizTalkMessage)

Thanks for your help,
Neal Walters
Aug 16, 2016 at 7:07 PM
For the second half...
Oh, I think I see my error in my Orch - I had WSE2 headers because I copied the orchestration over from another system as a model; going to webHttpBinding doesn't support that. About to remove and retest.