Hi Shakila, Since you are using PUT operation without body, Can you try the following property to remove the entry body from HTTP request.
<property name="NO_ENTITY_BODY" action="remove" scope="axis2"/> Thanks, Kathees On Thu, Jun 16, 2016 at 4:41 PM, Shakila Sivagnanarajah <shak...@wso2.com> wrote: > Hi, > > I sent the request without setting the payload entity using a proxy > service [1], It works fine. But in my template, I remove the previous > payload using 'FORCE_POST_PUT_NOBODY'. It seems the problem is the payload. > > [1] > <proxy name="test" startOnLoad="true" transports="https http"> > <description/> > <target> > <inSequence> > <property name="Content-Length" scope="transport" > value="256"/> > <property name="Authorization" scope="transport" > value="xxxxxxxxxx"/> > <property name="x-amz-copy-source-range" > scope="transport" value="bytes=0-9"/> > <property name="Content-Type" scope="transport" > value="application/xml; charset=UTF-8"/> > <property name="x-amz-date" scope="transport" value="Thu, > 16 Jun 2016 10:34:25 GMT"/> > <property name="x-amz-copy-source" scope="transport" > value="/bucketName/testFile.jpg"/> > <header name="Content-Length" scope="transport" > value="256"/> > <call> > <endpoint> > <http method="PUT" uri-template=" > http://1466064852454testconbkt2.s3-us-west-2.amazonaws.com/testFile1.txt?partNumber=2&uploadId=wdU0iM8SaNaGzHyFiUEHEk4WTqkL2jC_LHTeLZ3EjTLjsB8WVELvbH.XHcCrToRQQRtDAjr_kWv0JPk_7vacLVevdCjje11_pYuEjes2Ev1erXifpt.gdKmgtXU0VLP1 > "/> > </endpoint> > </call> > <respond/> > </inSequence> > </target> > </proxy> > > Thanks > > On Thu, Jun 16, 2016 at 9:46 AM, Senduran Balasubramaniyam < > sendu...@wso2.com> wrote: > >> Hi Shakila, >> >> Can you compare the request sending from ESB(using wirelog) and sending >> directly. >> >> Regards >> Senduran >> >> On Wed, Jun 15, 2016 at 6:56 PM, Shakila Sivagnanarajah <shak...@wso2.com >> > wrote: >> >>> Hi all, >>> >>> I am experiencing socket connection closed exception while trying >>> 'upload part operation' [1] of Amazon s3 connector. In direct call, the >>> response comes within 5 seconds. I increased the the timeout values as >>> below. >>> >>> synapse.global_timeout_interval - 180 seconds in synapse.properties >>> http.socket.timeout - 180 seconds in passthru-http.properties >>> http.socket.timeout.receiver - 180 seconds in nhttp.properties >>> >>> After this tuning also, no improvement. It waits for nearly 21 seconds. >>> But not receiving the response from API. [2] is the message I get. >>> >>> Finally I set the endpoint timeout [3] also. But the result is same. >>> >>> [1] >>> http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPartCopy.html >>> >>> >>> <http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPartCopy.html> >>> [2] >>> <Error> >>> <Code>RequestTimeout</Code> >>> <Message>Your socket connection to the server was not read from or >>> written to within the timeout period. Idle connections will be >>> closed.</Message> >>> <RequestId>7223E45B22E88E80</RequestId> >>> >>> <HostId>cH2RE4IG7QhmiN1Bpqw6/bweEKowmtXS+jFwJkzay/3u3MovuutgtzAXM37tpXuzCl23HxAYuZIF1rLGLuJxvh4GRAu6891c</HostId> >>> </Error> >>> >>> [3] >>> <call blocking="true"> >>> <endpoint> >>> <http method="put" >>> uri-template="{uri.var.bucketUrl}/{+uri.var.objectName}?partNumber={+uri.var.partNumber}&uploadId={+uri.var.uploadId}"> >>> <timeout> >>> <duration>180000</duration> >>> <responseAction>fault</responseAction> >>> </timeout> >>> </http> >>> </endpoint> >>> </call> >>> >>> [4] Template: >>> >>> <template name="uploadPart" xmlns="http://ws.apache.org/ns/synapse"> >>> <parameter name="bucketUrl" description="The URL of the bucket >>> without the http prefix."/> >>> <parameter name="objectName" description="The name to give for the >>> newly created object."/> >>> <parameter name="uploadId" description="This specifiy the ID of the >>> initiated multipart upload."/> >>> <parameter name="partNumber" description="This specifiy the number >>> or the index of the uploaded part."/> >>> <sequence> >>> <property name="uri.var.bucketUrl" expression="$func:bucketUrl"/> >>> <property name="uri.var.objectName" >>> expression="$func:objectName"/> >>> <property name="uri.var.uploadId" expression="$func:uploadId"/> >>> <property name="uri.var.partNumber" >>> expression="$func:partNumber"/> >>> <!-- Force ESB to send the content length to the AmazonS3 API --> >>> <property name="FORCE_HTTP_CONTENT_LENGTH" value="true" >>> scope="axis2"/> >>> <property name="COPY_CONTENT_LENGTH_FROM_INCOMING" value="true" >>> scope="axis2"/> >>> <call> >>> <endpoint> >>> <http method="put" >>> >>> uri-template="{uri.var.bucketUrl}/{+uri.var.objectName}?partNumber={+uri.var.partNumber}&uploadId={+uri.var.uploadId}"/> >>> </endpoint> >>> </call> >>> <!-- Remove response custom header information --> >>> <header name="x-amz-id-2" scope="transport" action="remove"/> >>> <header name="x-amz-request-id" scope="transport" >>> action="remove"/> >>> <header name="Via" scope="transport" action="remove"/> >>> <header name="x-amz-server-side-encryption" scope="transport" >>> action="remove"/> >>> </sequence> >>> </template> >>> >>> >>> Thank you >>> -- >>> Shakila Sivagnanarajah >>> Software Engineer >>> Mobile :+94 (0) 768 856837 >>> shak...@wso2.com >>> WSO2, Inc. >>> lean . enterprise . middleware >>> http://www.wso2.com/ >>> >> >> >> >> -- >> *Senduran * >> Software Engineer, >> WSO2, Inc.; http://wso2.com/ <http://wso2.com/> >> Mobile: +94 77 952 6548 >> > > > > -- > Shakila Sivagnanarajah > Software Engineer > Mobile :+94 (0) 768 856837 > shak...@wso2.com > WSO2, Inc. > lean . enterprise . middleware > http://www.wso2.com/ > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Kathees Software Engineer, email: kath...@wso2.com mobile: +94772596173
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev