![]() | |
First Steps |
To consume the WCF endpoints of SDK using our sample code it will first be necessary to obtain a proxy. For more information, refer to the Proxy page.
There are many code samples. For a simple WCF method example, try the Get_Activity sample code. For a simple restful example, try Post /api/lookup_search/{lookup_type} sample code.
The first call to SDK can take a while. Up to a few minutes. Often the call can time out. This occurs because IIS takes time to build the service. Restarting the SDKServerAppPool causes the first call to take longer. This includes IIS Resets or server restarts.
.NET Core WCF currently doesn't have built-in MTOM message encoding support. If you are trying to either upload or download attachments with SDK, through an integration written with .NET Core, then we recommend installing the WcfCoreMtomEncoderV2 NuGet package in your .NET Core project. The following is a C# code snippet for using this NuGet package:
EndpointAddress EndpointAddress = new EndpointAddress("https://<MyServer>/<virtual directory>/EpicSDKCore.svc/Attachments"); var encoding = new MtomMessageEncoderBindingElement (new TextMessageEncodingBindingElement { MessageVersion = MessageVersion.Soap11, WriteEncoding = Encoding.UTF8 } ); var transport = new HttpsTransportBindingElement(); var customBinding = new CustomBinding(encoding, transport); var streamingClient = new EpicSDKFileTransferClient(customBinding, EndpointAddress);
Here is further information about the WcfCoreMtomEncoderV2 NuGet package.