5

I am sending a component inside to the Translation Manager (SDL World Server) using the workflow In which I am calling a TranslationManagerFacade Service to communicate with Translation Manager System. I am trying to call the method inside TranslationManagerFacade service from the client and getting the error below.

ERROR Workflow.SendTranslationActivityWorker - System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.9990004'. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing) --- End of inner exception stack trace ---

Server stack trace: at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing) at System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout) at System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout) at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper) at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper) at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)

I increased the timeout to 3 minutes but it still reports the CommunicationException.

Here is my client code to create the endpoint (I've confirmed I can hit the service over http)

Here is the line of code where the error is generated

public string Translate(string UserId, string title, string publicationId, IEnumerable<string> items, bool includeItemsAlreadyTranslated)
{
    string tcpServiceUrl = "net.tcp//MyMachineName:808/TranslationManagerFacade.svc"
    NetTcpBinding tcpb = new NetTcpBinding();
    tcpb.Security = new NetTcpSecurity() { Mode = SecurityMode.None };
    channelFactory = new ChannelFactory<ITranslation>(tcpb);
    endpoint = new EndpointAddress(tcpServiceUrl);
    client = channelFactory.CreateChannel(endpoint);

    return client.Translate(UserId, title, publicationId, items, includeItemsAlreadyTranslated);   
}

I am following the blog from Eric Huiza to implement TranslationManagerFacade

Here is the endpoint in TranslationManagerFacade

enter image description here

service is hosted in IIS on the same machine. I can see that client is not null in my code

1

Since you are on SDL Web 8, you really shouldn't use the TranslationManagerFacade, as it is based on a deprecated API. Besides being deprecated it is also limited in functionality compared to the new API - and it is a lot harder to use.

You can find the documentation for the new API here: http://docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v1/GUID-62FCD244-8E86-48DD-8569-86A9EDBFA7A5

0

The Issue has been resolved by changing the service name from

<service behaviorConfiguration="" name="TranslationManagerFacade"> to 
 <service behaviorConfiguration=""
 name="TranslationManagerFacade.TranslationManagerFacade">

in the web.config file of TranslationManagerFacade service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.