Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AF96F11C92 for ; Wed, 24 Sep 2014 17:05:03 +0000 (UTC) Received: (qmail 30378 invoked by uid 500); 24 Sep 2014 17:05:03 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 30320 invoked by uid 500); 24 Sep 2014 17:05:03 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 30309 invoked by uid 99); 24 Sep 2014 17:05:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Sep 2014 17:05:03 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Wentao.Lu@bchydro.com designates 142.52.197.35 as permitted sender) Received: from [142.52.197.35] (HELO mxk02.bchydro.bc.ca) (142.52.197.35) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Sep 2014 17:04:58 +0000 X-IronPort-AV: E=Sophos;i="5.04,590,1406617200"; d="scan'208";a="36014030" Received: from kdcbchmbx3.bchydro.bc.ca (HELO bchexchange.bchydro.com) ([10.242.95.8]) by mxk02smtp.bchydro.bc.ca with ESMTP; 24 Sep 2014 10:04:34 -0700 Received: from KDCBCHMBX1.bchydro.adroot.bchydro.bc.ca ([169.254.6.25]) by KDCBCHMBX3.bchydro.adroot.bchydro.bc.ca ([169.254.8.245]) with mapi id 14.03.0158.001; Wed, 24 Sep 2014 10:04:33 -0700 From: "Lu, Wentao" To: =?iso-8859-1?Q?Florian_M=FCller?= , "dev@chemistry.apache.org" Subject: RE: DotCMIS create document failed with "The socket connection was aborted" Thread-Topic: DotCMIS create document failed with "The socket connection was aborted" Thread-Index: Ac/WoxLMTl3E7UpxQViDFrZ78mZ13gAPWGOAAE3HAfA= Date: Wed, 24 Sep 2014 17:04:33 +0000 Message-ID: <095375566B6DA042AF27048A5083FFA6323231BE@KDCBCHMBX1.bchydro.adroot.bchydro.bc.ca> References: <095375566B6DA042AF27048A5083FFA63231FF4B@KDCBCHMBX1.bchydro.adroot.bchydro.bc.ca> <542089CD.8060503@apache.org> In-Reply-To: <542089CD.8060503@apache.org> Accept-Language: en-CA, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.242.12.135] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi Florian, >From readme file https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk/R= EADME it said " Not all CMIS Web Services endpoints are compatible with the= .NET framework for a number of reasons", do you have a list which endpoin= ts are not compatible? Thanks Wentao -----Original Message----- From: Florian M=FCller [mailto:fmui@apache.org]=20 Sent: 2014, September 22 1:43 PM To: dev@chemistry.apache.org Cc: Lu, Wentao Subject: Re: DotCMIS create document failed with "The socket connection was= aborted" Hi Wentao, Check your server and network setup. Some Web Services stacks (for example = .Net) have (configurable) limits. There is nothing the client can do if the server closes the connection. - Florian > Hi, >=20 > We are testing DotCMIS with Web Service binding (atompub works fine so fa= r, but in some use cases we have to use web service binding). >=20 > We get below exceptions with createDocument function, the sample "test.zi= p" file is only 400KB. >=20 > {"Unable to write data to the transport connection: An existing=20 > connection was forcibly closed by the remote host."} >=20 > StackTrace as below >=20 > at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[= ] buffers) > at System.Net.Security._SslStream.StartWriting(SplitWritesState splitW= rite, SplitWriteAsyncProtocolRequest asyncRequest) > at System.Net.Security._SslStream.ProcessWrite(BufferOffsetSize[] buff= ers, SplitWriteAsyncProtocolRequest asyncRequest) > at System.Net.TlsStream.MultipleWrite(BufferOffsetSize[] buffers) > at System.Net.PooledStream.MultipleWrite(BufferOffsetSize[] buffers) > at System.Net.ConnectStream.InternalWrite(Boolean async, Byte[] buffer= , Int32 offset, Int32 size, AsyncCallback callback, Object state) > at System.Net.ConnectStream.Write(Byte[] buffer, Int32 offset, Int32 s= ize) > at System.ServiceModel.Channels.BytesReadPositionStream.Write(Byte[] b= uffer, Int32 offset, Int32 count) > at=20 > System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.WebReques > tOutputStream.Write(Byte[] buffer, Int32 offset, Int32 count) >=20 > Here is our sample code: > using System; > using System.Collections.Generic; > using System.Linq; > using System.Text; > using DotCMIS; > using DotCMIS.Client; > using DotCMIS.Client.Impl; >=20 > namespace ConsoleApplication1 > { > class Program > { > static void Main(string[] args) > { > =20 > System.Net.ServicePointManager.ServerCertificateValidationCallback =3D=20 > delegate { return true; }; >=20 > Dictionary parameters =3D new Dictionary(); > parameters[SessionParameter.BindingType] =3D BindingType.WebS= ervices; > String host =3D "myhost"; >=20 > =20 > parameters[DotCMIS.SessionParameter.WebServicesRepositoryService] =3D=20 > "https://"+host+":7010/cmis/services101/RepositoryService"; >=20 > parameters[DotCMIS.SessionParameter.WebServicesAclService]=20 > =3D "https://"+host+":7010/cmis/services101/ACLService"; >=20 > =20 > parameters[DotCMIS.SessionParameter.WebServicesDiscoveryService] =3D=20 > "https://"+host+":7010/cmis/services101/DiscoveryService"; >=20 > =20 > parameters[DotCMIS.SessionParameter.WebServicesMultifilingService] =3D=20 > "https://"+host+":7010/cmis/services101/MultiFilingService"; >=20 > =20 > parameters[DotCMIS.SessionParameter.WebServicesNavigationService] =3D=20 > "https://"+host+":7010/cmis/services101/NavigationService"; >=20 > =20 > parameters[DotCMIS.SessionParameter.WebServicesObjectService] =3D=20 > "https://"+host+":7010/cmis/services101/ObjectService"; >=20 > =20 > parameters[DotCMIS.SessionParameter.WebServicesPolicyService] =3D=20 > "https://"+host+":7010/cmis/services101/PolicyService"; >=20 > =20 > parameters[DotCMIS.SessionParameter.WebServicesRelationshipService] =3D=20 > "https://"+host+":7010/cmis/services101/RelationshipService"; >=20 > =20 > parameters[DotCMIS.SessionParameter.WebServicesVersioningService] =3D=20 > "https://"+host+":7010/cmis/services101/VersioningService"; >=20 > =20 > parameters[DotCMIS.SessionParameter.WebServicesEnableUnsecuredResponse > ] =3D "true"; >=20 > parameters[SessionParameter.User] =3D "admin"; > parameters[SessionParameter.Password] =3D "password"; > parameters[SessionParameter.RepositoryId] =3D "RepositoryOS1"= ; > parameters[SessionParameter.ConnectTimeout] =3D "-1"; >=20 > SessionFactory factory =3D SessionFactory.NewInstance(); > ISession session =3D factory.CreateSession(parameters); >=20 > IDictionary properties =3D new Dictionary(); > properties[PropertyIds.Name] =3D "Hello World Document"; > properties[PropertyIds.ObjectTypeId] =3D "Document"; >=20 > byte[] content =3D UTF8Encoding.UTF8.GetBytes("Hello=20 > World!"); >=20 > System.IO.FileInfo fileinfo =3D new=20 > System.IO.FileInfo("C:\\test\\test.zip"); >=20 > DotCMIS.Data.Impl.ContentStream contentStream =3D new DotCMIS= .Data.Impl.ContentStream(); > contentStream.FileName =3D fileinfo.Name; > contentStream.MimeType =3D "application/zip"; > contentStream.Length =3D fileinfo.Length; > contentStream.Stream =3D fileinfo.OpenRead(); >=20 > IFolder myFolder =3D=20 > (IFolder)session.GetObjectByPath("/temp"); >=20 > IDocument myDoc1 =3D myFolder.CreateDocument(properties,=20 > contentStream, DotCMIS.Enums.VersioningState.Major); >=20 > } >=20 > } > } >=20 > Any ideas what could be the issue? >=20 > Thanks > Wentao >=20 >=20 >=20 > ________________________________ > This email and its attachments are intended solely for the personal use o= f the individual or entity named above. Any use of this communication by an= unintended recipient is strictly prohibited. If you have received this ema= il in error, any publication, use, reproduction, disclosure or disseminatio= n of its contents is strictly prohibited. Please immediately delete this me= ssage and its attachments from your computer and servers. We would also app= reciate if you would contact us by a collect call or return email to notify= us of this error. Thank you for your cooperation. > -BCHydroDisclaimerID5.2.8.1541 >=20