Issues while enable the blocking mode

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Issues while enable the blocking mode

Kanapriya
Hi All,

I have implemented Microsoft Dynamic CRM connector as discussed in [1]. Almost I have done with the development and all the functionalities works fine with non blocking mode.

When I tried with blocking mode, I got an below errors in the following cases.
  • In Microsoft Dynamic CRM, when we create an entities (update, delete and etc) got an error as below. It seems there is no response body in input stream. But In Microsoft Dynamics CRM only the 204 status code will be return as response if the create (update, delete and etc) operations works fine.
    [2017-06-14 17:10:16,570] DEBUG - header >> "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 17:10:16,570] DEBUG - header >> "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Postman-Token: e1206cf7-65f8-18f2-b911-eb93d0eb7d73[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "User-Agent: Axis2[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Content-Length: 28[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - content >> "{"name":"First opportunity"}"
    [2017-06-14 17:10:21,325] DEBUG - header << "HTTP/1.1 204 No Content[\r][\n]"
    [2017-06-14 17:10:21,326] DEBUG - header << "HTTP/1.1 204 No Content[\r][\n]"

    [2017-06-14 17:10:21,327] DEBUG - header << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 17:10:21,327] DEBUG - header << "Pragma: no-cache[\r][\n]"
    [2017-06-14 17:10:21,327] DEBUG - header << "Expires: -1[\r][\n]"
    [2017-06-14 17:10:21,328] DEBUG - header << "Location: <a href="https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities(6ed1ee3d-f650-e711-80f7-c4346bad279c)[\r][\n]">https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities(6ed1ee3d-f650-e711-80f7-c4346bad279c)[\r][\n]"
    [2017-06-14 17:10:21,328] DEBUG - header << "Server: Microsoft-IIS/8.5[\r][\n]"
    [2017-06-14 17:10:21,329] DEBUG - header << "REQ_ID: 0962d55a-5dad-41e6-806d-44b0bfc10723[\r][\n]"
    [2017-06-14 17:10:21,329] DEBUG - header << "Set-Cookie: ReqClientId=c550a1bd-e5cc-4410-b9d6-a49e8140ac99; expires=Tue, 14-Jun-2067 11:40:16 GMT; path=/; secure; HttpOnly[\r][\n]"
    [2017-06-14 17:10:21,330] DEBUG - header << "OData-Version: 4.0[\r][\n]"
    [2017-06-14 17:10:21,330] DEBUG - header << "OData-EntityId: <a href="https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities(6ed1ee3d-f650-e711-80f7-c4346bad279c)[\r][\n]">https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities(6ed1ee3d-f650-e711-80f7-c4346bad279c)[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "Access-Control-Allow-Origin: *[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "Access-Control-Expose-Headers: Preference-Applied,OData-EntityId,Location,ETag,OData-Version,Content-Encoding,Transfer-Encoding,Content-Length,Retry-After[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "X-AspNet-Version: 4.0.30319[\r][\n]"
    [2017-06-14 17:10:21,332] DEBUG - header << "X-Powered-By: ASP.NET[\r][\n]"
    [2017-06-14 17:10:21,332] DEBUG - header << "Date: Wed, 14 Jun 2017 11:40:21 GMT[\r][\n]"
    [2017-06-14 17:10:21,333] DEBUG - header << "Set-Cookie: crmf5cookie=!67xA1q+84x6WYJTJGlBgYdD3j/Njco9CdLugpBlBx2wd7VJ6Pap8GRf3itexCLd6HOop31+Nu7rKg38=;secure; path=/[\r][\n]"
    [2017-06-14 17:10:21,333] DEBUG - header << "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
    [2017-06-14 17:10:21,334] DEBUG - header << "[\r][\n]"
    [2017-06-14 17:10:21,340]  INFO - HTTPSender Unable to sendViaPost to url[https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities]
    org.apache.axis2.AxisFault: InputStream cannot be NULL.

        at org.apache.axis2.transport.http.AbstractHTTPSender.processResponse(AbstractHTTPSender.java:232)
        at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:289)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:196)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:293)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:194)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:125)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:104)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:84)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
        at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:69)
        at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:134)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
        at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:210)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:325)
        at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:371)
        at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    [2017-06-14 17:10:21,385]  INFO - LogMediator To: https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities, MessageID: urn:uuid:e0cf3ed5-d073-4e83-9a38-f04d8c8f4263, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 401001, ERROR_MESSAGE = InputStream cannot be NULL., Payload: {"name":"First opportunity"}
    [2017-06-14 17:10:21,387]  WARN - PassThroughTransportUtils Unable to set the HTTP status code from the property HTTP_SC with value:
    [2017-06-14 17:10:21,397] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 202 Accepted[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Wed, 14 Jun 2017 11:40:21 GMT[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Connection: keep-alive[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"


  • If http method is PATCH, then it changed the method as POST. Please find sample wire log for both non blocking and blocking call.

    Non - blocking

    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "PATCH /api/data/v8.2/accounts(91618256718-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude HTTP/1.1[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Prefer: return=representation[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept-Language: en-US,en;q=0.8[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Authorization: Bearer SUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsImtpZCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyJ9.eyJhdWQiOiJodHRwczovL3dzbzIxMjM0LmNybTUuZHluYW1pY3MuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzIxMzliNDZmLWE3ZjQtNGJiMS1iNDU4LWE0OWFmYWNjY2QwNS8iLCJpYXQiOjE0OTc0MzA0MzAsIm5iZiI6MTQ5NzQzMDQzMCwiZXhwIjoxNDk3NDM0MzMwLCJhY3IiOiIxIiwiYWlvIjoiQVNRQTIvOERBQUFBbWV5QitsbXdTUXJCM3luSTBsMVRtY250blNHOUJjQzh6MEZhOUVOYzUrMD0iLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiYzEyZWM1YmUtODM1Ni00ZWRmLWI5YTQtY2Q1NjNlZDA5MTVhIiwiYXBwaWRhY3IiOiIxIiwiZmFtaWx5X25hbWUiOiJwcml5YSIsImdpdmVuX25hbWUiOiJrYW5hIiwiaXBhZGRyIjoiMjAzLjk0Ljk1LjQiLCJuYW1lIjoia2FuYSBwcml5YSIsIm9pZCI6ImZlNmY4ODVlLTk5ZWItNGJjMC1hMmRhLTZkYzU2ZmMxNDYxNiIsInBsYXRmIjoiMTQiLCJwdWlkIjoiMTAwMzAwMDBBMUJDRTk1RiIsInNjcCI6InVzZXJfaW1wZXJzb25hdGlvbiIsInN1YiI6IkJub3c0T2JEcEoyWElGSWJVR1hfZ2VlaWRDRWV5WC13NFQzYU1WNWRBZjAiLCJ0aWQiOiIyMTM5YjQ2Zi1hN2Y0LTRiYjEtYjQ1OC1hNDlhZmFjY2NkMDUiLCJ1bmlxdWVfbmFtZSI6ImthbmFAd3NvMjEyMzQub25taWNyb3NvZnQuY29tIiwidXBuIjoia2FuYUB3c28yMTIzNC5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAiLCJ3aWRzIjpbIjYyZTkwMzk0LTY5ZjUtNDIzNy05MTkwLTAxMjE3NzE0NWUxMCJdfQ.bKyHO4wmp5JFBJb-0OI7OdeHguF37Zd3z2vgfgstn9iF7uP_PtuEO6Rxdtp07mVKZmNqP50GeZm62FZ74VgB8eDnxQP9mQXEe2rBU94oLVzc9r0bQ1YGqF88RQVcXoM-Q4U3J9rtyuZD1iEog1UsS43krG22YHQ5c-1234Cwbc1noz_bSpx798A1p5-KSD3mckVabkpxn__OU1lyygEfY6FiieuHQ0iT8nxmguGdH371XesxLzyJFOfZLDPHierLMUctQj7e2d_ClbA5nV7CjPfx7PitNVM1owxdnbtSRzkIUKn1gr8cI_0SY7hA4NGF3IrVxoIGcQ1tXaJKDPBqZ2FtozQgvfi61g[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Action: urn:updateEntityWithDataReturnedOrSinglePropertyValue[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept-Encoding: gzip, deflate[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Postman-Token: c1e955d9-5307-7369-6fd3-8c4cdefd56da[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Content-Type: application/json[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept: */*[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Content-Length: 33[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Connection: Keep-Alive[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"
    [2017-06-14 14:58:36,478] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "[\r][\n]"
    [2017-06-14 14:58:36,478] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "{"name":"Updated Sample Account"}"
    [2017-06-14 14:58:37,828] DEBUG - wire HTTPS-Sender I/O dispatcher-3 >> "HTTP/1.1 200 OK[\r][\n]"


    Blocking

    [2017-06-14 15:00:13,791] DEBUG - header >> "POST /api/data/v8.2/accounts(91618256718-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude HTTP/1.1[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Content-Type: application/json; charset=UTF-8[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept: */*[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept-Encoding: gzip, deflate[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept-Language: en-US,en;q=0.8[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Action: urn:updateEntityWithDataReturnedOrSinglePropertyValue[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsImtpZCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyJ9.eyJhdWQiOiJodHRwczovL3dzbzIxMjM0LmNybTUuZHluYW1pY3MuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzIxMzliNDZmLWE3ZjQtNGJiMS1iNDU4LWE0OWFmYWNjY2QwNS8iLCJpYXQiOjE0OTc0MzA0MzAsIm5iZiI6MTQ5NzQzMDQzMCwiZXhwIjoxNDk3NDM0MzMwLCJhY3IiOiIxIiwiYWlvIjoiQVNRQTIvOERBQUFBbWV5QitsbXdTUXJCM3luSTBsMVRtY250blNHOUJjQzh6MEZhOUVOYzUrMD0iLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiYzEyZWM1YmUtODM1Ni00ZWRmLWI5YTQtY2Q1NjNlZDA5MTVhIiwiYXBwaWRhY3IiOiIxIiwiZmFtaWx5X25hbWUiOiJwcml5YSIsImdpdmVuX25hbWUiOiJrYW5hIiwiaXBhZGRyIjoiMjAzLjk0Ljk1LjQiLCJuYW1lIjoia2FuYSBwcml5YSIsIm9pZCI6ImZlNmY4ODVlLTk5ZWItNGJjMC1hMmRhLTZkYzU2ZmMxNDYxNiIsInBsYXRmIjoiMTQiLCJwdWlkIjoiMTAwMzAwMDBBMUJDRTk1RiIsInNjcCI6InVzZXJfaW1wZXJzb25hdGlvbiIsInN1YiI6IkJub3c0T2JEcEoyWElGSWJVR1hfZ2VlaWRDRWV5WC13NFQzYU1WNWRBZjAiLCJ0aWQiOiIyMTM5YjQ2Zi1hN2Y0LTRiYjEtYjQ1OC1hNDlhZmFjY2NkMDUiLCJ1bmlxdWVfbmFtZSI6ImthbmFAd3NvMjEyMzQub25taWNyb3NvZnQuY29tIiwidXBuIjoia2FuYUB3c28yMTIzNC5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAiLCJ3aWRzIjpbIjYyZTkwMzk0LTY5ZjUtNDIzNy05MTkwLTAxMjE3NzE0NWUxMCJdfQ.bKyHO4wmp5JFBJb-0OI7OdeHguF37Zd3z2stn9iF7uP_PtuEO6Rxdtp07mVKZmNqP50GeZm62FZ74VgB8eDnxQP9mQXEe2rBU94oLVzc9r0bQ1YGqF88RQVcXoM-Q4U3J9ZD1iEog1UsS43krG22YHQ5c-Cwbc1noz_bSpx798A1p5-KSD3mckVabkpxn__OU1lyygEfY6FiieuHQ0iT8nxmguGdH371XesxLzyJFOfZLDPHierLMUctQj7e2d_ClbA5nV7CjPfx7PitNVM1owxdnbtSRzkIUKn1gr8cI_0SY7hA4NGF3IrVxoIGcQ1tXaJKDPBqZ2FtozQgvfi61g[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Postman-Token: 5adbade0-eb4c-d552-202a-54ff19ee0dfa[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Prefer: return=representation[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "User-Agent: Axis2[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Content-Length: 33[\r][\n]"
    [2017-06-14 15:00:13,797] DEBUG - header >> "[\r][\n]"
    [2017-06-14 15:00:13,797] DEBUG - content >> "{"name":"Updated Sample Account"}"
    [2017-06-14 15:00:13,953] DEBUG - header << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
    [2017-06-14 15:00:13,953] DEBUG - header << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Pragma: no-cache[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Allow: GET,PUT,PATCH,DELETE[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Content-Type: application/json; odata.metadata=minimal[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Expires: -1[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Server: Microsoft-IIS/8.5[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "REQ_ID: 8ba04189-7459-4837-86e7-dce8df6a9ac1[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Set-Cookie: ReqClientId=582ab259-22e7-4130-81af-02700cf96a92; expires=Tue, 14-Jun-2067 09:30:13 GMT; path=/; secure; HttpOnly[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "Access-Control-Allow-Origin: *[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "Access-Control-Expose-Headers: Preference-Applied,OData-EntityId,Location,ETag,OData-Version,Content-Encoding,Transfer-Encoding,Content-Length,Retry-After[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "OData-Version: 4.0[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "X-AspNet-Version: 4.0.30319[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "X-Powered-By: ASP.NET[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Date: Wed, 14 Jun 2017 09:30:13 GMT[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Content-Length: 2149[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Set-Cookie: crmf5cookie=!CJwKVxgHGYXTSBLJGlBgYdD3j/Njchy9e3PTBiqxdXWXGrr92QWgIIwdtlLOkedogQKJlLfUu515Fyg=;secure; path=/[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "  "error":{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "    "code":"","message":"Unmapped Request found, PathTemplate:~/entityset/key, HttpVerb:POST","innererror":{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "      "message":"Unmapped Request found, PathTemplate:~/entityset/key, HttpVerb:POST","type":"Microsoft.Crm.CrmHttpException","stacktrace":"   at Microsoft.Crm.Extensibility.OData.EntityController.HandleUnmappedRequest(ODataPath path)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Objec"
    [2017-06-14 15:00:13,963] DEBUG - content << "t instance, Object[] arguments)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ActionFilterResult.<Exe"
    [2017-06-14 15:00:13,963] DEBUG - content << "cuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"[\r][\n]"
    [2017-06-14 15:00:13,963] DEBUG - content << "    }[\r][\n]"
    [2017-06-14 15:00:13,964] DEBUG - content << "  }[\r][\n]"
    [2017-06-14 15:00:13,964] DEBUG - content << "}"
    [2017-06-14 15:00:13,966]  INFO - HTTPSender Unable to sendViaPost to url[https://wso21234.crm5.dynamics.com/api/data/v8.2/accounts(31618218-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude]
    org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed

        at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:326)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:196)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:293)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:194)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:125)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:104)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:84)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
        at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:69)
        at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:134)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
        at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:210)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:325)
        at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:371)
        at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    [2017-06-14 15:00:13,988]  INFO - LogMediator To: https://wso21234.crm5.dynamics.com/api/data/v8.2/accounts(31618218-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude, MessageID: urn:uuid:73a06200-8cf2-4b5d-a03e-d19ee4ff5bdd, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 401001, ERROR_MESSAGE = Transport error: 405 Error: Method Not Allowed, Payload: {"name":"Updated Sample Account"}
    [2017-06-14 15:00:13,996] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 202 Accepted[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Wed, 14 Jun 2017 09:30:13 GMT[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Connection: keep-alive[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
    [2017-06-14 15:00:13,998] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"

Is there any way to resolve this issues? or Is it an expected behavior?

[1] [Architecture] [PET] Microsoft Dynamics CRM Connector

Thanks,

Kanapriya Kuleswararajan
Software Engineer | WSO2
Mobile : - 0774894438
Mail : - [hidden email]
LinkedIn : - https://www.linkedin.com/in/kanapriya-kules-94712685/

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues while enable the blocking mode

malakasilva
Hi Kanapriya,

Try debugging [1] and identify the root cause. I guess you tried this with latest EI?

If there are any bugs with blocking calls I think better report those and finalize the first connector version without blocking mode.


On Wed, Jun 14, 2017 at 5:48 PM, Kanapriya Kuleswararajan <[hidden email]> wrote:
Hi All,

I have implemented Microsoft Dynamic CRM connector as discussed in [1]. Almost I have done with the development and all the functionalities works fine with non blocking mode.

When I tried with blocking mode, I got an below errors in the following cases.
  • In Microsoft Dynamic CRM, when we create an entities (update, delete and etc) got an error as below. It seems there is no response body in input stream. But In Microsoft Dynamics CRM only the 204 status code will be return as response if the create (update, delete and etc) operations works fine.
    [2017-06-14 17:10:16,570] DEBUG - header >> "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 17:10:16,570] DEBUG - header >> "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Postman-Token: e1206cf7-65f8-18f2-b911-eb93d0eb7d73[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "User-Agent: Axis2[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Content-Length: 28[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - content >> "{"name":"First opportunity"}"
    [2017-06-14 17:10:21,325] DEBUG - header << "HTTP/1.1 204 No Content[\r][\n]"
    [2017-06-14 17:10:21,326] DEBUG - header << "HTTP/1.1 204 No Content[\r][\n]"

    [2017-06-14 17:10:21,327] DEBUG - header << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 17:10:21,327] DEBUG - header << "Pragma: no-cache[\r][\n]"
    [2017-06-14 17:10:21,327] DEBUG - header << "Expires: -1[\r][\n]"
    [2017-06-14 17:10:21,328] DEBUG - header << "Location: https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities(6ed1ee3d-f650-e711-80f7-c4346bad279c)[\r][\n]"
    [2017-06-14 17:10:21,328] DEBUG - header << "Server: Microsoft-IIS/8.5[\r][\n]"
    [2017-06-14 17:10:21,329] DEBUG - header << "REQ_ID: 0962d55a-5dad-41e6-806d-44b0bfc10723[\r][\n]"
    [2017-06-14 17:10:21,329] DEBUG - header << "Set-Cookie: ReqClientId=c550a1bd-e5cc-4410-b9d6-a49e8140ac99; expires=Tue, 14-Jun-2067 11:40:16 GMT; path=/; secure; HttpOnly[\r][\n]"
    [2017-06-14 17:10:21,330] DEBUG - header << "OData-Version: 4.0[\r][\n]"
    [2017-06-14 17:10:21,330] DEBUG - header << "OData-EntityId: https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities(6ed1ee3d-f650-e711-80f7-c4346bad279c)[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "Access-Control-Allow-Origin: *[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "Access-Control-Expose-Headers: Preference-Applied,OData-EntityId,Location,ETag,OData-Version,Content-Encoding,Transfer-Encoding,Content-Length,Retry-After[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "X-AspNet-Version: 4.0.30319[\r][\n]"
    [2017-06-14 17:10:21,332] DEBUG - header << "X-Powered-By: ASP.NET[\r][\n]"
    [2017-06-14 17:10:21,332] DEBUG - header << "Date: Wed, 14 Jun 2017 11:40:21 GMT[\r][\n]"
    [2017-06-14 17:10:21,333] DEBUG - header << "Set-Cookie: crmf5cookie=!67xA1q+84x6WYJTJGlBgYdD3j/Njco9CdLugpBlBx2wd7VJ6Pap8GRf3itexCLd6HOop31+Nu7rKg38=;secure; path=/[\r][\n]"
    [2017-06-14 17:10:21,333] DEBUG - header << "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
    [2017-06-14 17:10:21,334] DEBUG - header << "[\r][\n]"
    [2017-06-14 17:10:21,340]  INFO - HTTPSender Unable to sendViaPost to url[https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities]
    org.apache.axis2.AxisFault: InputStream cannot be NULL.

        at org.apache.axis2.transport.http.AbstractHTTPSender.processResponse(AbstractHTTPSender.java:232)
        at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:289)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:196)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:293)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:194)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:125)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:104)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:84)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
        at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:69)
        at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:134)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
        at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:210)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:325)
        at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:371)
        at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    [2017-06-14 17:10:21,385]  INFO - LogMediator To: https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities, MessageID: urn:uuid:e0cf3ed5-d073-4e83-9a38-f04d8c8f4263, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 401001, ERROR_MESSAGE = InputStream cannot be NULL., Payload: {"name":"First opportunity"}
    [2017-06-14 17:10:21,387]  WARN - PassThroughTransportUtils Unable to set the HTTP status code from the property HTTP_SC with value:
    [2017-06-14 17:10:21,397] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 202 Accepted[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Wed, 14 Jun 2017 11:40:21 GMT[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Connection: keep-alive[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"


  • If http method is PATCH, then it changed the method as POST. Please find sample wire log for both non blocking and blocking call.

    Non - blocking

    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "PATCH /api/data/v8.2/accounts(91618256718-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude HTTP/1.1[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Prefer: return=representation[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept-Language: en-US,en;q=0.8[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Authorization: Bearer SUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsImtpZCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyJ9.eyJhdWQiOiJodHRwczovL3dzbzIxMjM0LmNybTUuZHluYW1pY3MuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzIxMzliNDZmLWE3ZjQtNGJiMS1iNDU4LWE0OWFmYWNjY2QwNS8iLCJpYXQiOjE0OTc0MzA0MzAsIm5iZiI6MTQ5NzQzMDQzMCwiZXhwIjoxNDk3NDM0MzMwLCJhY3IiOiIxIiwiYWlvIjoiQVNRQTIvOERBQUFBbWV5QitsbXdTUXJCM3luSTBsMVRtY250blNHOUJjQzh6MEZhOUVOYzUrMD0iLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiYzEyZWM1YmUtODM1Ni00ZWRmLWI5YTQtY2Q1NjNlZDA5MTVhIiwiYXBwaWRhY3IiOiIxIiwiZmFtaWx5X25hbWUiOiJwcml5YSIsImdpdmVuX25hbWUiOiJrYW5hIiwiaXBhZGRyIjoiMjAzLjk0Ljk1LjQiLCJuYW1lIjoia2FuYSBwcml5YSIsIm9pZCI6ImZlNmY4ODVlLTk5ZWItNGJjMC1hMmRhLTZkYzU2ZmMxNDYxNiIsInBsYXRmIjoiMTQiLCJwdWlkIjoiMTAwMzAwMDBBMUJDRTk1RiIsInNjcCI6InVzZXJfaW1wZXJzb25hdGlvbiIsInN1YiI6IkJub3c0T2JEcEoyWElGSWJVR1hfZ2VlaWRDRWV5WC13NFQzYU1WNWRBZjAiLCJ0aWQiOiIyMTM5YjQ2Zi1hN2Y0LTRiYjEtYjQ1OC1hNDlhZmFjY2NkMDUiLCJ1bmlxdWVfbmFtZSI6ImthbmFAd3NvMjEyMzQub25taWNyb3NvZnQuY29tIiwidXBuIjoia2FuYUB3c28yMTIzNC5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAiLCJ3aWRzIjpbIjYyZTkwMzk0LTY5ZjUtNDIzNy05MTkwLTAxMjE3NzE0NWUxMCJdfQ.bKyHO4wmp5JFBJb-0OI7OdeHguF37Zd3z2vgfgstn9iF7uP_PtuEO6Rxdtp07mVKZmNqP50GeZm62FZ74VgB8eDnxQP9mQXEe2rBU94oLVzc9r0bQ1YGqF88RQVcXoM-Q4U3J9rtyuZD1iEog1UsS43krG22YHQ5c-1234Cwbc1noz_bSpx798A1p5-KSD3mckVabkpxn__OU1lyygEfY6FiieuHQ0iT8nxmguGdH371XesxLzyJFOfZLDPHierLMUctQj7e2d_ClbA5nV7CjPfx7PitNVM1owxdnbtSRzkIUKn1gr8cI_0SY7hA4NGF3IrVxoIGcQ1tXaJKDPBqZ2FtozQgvfi61g[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Action: urn:updateEntityWithDataReturnedOrSinglePropertyValue[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept-Encoding: gzip, deflate[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Postman-Token: c1e955d9-5307-7369-6fd3-8c4cdefd56da[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Content-Type: application/json[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept: */*[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Content-Length: 33[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Connection: Keep-Alive[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"
    [2017-06-14 14:58:36,478] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "[\r][\n]"
    [2017-06-14 14:58:36,478] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "{"name":"Updated Sample Account"}"
    [2017-06-14 14:58:37,828] DEBUG - wire HTTPS-Sender I/O dispatcher-3 >> "HTTP/1.1 200 OK[\r][\n]"


    Blocking

    [2017-06-14 15:00:13,791] DEBUG - header >> "POST /api/data/v8.2/accounts(91618256718-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude HTTP/1.1[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Content-Type: application/json; charset=UTF-8[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept: */*[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept-Encoding: gzip, deflate[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept-Language: en-US,en;q=0.8[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Action: urn:updateEntityWithDataReturnedOrSinglePropertyValue[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsImtpZCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyJ9.eyJhdWQiOiJodHRwczovL3dzbzIxMjM0LmNybTUuZHluYW1pY3MuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzIxMzliNDZmLWE3ZjQtNGJiMS1iNDU4LWE0OWFmYWNjY2QwNS8iLCJpYXQiOjE0OTc0MzA0MzAsIm5iZiI6MTQ5NzQzMDQzMCwiZXhwIjoxNDk3NDM0MzMwLCJhY3IiOiIxIiwiYWlvIjoiQVNRQTIvOERBQUFBbWV5QitsbXdTUXJCM3luSTBsMVRtY250blNHOUJjQzh6MEZhOUVOYzUrMD0iLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiYzEyZWM1YmUtODM1Ni00ZWRmLWI5YTQtY2Q1NjNlZDA5MTVhIiwiYXBwaWRhY3IiOiIxIiwiZmFtaWx5X25hbWUiOiJwcml5YSIsImdpdmVuX25hbWUiOiJrYW5hIiwiaXBhZGRyIjoiMjAzLjk0Ljk1LjQiLCJuYW1lIjoia2FuYSBwcml5YSIsIm9pZCI6ImZlNmY4ODVlLTk5ZWItNGJjMC1hMmRhLTZkYzU2ZmMxNDYxNiIsInBsYXRmIjoiMTQiLCJwdWlkIjoiMTAwMzAwMDBBMUJDRTk1RiIsInNjcCI6InVzZXJfaW1wZXJzb25hdGlvbiIsInN1YiI6IkJub3c0T2JEcEoyWElGSWJVR1hfZ2VlaWRDRWV5WC13NFQzYU1WNWRBZjAiLCJ0aWQiOiIyMTM5YjQ2Zi1hN2Y0LTRiYjEtYjQ1OC1hNDlhZmFjY2NkMDUiLCJ1bmlxdWVfbmFtZSI6ImthbmFAd3NvMjEyMzQub25taWNyb3NvZnQuY29tIiwidXBuIjoia2FuYUB3c28yMTIzNC5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAiLCJ3aWRzIjpbIjYyZTkwMzk0LTY5ZjUtNDIzNy05MTkwLTAxMjE3NzE0NWUxMCJdfQ.bKyHO4wmp5JFBJb-0OI7OdeHguF37Zd3z2stn9iF7uP_PtuEO6Rxdtp07mVKZmNqP50GeZm62FZ74VgB8eDnxQP9mQXEe2rBU94oLVzc9r0bQ1YGqF88RQVcXoM-Q4U3J9ZD1iEog1UsS43krG22YHQ5c-Cwbc1noz_bSpx798A1p5-KSD3mckVabkpxn__OU1lyygEfY6FiieuHQ0iT8nxmguGdH371XesxLzyJFOfZLDPHierLMUctQj7e2d_ClbA5nV7CjPfx7PitNVM1owxdnbtSRzkIUKn1gr8cI_0SY7hA4NGF3IrVxoIGcQ1tXaJKDPBqZ2FtozQgvfi61g[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Postman-Token: 5adbade0-eb4c-d552-202a-54ff19ee0dfa[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Prefer: return=representation[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "User-Agent: Axis2[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Content-Length: 33[\r][\n]"
    [2017-06-14 15:00:13,797] DEBUG - header >> "[\r][\n]"
    [2017-06-14 15:00:13,797] DEBUG - content >> "{"name":"Updated Sample Account"}"
    [2017-06-14 15:00:13,953] DEBUG - header << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
    [2017-06-14 15:00:13,953] DEBUG - header << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Pragma: no-cache[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Allow: GET,PUT,PATCH,DELETE[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Content-Type: application/json; odata.metadata=minimal[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Expires: -1[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Server: Microsoft-IIS/8.5[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "REQ_ID: 8ba04189-7459-4837-86e7-dce8df6a9ac1[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Set-Cookie: ReqClientId=582ab259-22e7-4130-81af-02700cf96a92; expires=Tue, 14-Jun-2067 09:30:13 GMT; path=/; secure; HttpOnly[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "Access-Control-Allow-Origin: *[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "Access-Control-Expose-Headers: Preference-Applied,OData-EntityId,Location,ETag,OData-Version,Content-Encoding,Transfer-Encoding,Content-Length,Retry-After[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "OData-Version: 4.0[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "X-AspNet-Version: 4.0.30319[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "X-Powered-By: ASP.NET[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Date: Wed, 14 Jun 2017 09:30:13 GMT[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Content-Length: 2149[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Set-Cookie: crmf5cookie=!CJwKVxgHGYXTSBLJGlBgYdD3j/Njchy9e3PTBiqxdXWXGrr92QWgIIwdtlLOkedogQKJlLfUu515Fyg=;secure; path=/[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "  "error":{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "    "code":"","message":"Unmapped Request found, PathTemplate:~/entityset/key, HttpVerb:POST","innererror":{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "      "message":"Unmapped Request found, PathTemplate:~/entityset/key, HttpVerb:POST","type":"Microsoft.Crm.CrmHttpException","stacktrace":"   at Microsoft.Crm.Extensibility.OData.EntityController.HandleUnmappedRequest(ODataPath path)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Objec"
    [2017-06-14 15:00:13,963] DEBUG - content << "t instance, Object[] arguments)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ActionFilterResult.<Exe"
    [2017-06-14 15:00:13,963] DEBUG - content << "cuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"[\r][\n]"
    [2017-06-14 15:00:13,963] DEBUG - content << "    }[\r][\n]"
    [2017-06-14 15:00:13,964] DEBUG - content << "  }[\r][\n]"
    [2017-06-14 15:00:13,964] DEBUG - content << "}"
    [2017-06-14 15:00:13,966]  INFO - HTTPSender Unable to sendViaPost to url[https://wso21234.crm5.dynamics.com/api/data/v8.2/accounts(31618218-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude]
    org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed

        at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:326)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:196)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:293)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:194)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:125)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:104)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:84)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
        at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:69)
        at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:134)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
        at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:210)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:325)
        at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:371)
        at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    [2017-06-14 15:00:13,988]  INFO - LogMediator To: https://wso21234.crm5.dynamics.com/api/data/v8.2/accounts(31618218-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude, MessageID: urn:uuid:73a06200-8cf2-4b5d-a03e-d19ee4ff5bdd, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 401001, ERROR_MESSAGE = Transport error: 405 Error: Method Not Allowed, Payload: {"name":"Updated Sample Account"}
    [2017-06-14 15:00:13,996] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 202 Accepted[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Wed, 14 Jun 2017 09:30:13 GMT[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Connection: keep-alive[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
    [2017-06-14 15:00:13,998] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"

Is there any way to resolve this issues? or Is it an expected behavior?

[1] [Architecture] [PET] Microsoft Dynamics CRM Connector

Thanks,

Kanapriya Kuleswararajan
Software Engineer | WSO2
Mobile : - <a href="tel:077%20489%204438" value="+94774894438" target="_blank">0774894438
Mail : - [hidden email]
LinkedIn : - https://www.linkedin.com/in/kanapriya-kules-94712685/



--

Best Regards,

Malaka Silva
Associate Director / Architect
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
https://wso2.com/signature

Don't make Trees rare, we should keep them with care

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues while enable the blocking mode

Kanapriya
Hi Malaka,

I have debugged the code [1] and [2] and found that there is implementation in [2] for GET, DELETE, POST and PUT but not for PATCH request . If the request is PATCH , then it execute the sendViaPost [3]. so that the PATCH request execute as POST request.




[1] https://github.com/wso2/wso2-synapse/blob/master/modules/core/src/main/java/org/apache/synapse/message/senders/blocking/BlockingMsgSender.java
[2] https://github.com/wso2/wso2-axis2/blob/master/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java
[3] https://github.com/wso2/wso2-axis2/blob/master/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java#L77

Thanks

Kanapriya Kuleswararajan
Software Engineer | WSO2
Mobile : - 0774894438
Mail : - [hidden email]
LinkedIn : - https://www.linkedin.com/in/kanapriya-kules-94712685/

On Thu, Jun 15, 2017 at 6:57 AM, Malaka Silva <[hidden email]> wrote:
Hi Kanapriya,

Try debugging [1] and identify the root cause. I guess you tried this with latest EI?

If there are any bugs with blocking calls I think better report those and finalize the first connector version without blocking mode.


On Wed, Jun 14, 2017 at 5:48 PM, Kanapriya Kuleswararajan <[hidden email]> wrote:
Hi All,

I have implemented Microsoft Dynamic CRM connector as discussed in [1]. Almost I have done with the development and all the functionalities works fine with non blocking mode.

When I tried with blocking mode, I got an below errors in the following cases.
  • In Microsoft Dynamic CRM, when we create an entities (update, delete and etc) got an error as below. It seems there is no response body in input stream. But In Microsoft Dynamics CRM only the 204 status code will be return as response if the create (update, delete and etc) operations works fine.
    [2017-06-14 17:10:16,570] DEBUG - header >> "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 17:10:16,570] DEBUG - header >> "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Postman-Token: e1206cf7-65f8-18f2-b911-eb93d0eb7d73[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "User-Agent: Axis2[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Content-Length: 28[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - content >> "{"name":"First opportunity"}"
    [2017-06-14 17:10:21,325] DEBUG - header << "HTTP/1.1 204 No Content[\r][\n]"
    [2017-06-14 17:10:21,326] DEBUG - header << "HTTP/1.1 204 No Content[\r][\n]"

    [2017-06-14 17:10:21,327] DEBUG - header << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 17:10:21,327] DEBUG - header << "Pragma: no-cache[\r][\n]"
    [2017-06-14 17:10:21,327] DEBUG - header << "Expires: -1[\r][\n]"
    [2017-06-14 17:10:21,328] DEBUG - header << "Location: https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities(6ed1ee3d-f650-e711-80f7-c4346bad279c)[\r][\n]"
    [2017-06-14 17:10:21,328] DEBUG - header << "Server: Microsoft-IIS/8.5[\r][\n]"
    [2017-06-14 17:10:21,329] DEBUG - header << "REQ_ID: 0962d55a-5dad-41e6-806d-44b0bfc10723[\r][\n]"
    [2017-06-14 17:10:21,329] DEBUG - header << "Set-Cookie: ReqClientId=c550a1bd-e5cc-4410-b9d6-a49e8140ac99; expires=Tue, 14-Jun-2067 11:40:16 GMT; path=/; secure; HttpOnly[\r][\n]"
    [2017-06-14 17:10:21,330] DEBUG - header << "OData-Version: 4.0[\r][\n]"
    [2017-06-14 17:10:21,330] DEBUG - header << "OData-EntityId: https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities(6ed1ee3d-f650-e711-80f7-c4346bad279c)[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "Access-Control-Allow-Origin: *[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "Access-Control-Expose-Headers: Preference-Applied,OData-EntityId,Location,ETag,OData-Version,Content-Encoding,Transfer-Encoding,Content-Length,Retry-After[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "X-AspNet-Version: 4.0.30319[\r][\n]"
    [2017-06-14 17:10:21,332] DEBUG - header << "X-Powered-By: ASP.NET[\r][\n]"
    [2017-06-14 17:10:21,332] DEBUG - header << "Date: Wed, 14 Jun 2017 11:40:21 GMT[\r][\n]"
    [2017-06-14 17:10:21,333] DEBUG - header << "Set-Cookie: crmf5cookie=!67xA1q+84x6WYJTJGlBgYdD3j/Njco9CdLugpBlBx2wd7VJ6Pap8GRf3itexCLd6HOop31+Nu7rKg38=;secure; path=/[\r][\n]"
    [2017-06-14 17:10:21,333] DEBUG - header << "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
    [2017-06-14 17:10:21,334] DEBUG - header << "[\r][\n]"
    [2017-06-14 17:10:21,340]  INFO - HTTPSender Unable to sendViaPost to url[https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities]
    org.apache.axis2.AxisFault: InputStream cannot be NULL.

        at org.apache.axis2.transport.http.AbstractHTTPSender.processResponse(AbstractHTTPSender.java:232)
        at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:289)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:196)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:293)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:194)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:125)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:104)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:84)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
        at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:69)
        at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:134)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
        at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:210)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:325)
        at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:371)
        at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    [2017-06-14 17:10:21,385]  INFO - LogMediator To: https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities, MessageID: urn:uuid:e0cf3ed5-d073-4e83-9a38-f04d8c8f4263, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 401001, ERROR_MESSAGE = InputStream cannot be NULL., Payload: {"name":"First opportunity"}
    [2017-06-14 17:10:21,387]  WARN - PassThroughTransportUtils Unable to set the HTTP status code from the property HTTP_SC with value:
    [2017-06-14 17:10:21,397] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 202 Accepted[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Wed, 14 Jun 2017 11:40:21 GMT[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Connection: keep-alive[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"


  • If http method is PATCH, then it changed the method as POST. Please find sample wire log for both non blocking and blocking call.

    Non - blocking

    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "PATCH /api/data/v8.2/accounts(91618256718-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude HTTP/1.1[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Prefer: return=representation[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept-Language: en-US,en;q=0.8[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Authorization: Bearer SUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsImtpZCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyJ9.eyJhdWQiOiJodHRwczovL3dzbzIxMjM0LmNybTUuZHluYW1pY3MuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzIxMzliNDZmLWE3ZjQtNGJiMS1iNDU4LWE0OWFmYWNjY2QwNS8iLCJpYXQiOjE0OTc0MzA0MzAsIm5iZiI6MTQ5NzQzMDQzMCwiZXhwIjoxNDk3NDM0MzMwLCJhY3IiOiIxIiwiYWlvIjoiQVNRQTIvOERBQUFBbWV5QitsbXdTUXJCM3luSTBsMVRtY250blNHOUJjQzh6MEZhOUVOYzUrMD0iLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiYzEyZWM1YmUtODM1Ni00ZWRmLWI5YTQtY2Q1NjNlZDA5MTVhIiwiYXBwaWRhY3IiOiIxIiwiZmFtaWx5X25hbWUiOiJwcml5YSIsImdpdmVuX25hbWUiOiJrYW5hIiwiaXBhZGRyIjoiMjAzLjk0Ljk1LjQiLCJuYW1lIjoia2FuYSBwcml5YSIsIm9pZCI6ImZlNmY4ODVlLTk5ZWItNGJjMC1hMmRhLTZkYzU2ZmMxNDYxNiIsInBsYXRmIjoiMTQiLCJwdWlkIjoiMTAwMzAwMDBBMUJDRTk1RiIsInNjcCI6InVzZXJfaW1wZXJzb25hdGlvbiIsInN1YiI6IkJub3c0T2JEcEoyWElGSWJVR1hfZ2VlaWRDRWV5WC13NFQzYU1WNWRBZjAiLCJ0aWQiOiIyMTM5YjQ2Zi1hN2Y0LTRiYjEtYjQ1OC1hNDlhZmFjY2NkMDUiLCJ1bmlxdWVfbmFtZSI6ImthbmFAd3NvMjEyMzQub25taWNyb3NvZnQuY29tIiwidXBuIjoia2FuYUB3c28yMTIzNC5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAiLCJ3aWRzIjpbIjYyZTkwMzk0LTY5ZjUtNDIzNy05MTkwLTAxMjE3NzE0NWUxMCJdfQ.bKyHO4wmp5JFBJb-0OI7OdeHguF37Zd3z2vgfgstn9iF7uP_PtuEO6Rxdtp07mVKZmNqP50GeZm62FZ74VgB8eDnxQP9mQXEe2rBU94oLVzc9r0bQ1YGqF88RQVcXoM-Q4U3J9rtyuZD1iEog1UsS43krG22YHQ5c-1234Cwbc1noz_bSpx798A1p5-KSD3mckVabkpxn__OU1lyygEfY6FiieuHQ0iT8nxmguGdH371XesxLzyJFOfZLDPHierLMUctQj7e2d_ClbA5nV7CjPfx7PitNVM1owxdnbtSRzkIUKn1gr8cI_0SY7hA4NGF3IrVxoIGcQ1tXaJKDPBqZ2FtozQgvfi61g[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Action: urn:updateEntityWithDataReturnedOrSinglePropertyValue[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept-Encoding: gzip, deflate[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Postman-Token: c1e955d9-5307-7369-6fd3-8c4cdefd56da[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Content-Type: application/json[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept: */*[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Content-Length: 33[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Connection: Keep-Alive[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"
    [2017-06-14 14:58:36,478] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "[\r][\n]"
    [2017-06-14 14:58:36,478] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "{"name":"Updated Sample Account"}"
    [2017-06-14 14:58:37,828] DEBUG - wire HTTPS-Sender I/O dispatcher-3 >> "HTTP/1.1 200 OK[\r][\n]"


    Blocking

    [2017-06-14 15:00:13,791] DEBUG - header >> "POST /api/data/v8.2/accounts(91618256718-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude HTTP/1.1[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Content-Type: application/json; charset=UTF-8[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept: */*[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept-Encoding: gzip, deflate[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept-Language: en-US,en;q=0.8[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Action: urn:updateEntityWithDataReturnedOrSinglePropertyValue[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsImtpZCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyJ9.eyJhdWQiOiJodHRwczovL3dzbzIxMjM0LmNybTUuZHluYW1pY3MuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzIxMzliNDZmLWE3ZjQtNGJiMS1iNDU4LWE0OWFmYWNjY2QwNS8iLCJpYXQiOjE0OTc0MzA0MzAsIm5iZiI6MTQ5NzQzMDQzMCwiZXhwIjoxNDk3NDM0MzMwLCJhY3IiOiIxIiwiYWlvIjoiQVNRQTIvOERBQUFBbWV5QitsbXdTUXJCM3luSTBsMVRtY250blNHOUJjQzh6MEZhOUVOYzUrMD0iLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiYzEyZWM1YmUtODM1Ni00ZWRmLWI5YTQtY2Q1NjNlZDA5MTVhIiwiYXBwaWRhY3IiOiIxIiwiZmFtaWx5X25hbWUiOiJwcml5YSIsImdpdmVuX25hbWUiOiJrYW5hIiwiaXBhZGRyIjoiMjAzLjk0Ljk1LjQiLCJuYW1lIjoia2FuYSBwcml5YSIsIm9pZCI6ImZlNmY4ODVlLTk5ZWItNGJjMC1hMmRhLTZkYzU2ZmMxNDYxNiIsInBsYXRmIjoiMTQiLCJwdWlkIjoiMTAwMzAwMDBBMUJDRTk1RiIsInNjcCI6InVzZXJfaW1wZXJzb25hdGlvbiIsInN1YiI6IkJub3c0T2JEcEoyWElGSWJVR1hfZ2VlaWRDRWV5WC13NFQzYU1WNWRBZjAiLCJ0aWQiOiIyMTM5YjQ2Zi1hN2Y0LTRiYjEtYjQ1OC1hNDlhZmFjY2NkMDUiLCJ1bmlxdWVfbmFtZSI6ImthbmFAd3NvMjEyMzQub25taWNyb3NvZnQuY29tIiwidXBuIjoia2FuYUB3c28yMTIzNC5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAiLCJ3aWRzIjpbIjYyZTkwMzk0LTY5ZjUtNDIzNy05MTkwLTAxMjE3NzE0NWUxMCJdfQ.bKyHO4wmp5JFBJb-0OI7OdeHguF37Zd3z2stn9iF7uP_PtuEO6Rxdtp07mVKZmNqP50GeZm62FZ74VgB8eDnxQP9mQXEe2rBU94oLVzc9r0bQ1YGqF88RQVcXoM-Q4U3J9ZD1iEog1UsS43krG22YHQ5c-Cwbc1noz_bSpx798A1p5-KSD3mckVabkpxn__OU1lyygEfY6FiieuHQ0iT8nxmguGdH371XesxLzyJFOfZLDPHierLMUctQj7e2d_ClbA5nV7CjPfx7PitNVM1owxdnbtSRzkIUKn1gr8cI_0SY7hA4NGF3IrVxoIGcQ1tXaJKDPBqZ2FtozQgvfi61g[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Postman-Token: 5adbade0-eb4c-d552-202a-54ff19ee0dfa[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Prefer: return=representation[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "User-Agent: Axis2[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Content-Length: 33[\r][\n]"
    [2017-06-14 15:00:13,797] DEBUG - header >> "[\r][\n]"
    [2017-06-14 15:00:13,797] DEBUG - content >> "{"name":"Updated Sample Account"}"
    [2017-06-14 15:00:13,953] DEBUG - header << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
    [2017-06-14 15:00:13,953] DEBUG - header << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Pragma: no-cache[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Allow: GET,PUT,PATCH,DELETE[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Content-Type: application/json; odata.metadata=minimal[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Expires: -1[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Server: Microsoft-IIS/8.5[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "REQ_ID: 8ba04189-7459-4837-86e7-dce8df6a9ac1[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Set-Cookie: ReqClientId=582ab259-22e7-4130-81af-02700cf96a92; expires=Tue, 14-Jun-2067 09:30:13 GMT; path=/; secure; HttpOnly[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "Access-Control-Allow-Origin: *[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "Access-Control-Expose-Headers: Preference-Applied,OData-EntityId,Location,ETag,OData-Version,Content-Encoding,Transfer-Encoding,Content-Length,Retry-After[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "OData-Version: 4.0[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "X-AspNet-Version: 4.0.30319[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "X-Powered-By: ASP.NET[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Date: Wed, 14 Jun 2017 09:30:13 GMT[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Content-Length: 2149[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Set-Cookie: crmf5cookie=!CJwKVxgHGYXTSBLJGlBgYdD3j/Njchy9e3PTBiqxdXWXGrr92QWgIIwdtlLOkedogQKJlLfUu515Fyg=;secure; path=/[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "  "error":{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "    "code":"","message":"Unmapped Request found, PathTemplate:~/entityset/key, HttpVerb:POST","innererror":{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "      "message":"Unmapped Request found, PathTemplate:~/entityset/key, HttpVerb:POST","type":"Microsoft.Crm.CrmHttpException","stacktrace":"   at Microsoft.Crm.Extensibility.OData.EntityController.HandleUnmappedRequest(ODataPath path)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Objec"
    [2017-06-14 15:00:13,963] DEBUG - content << "t instance, Object[] arguments)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ActionFilterResult.<Exe"
    [2017-06-14 15:00:13,963] DEBUG - content << "cuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"[\r][\n]"
    [2017-06-14 15:00:13,963] DEBUG - content << "    }[\r][\n]"
    [2017-06-14 15:00:13,964] DEBUG - content << "  }[\r][\n]"
    [2017-06-14 15:00:13,964] DEBUG - content << "}"
    [2017-06-14 15:00:13,966]  INFO - HTTPSender Unable to sendViaPost to url[https://wso21234.crm5.dynamics.com/api/data/v8.2/accounts(31618218-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude]
    org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed

        at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:326)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:196)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:293)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:194)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:125)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:104)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:84)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
        at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:69)
        at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:134)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
        at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:210)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:325)
        at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:371)
        at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    [2017-06-14 15:00:13,988]  INFO - LogMediator To: https://wso21234.crm5.dynamics.com/api/data/v8.2/accounts(31618218-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude, MessageID: urn:uuid:73a06200-8cf2-4b5d-a03e-d19ee4ff5bdd, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 401001, ERROR_MESSAGE = Transport error: 405 Error: Method Not Allowed, Payload: {"name":"Updated Sample Account"}
    [2017-06-14 15:00:13,996] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 202 Accepted[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Wed, 14 Jun 2017 09:30:13 GMT[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Connection: keep-alive[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
    [2017-06-14 15:00:13,998] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"

Is there any way to resolve this issues? or Is it an expected behavior?

[1] [Architecture] [PET] Microsoft Dynamics CRM Connector

Thanks,

Kanapriya Kuleswararajan
Software Engineer | WSO2
Mobile : - <a href="tel:077%20489%204438" value="+94774894438" target="_blank">0774894438
Mail : - [hidden email]
LinkedIn : - https://www.linkedin.com/in/kanapriya-kules-94712685/



--

Best Regards,

Malaka Silva
Associate Director / Architect
M: <a href="tel:+94%2077%20721%209791" value="+94777219791" target="_blank">+94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
https://wso2.com/signature

Don't make Trees rare, we should keep them with care


_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues while enable the blocking mode

malakasilva
Kanapriya shall we raise a jira for EI / ESB and do the initial version of the connector only in non-blocking mode?

On Fri, Jun 16, 2017 at 5:28 PM, Kanapriya Kuleswararajan <[hidden email]> wrote:
Hi Malaka,

I have debugged the code [1] and [2] and found that there is implementation in [2] for GET, DELETE, POST and PUT but not for PATCH request . If the request is PATCH , then it execute the sendViaPost [3]. so that the PATCH request execute as POST request.




[1] https://github.com/wso2/wso2-synapse/blob/master/modules/core/src/main/java/org/apache/synapse/message/senders/blocking/BlockingMsgSender.java
[2] https://github.com/wso2/wso2-axis2/blob/master/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java
[3] https://github.com/wso2/wso2-axis2/blob/master/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java#L77

Thanks

Kanapriya Kuleswararajan
Software Engineer | WSO2
Mobile : - <a href="tel:077%20489%204438" value="+94774894438" target="_blank">0774894438
Mail : - [hidden email]
LinkedIn : - https://www.linkedin.com/in/kanapriya-kules-94712685/

On Thu, Jun 15, 2017 at 6:57 AM, Malaka Silva <[hidden email]> wrote:
Hi Kanapriya,

Try debugging [1] and identify the root cause. I guess you tried this with latest EI?

If there are any bugs with blocking calls I think better report those and finalize the first connector version without blocking mode.


On Wed, Jun 14, 2017 at 5:48 PM, Kanapriya Kuleswararajan <[hidden email]> wrote:
Hi All,

I have implemented Microsoft Dynamic CRM connector as discussed in [1]. Almost I have done with the development and all the functionalities works fine with non blocking mode.

When I tried with blocking mode, I got an below errors in the following cases.
  • In Microsoft Dynamic CRM, when we create an entities (update, delete and etc) got an error as below. It seems there is no response body in input stream. But In Microsoft Dynamics CRM only the 204 status code will be return as response if the create (update, delete and etc) operations works fine.
    [2017-06-14 17:10:16,570] DEBUG - header >> "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 17:10:16,570] DEBUG - header >> "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Postman-Token: e1206cf7-65f8-18f2-b911-eb93d0eb7d73[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "User-Agent: Axis2[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Content-Length: 28[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - content >> "{"name":"First opportunity"}"
    [2017-06-14 17:10:21,325] DEBUG - header << "HTTP/1.1 204 No Content[\r][\n]"
    [2017-06-14 17:10:21,326] DEBUG - header << "HTTP/1.1 204 No Content[\r][\n]"

    [2017-06-14 17:10:21,327] DEBUG - header << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 17:10:21,327] DEBUG - header << "Pragma: no-cache[\r][\n]"
    [2017-06-14 17:10:21,327] DEBUG - header << "Expires: -1[\r][\n]"
    [2017-06-14 17:10:21,328] DEBUG - header << "Location: https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities(6ed1ee3d-f650-e711-80f7-c4346bad279c)[\r][\n]"
    [2017-06-14 17:10:21,328] DEBUG - header << "Server: Microsoft-IIS/8.5[\r][\n]"
    [2017-06-14 17:10:21,329] DEBUG - header << "REQ_ID: 0962d55a-5dad-41e6-806d-44b0bfc10723[\r][\n]"
    [2017-06-14 17:10:21,329] DEBUG - header << "Set-Cookie: ReqClientId=c550a1bd-e5cc-4410-b9d6-a49e8140ac99; expires=Tue, 14-Jun-2067 11:40:16 GMT; path=/; secure; HttpOnly[\r][\n]"
    [2017-06-14 17:10:21,330] DEBUG - header << "OData-Version: 4.0[\r][\n]"
    [2017-06-14 17:10:21,330] DEBUG - header << "OData-EntityId: https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities(6ed1ee3d-f650-e711-80f7-c4346bad279c)[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "Access-Control-Allow-Origin: *[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "Access-Control-Expose-Headers: Preference-Applied,OData-EntityId,Location,ETag,OData-Version,Content-Encoding,Transfer-Encoding,Content-Length,Retry-After[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "X-AspNet-Version: 4.0.30319[\r][\n]"
    [2017-06-14 17:10:21,332] DEBUG - header << "X-Powered-By: ASP.NET[\r][\n]"
    [2017-06-14 17:10:21,332] DEBUG - header << "Date: Wed, 14 Jun 2017 11:40:21 GMT[\r][\n]"
    [2017-06-14 17:10:21,333] DEBUG - header << "Set-Cookie: crmf5cookie=!67xA1q+84x6WYJTJGlBgYdD3j/Njco9CdLugpBlBx2wd7VJ6Pap8GRf3itexCLd6HOop31+Nu7rKg38=;secure; path=/[\r][\n]"
    [2017-06-14 17:10:21,333] DEBUG - header << "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
    [2017-06-14 17:10:21,334] DEBUG - header << "[\r][\n]"
    [2017-06-14 17:10:21,340]  INFO - HTTPSender Unable to sendViaPost to url[https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities]
    org.apache.axis2.AxisFault: InputStream cannot be NULL.

        at org.apache.axis2.transport.http.AbstractHTTPSender.processResponse(AbstractHTTPSender.java:232)
        at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:289)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:196)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:293)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:194)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:125)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:104)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:84)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
        at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:69)
        at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:134)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
        at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:210)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:325)
        at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:371)
        at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    [2017-06-14 17:10:21,385]  INFO - LogMediator To: https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities, MessageID: urn:uuid:e0cf3ed5-d073-4e83-9a38-f04d8c8f4263, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 401001, ERROR_MESSAGE = InputStream cannot be NULL., Payload: {"name":"First opportunity"}
    [2017-06-14 17:10:21,387]  WARN - PassThroughTransportUtils Unable to set the HTTP status code from the property HTTP_SC with value:
    [2017-06-14 17:10:21,397] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 202 Accepted[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Wed, 14 Jun 2017 11:40:21 GMT[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Connection: keep-alive[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"


  • If http method is PATCH, then it changed the method as POST. Please find sample wire log for both non blocking and blocking call.

    Non - blocking

    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "PATCH /api/data/v8.2/accounts(91618256718-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude HTTP/1.1[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Prefer: return=representation[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept-Language: en-US,en;q=0.8[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Authorization: Bearer SUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsImtpZCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyJ9.eyJhdWQiOiJodHRwczovL3dzbzIxMjM0LmNybTUuZHluYW1pY3MuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzIxMzliNDZmLWE3ZjQtNGJiMS1iNDU4LWE0OWFmYWNjY2QwNS8iLCJpYXQiOjE0OTc0MzA0MzAsIm5iZiI6MTQ5NzQzMDQzMCwiZXhwIjoxNDk3NDM0MzMwLCJhY3IiOiIxIiwiYWlvIjoiQVNRQTIvOERBQUFBbWV5QitsbXdTUXJCM3luSTBsMVRtY250blNHOUJjQzh6MEZhOUVOYzUrMD0iLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiYzEyZWM1YmUtODM1Ni00ZWRmLWI5YTQtY2Q1NjNlZDA5MTVhIiwiYXBwaWRhY3IiOiIxIiwiZmFtaWx5X25hbWUiOiJwcml5YSIsImdpdmVuX25hbWUiOiJrYW5hIiwiaXBhZGRyIjoiMjAzLjk0Ljk1LjQiLCJuYW1lIjoia2FuYSBwcml5YSIsIm9pZCI6ImZlNmY4ODVlLTk5ZWItNGJjMC1hMmRhLTZkYzU2ZmMxNDYxNiIsInBsYXRmIjoiMTQiLCJwdWlkIjoiMTAwMzAwMDBBMUJDRTk1RiIsInNjcCI6InVzZXJfaW1wZXJzb25hdGlvbiIsInN1YiI6IkJub3c0T2JEcEoyWElGSWJVR1hfZ2VlaWRDRWV5WC13NFQzYU1WNWRBZjAiLCJ0aWQiOiIyMTM5YjQ2Zi1hN2Y0LTRiYjEtYjQ1OC1hNDlhZmFjY2NkMDUiLCJ1bmlxdWVfbmFtZSI6ImthbmFAd3NvMjEyMzQub25taWNyb3NvZnQuY29tIiwidXBuIjoia2FuYUB3c28yMTIzNC5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAiLCJ3aWRzIjpbIjYyZTkwMzk0LTY5ZjUtNDIzNy05MTkwLTAxMjE3NzE0NWUxMCJdfQ.bKyHO4wmp5JFBJb-0OI7OdeHguF37Zd3z2vgfgstn9iF7uP_PtuEO6Rxdtp07mVKZmNqP50GeZm62FZ74VgB8eDnxQP9mQXEe2rBU94oLVzc9r0bQ1YGqF88RQVcXoM-Q4U3J9rtyuZD1iEog1UsS43krG22YHQ5c-1234Cwbc1noz_bSpx798A1p5-KSD3mckVabkpxn__OU1lyygEfY6FiieuHQ0iT8nxmguGdH371XesxLzyJFOfZLDPHierLMUctQj7e2d_ClbA5nV7CjPfx7PitNVM1owxdnbtSRzkIUKn1gr8cI_0SY7hA4NGF3IrVxoIGcQ1tXaJKDPBqZ2FtozQgvfi61g[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Action: urn:updateEntityWithDataReturnedOrSinglePropertyValue[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept-Encoding: gzip, deflate[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Postman-Token: c1e955d9-5307-7369-6fd3-8c4cdefd56da[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Content-Type: application/json[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept: */*[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Content-Length: 33[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Connection: Keep-Alive[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"
    [2017-06-14 14:58:36,478] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "[\r][\n]"
    [2017-06-14 14:58:36,478] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "{"name":"Updated Sample Account"}"
    [2017-06-14 14:58:37,828] DEBUG - wire HTTPS-Sender I/O dispatcher-3 >> "HTTP/1.1 200 OK[\r][\n]"


    Blocking

    [2017-06-14 15:00:13,791] DEBUG - header >> "POST /api/data/v8.2/accounts(91618256718-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude HTTP/1.1[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Content-Type: application/json; charset=UTF-8[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept: */*[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept-Encoding: gzip, deflate[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept-Language: en-US,en;q=0.8[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Action: urn:updateEntityWithDataReturnedOrSinglePropertyValue[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsImtpZCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyJ9.eyJhdWQiOiJodHRwczovL3dzbzIxMjM0LmNybTUuZHluYW1pY3MuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzIxMzliNDZmLWE3ZjQtNGJiMS1iNDU4LWE0OWFmYWNjY2QwNS8iLCJpYXQiOjE0OTc0MzA0MzAsIm5iZiI6MTQ5NzQzMDQzMCwiZXhwIjoxNDk3NDM0MzMwLCJhY3IiOiIxIiwiYWlvIjoiQVNRQTIvOERBQUFBbWV5QitsbXdTUXJCM3luSTBsMVRtY250blNHOUJjQzh6MEZhOUVOYzUrMD0iLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiYzEyZWM1YmUtODM1Ni00ZWRmLWI5YTQtY2Q1NjNlZDA5MTVhIiwiYXBwaWRhY3IiOiIxIiwiZmFtaWx5X25hbWUiOiJwcml5YSIsImdpdmVuX25hbWUiOiJrYW5hIiwiaXBhZGRyIjoiMjAzLjk0Ljk1LjQiLCJuYW1lIjoia2FuYSBwcml5YSIsIm9pZCI6ImZlNmY4ODVlLTk5ZWItNGJjMC1hMmRhLTZkYzU2ZmMxNDYxNiIsInBsYXRmIjoiMTQiLCJwdWlkIjoiMTAwMzAwMDBBMUJDRTk1RiIsInNjcCI6InVzZXJfaW1wZXJzb25hdGlvbiIsInN1YiI6IkJub3c0T2JEcEoyWElGSWJVR1hfZ2VlaWRDRWV5WC13NFQzYU1WNWRBZjAiLCJ0aWQiOiIyMTM5YjQ2Zi1hN2Y0LTRiYjEtYjQ1OC1hNDlhZmFjY2NkMDUiLCJ1bmlxdWVfbmFtZSI6ImthbmFAd3NvMjEyMzQub25taWNyb3NvZnQuY29tIiwidXBuIjoia2FuYUB3c28yMTIzNC5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAiLCJ3aWRzIjpbIjYyZTkwMzk0LTY5ZjUtNDIzNy05MTkwLTAxMjE3NzE0NWUxMCJdfQ.bKyHO4wmp5JFBJb-0OI7OdeHguF37Zd3z2stn9iF7uP_PtuEO6Rxdtp07mVKZmNqP50GeZm62FZ74VgB8eDnxQP9mQXEe2rBU94oLVzc9r0bQ1YGqF88RQVcXoM-Q4U3J9ZD1iEog1UsS43krG22YHQ5c-Cwbc1noz_bSpx798A1p5-KSD3mckVabkpxn__OU1lyygEfY6FiieuHQ0iT8nxmguGdH371XesxLzyJFOfZLDPHierLMUctQj7e2d_ClbA5nV7CjPfx7PitNVM1owxdnbtSRzkIUKn1gr8cI_0SY7hA4NGF3IrVxoIGcQ1tXaJKDPBqZ2FtozQgvfi61g[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Postman-Token: 5adbade0-eb4c-d552-202a-54ff19ee0dfa[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Prefer: return=representation[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "User-Agent: Axis2[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Content-Length: 33[\r][\n]"
    [2017-06-14 15:00:13,797] DEBUG - header >> "[\r][\n]"
    [2017-06-14 15:00:13,797] DEBUG - content >> "{"name":"Updated Sample Account"}"
    [2017-06-14 15:00:13,953] DEBUG - header << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
    [2017-06-14 15:00:13,953] DEBUG - header << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Pragma: no-cache[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Allow: GET,PUT,PATCH,DELETE[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Content-Type: application/json; odata.metadata=minimal[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Expires: -1[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Server: Microsoft-IIS/8.5[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "REQ_ID: 8ba04189-7459-4837-86e7-dce8df6a9ac1[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Set-Cookie: ReqClientId=582ab259-22e7-4130-81af-02700cf96a92; expires=Tue, 14-Jun-2067 09:30:13 GMT; path=/; secure; HttpOnly[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "Access-Control-Allow-Origin: *[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "Access-Control-Expose-Headers: Preference-Applied,OData-EntityId,Location,ETag,OData-Version,Content-Encoding,Transfer-Encoding,Content-Length,Retry-After[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "OData-Version: 4.0[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "X-AspNet-Version: 4.0.30319[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "X-Powered-By: ASP.NET[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Date: Wed, 14 Jun 2017 09:30:13 GMT[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Content-Length: 2149[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Set-Cookie: crmf5cookie=!CJwKVxgHGYXTSBLJGlBgYdD3j/Njchy9e3PTBiqxdXWXGrr92QWgIIwdtlLOkedogQKJlLfUu515Fyg=;secure; path=/[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "  "error":{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "    "code":"","message":"Unmapped Request found, PathTemplate:~/entityset/key, HttpVerb:POST","innererror":{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "      "message":"Unmapped Request found, PathTemplate:~/entityset/key, HttpVerb:POST","type":"Microsoft.Crm.CrmHttpException","stacktrace":"   at Microsoft.Crm.Extensibility.OData.EntityController.HandleUnmappedRequest(ODataPath path)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Objec"
    [2017-06-14 15:00:13,963] DEBUG - content << "t instance, Object[] arguments)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ActionFilterResult.<Exe"
    [2017-06-14 15:00:13,963] DEBUG - content << "cuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"[\r][\n]"
    [2017-06-14 15:00:13,963] DEBUG - content << "    }[\r][\n]"
    [2017-06-14 15:00:13,964] DEBUG - content << "  }[\r][\n]"
    [2017-06-14 15:00:13,964] DEBUG - content << "}"
    [2017-06-14 15:00:13,966]  INFO - HTTPSender Unable to sendViaPost to url[https://wso21234.crm5.dynamics.com/api/data/v8.2/accounts(31618218-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude]
    org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed

        at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:326)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:196)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:293)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:194)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:125)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:104)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:84)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
        at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:69)
        at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:134)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
        at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:210)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:325)
        at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:371)
        at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    [2017-06-14 15:00:13,988]  INFO - LogMediator To: https://wso21234.crm5.dynamics.com/api/data/v8.2/accounts(31618218-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude, MessageID: urn:uuid:73a06200-8cf2-4b5d-a03e-d19ee4ff5bdd, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 401001, ERROR_MESSAGE = Transport error: 405 Error: Method Not Allowed, Payload: {"name":"Updated Sample Account"}
    [2017-06-14 15:00:13,996] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 202 Accepted[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Wed, 14 Jun 2017 09:30:13 GMT[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Connection: keep-alive[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
    [2017-06-14 15:00:13,998] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"

Is there any way to resolve this issues? or Is it an expected behavior?

[1] [Architecture] [PET] Microsoft Dynamics CRM Connector

Thanks,

Kanapriya Kuleswararajan
Software Engineer | WSO2
Mobile : - <a href="tel:077%20489%204438" value="+94774894438" target="_blank">0774894438
Mail : - [hidden email]
LinkedIn : - https://www.linkedin.com/in/kanapriya-kules-94712685/



--

Best Regards,

Malaka Silva
Associate Director / Architect
M: <a href="tel:+94%2077%20721%209791" value="+94777219791" target="_blank">+94 777 219 791
Tel : 94 11 214 5345
Fax :<a href="tel:011%202%20145300" value="+94112145300" target="_blank">94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
https://wso2.com/signature

Don't make Trees rare, we should keep them with care




--

Best Regards,

Malaka Silva
Associate Director / Architect
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
https://wso2.com/signature

Don't make Trees rare, we should keep them with care

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues while enable the blocking mode

Kanapriya
Hi,

Yes created JIRAs [1], [2] to address these issues  and release the initial version of connector [3] with non-blocking mode.

[1] https://wso2.org/jira/browse/ESBJAVA-5126
[2] https://wso2.org/jira/browse/ESBJAVA-5127
[3] https://store.wso2.com/store/assets/esbconnector/details/4e396cb9-eb30-4cd4-9475-52ad2c214e42

Thanks



Kanapriya Kuleswararajan
Software Engineer | WSO2
Mobile : - 0774894438
Mail : - [hidden email]
LinkedIn : - https://www.linkedin.com/in/kanapriya-kules-94712685/

On Sun, Jun 18, 2017 at 6:08 AM, Malaka Silva <[hidden email]> wrote:
Kanapriya shall we raise a jira for EI / ESB and do the initial version of the connector only in non-blocking mode?

On Fri, Jun 16, 2017 at 5:28 PM, Kanapriya Kuleswararajan <[hidden email]> wrote:
Hi Malaka,

I have debugged the code [1] and [2] and found that there is implementation in [2] for GET, DELETE, POST and PUT but not for PATCH request . If the request is PATCH , then it execute the sendViaPost [3]. so that the PATCH request execute as POST request.




[1] https://github.com/wso2/wso2-synapse/blob/master/modules/core/src/main/java/org/apache/synapse/message/senders/blocking/BlockingMsgSender.java
[2] https://github.com/wso2/wso2-axis2/blob/master/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java
[3] https://github.com/wso2/wso2-axis2/blob/master/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java#L77

Thanks

Kanapriya Kuleswararajan
Software Engineer | WSO2
Mobile : - <a href="tel:077%20489%204438" value="+94774894438" target="_blank">0774894438
Mail : - [hidden email]
LinkedIn : - https://www.linkedin.com/in/kanapriya-kules-94712685/

On Thu, Jun 15, 2017 at 6:57 AM, Malaka Silva <[hidden email]> wrote:
Hi Kanapriya,

Try debugging [1] and identify the root cause. I guess you tried this with latest EI?

If there are any bugs with blocking calls I think better report those and finalize the first connector version without blocking mode.


On Wed, Jun 14, 2017 at 5:48 PM, Kanapriya Kuleswararajan <[hidden email]> wrote:
Hi All,

I have implemented Microsoft Dynamic CRM connector as discussed in [1]. Almost I have done with the development and all the functionalities works fine with non blocking mode.

When I tried with blocking mode, I got an below errors in the following cases.
  • In Microsoft Dynamic CRM, when we create an entities (update, delete and etc) got an error as below. It seems there is no response body in input stream. But In Microsoft Dynamics CRM only the 204 status code will be return as response if the create (update, delete and etc) operations works fine.
    [2017-06-14 17:10:16,570] DEBUG - header >> "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 17:10:16,570] DEBUG - header >> "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Postman-Token: e1206cf7-65f8-18f2-b911-eb93d0eb7d73[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "User-Agent: Axis2[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "Content-Length: 28[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - header >> "[\r][\n]"
    [2017-06-14 17:10:16,571] DEBUG - content >> "{"name":"First opportunity"}"
    [2017-06-14 17:10:21,325] DEBUG - header << "HTTP/1.1 204 No Content[\r][\n]"
    [2017-06-14 17:10:21,326] DEBUG - header << "HTTP/1.1 204 No Content[\r][\n]"

    [2017-06-14 17:10:21,327] DEBUG - header << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 17:10:21,327] DEBUG - header << "Pragma: no-cache[\r][\n]"
    [2017-06-14 17:10:21,327] DEBUG - header << "Expires: -1[\r][\n]"
    [2017-06-14 17:10:21,328] DEBUG - header << "Location: https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities(6ed1ee3d-f650-e711-80f7-c4346bad279c)[\r][\n]"
    [2017-06-14 17:10:21,328] DEBUG - header << "Server: Microsoft-IIS/8.5[\r][\n]"
    [2017-06-14 17:10:21,329] DEBUG - header << "REQ_ID: 0962d55a-5dad-41e6-806d-44b0bfc10723[\r][\n]"
    [2017-06-14 17:10:21,329] DEBUG - header << "Set-Cookie: ReqClientId=c550a1bd-e5cc-4410-b9d6-a49e8140ac99; expires=Tue, 14-Jun-2067 11:40:16 GMT; path=/; secure; HttpOnly[\r][\n]"
    [2017-06-14 17:10:21,330] DEBUG - header << "OData-Version: 4.0[\r][\n]"
    [2017-06-14 17:10:21,330] DEBUG - header << "OData-EntityId: https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities(6ed1ee3d-f650-e711-80f7-c4346bad279c)[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "Access-Control-Allow-Origin: *[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "Access-Control-Expose-Headers: Preference-Applied,OData-EntityId,Location,ETag,OData-Version,Content-Encoding,Transfer-Encoding,Content-Length,Retry-After[\r][\n]"
    [2017-06-14 17:10:21,331] DEBUG - header << "X-AspNet-Version: 4.0.30319[\r][\n]"
    [2017-06-14 17:10:21,332] DEBUG - header << "X-Powered-By: ASP.NET[\r][\n]"
    [2017-06-14 17:10:21,332] DEBUG - header << "Date: Wed, 14 Jun 2017 11:40:21 GMT[\r][\n]"
    [2017-06-14 17:10:21,333] DEBUG - header << "Set-Cookie: crmf5cookie=!67xA1q+84x6WYJTJGlBgYdD3j/Njco9CdLugpBlBx2wd7VJ6Pap8GRf3itexCLd6HOop31+Nu7rKg38=;secure; path=/[\r][\n]"
    [2017-06-14 17:10:21,333] DEBUG - header << "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
    [2017-06-14 17:10:21,334] DEBUG - header << "[\r][\n]"
    [2017-06-14 17:10:21,340]  INFO - HTTPSender Unable to sendViaPost to url[https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities]
    org.apache.axis2.AxisFault: InputStream cannot be NULL.

        at org.apache.axis2.transport.http.AbstractHTTPSender.processResponse(AbstractHTTPSender.java:232)
        at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:289)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:196)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:293)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:194)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:125)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:104)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:84)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
        at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:69)
        at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:134)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
        at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:210)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:325)
        at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:371)
        at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    [2017-06-14 17:10:21,385]  INFO - LogMediator To: https://wso21234.crm5.dynamics.com/api/data/v8.2/opportunities, MessageID: urn:uuid:e0cf3ed5-d073-4e83-9a38-f04d8c8f4263, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 401001, ERROR_MESSAGE = InputStream cannot be NULL., Payload: {"name":"First opportunity"}
    [2017-06-14 17:10:21,387]  WARN - PassThroughTransportUtils Unable to set the HTTP status code from the property HTTP_SC with value:
    [2017-06-14 17:10:21,397] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 202 Accepted[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Wed, 14 Jun 2017 11:40:21 GMT[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
    [2017-06-14 17:10:21,398] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Connection: keep-alive[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
    [2017-06-14 17:10:21,399] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"


  • If http method is PATCH, then it changed the method as POST. Please find sample wire log for both non blocking and blocking call.

    Non - blocking

    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "PATCH /api/data/v8.2/accounts(91618256718-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude HTTP/1.1[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Prefer: return=representation[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept-Language: en-US,en;q=0.8[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Authorization: Bearer SUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsImtpZCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyJ9.eyJhdWQiOiJodHRwczovL3dzbzIxMjM0LmNybTUuZHluYW1pY3MuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzIxMzliNDZmLWE3ZjQtNGJiMS1iNDU4LWE0OWFmYWNjY2QwNS8iLCJpYXQiOjE0OTc0MzA0MzAsIm5iZiI6MTQ5NzQzMDQzMCwiZXhwIjoxNDk3NDM0MzMwLCJhY3IiOiIxIiwiYWlvIjoiQVNRQTIvOERBQUFBbWV5QitsbXdTUXJCM3luSTBsMVRtY250blNHOUJjQzh6MEZhOUVOYzUrMD0iLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiYzEyZWM1YmUtODM1Ni00ZWRmLWI5YTQtY2Q1NjNlZDA5MTVhIiwiYXBwaWRhY3IiOiIxIiwiZmFtaWx5X25hbWUiOiJwcml5YSIsImdpdmVuX25hbWUiOiJrYW5hIiwiaXBhZGRyIjoiMjAzLjk0Ljk1LjQiLCJuYW1lIjoia2FuYSBwcml5YSIsIm9pZCI6ImZlNmY4ODVlLTk5ZWItNGJjMC1hMmRhLTZkYzU2ZmMxNDYxNiIsInBsYXRmIjoiMTQiLCJwdWlkIjoiMTAwMzAwMDBBMUJDRTk1RiIsInNjcCI6InVzZXJfaW1wZXJzb25hdGlvbiIsInN1YiI6IkJub3c0T2JEcEoyWElGSWJVR1hfZ2VlaWRDRWV5WC13NFQzYU1WNWRBZjAiLCJ0aWQiOiIyMTM5YjQ2Zi1hN2Y0LTRiYjEtYjQ1OC1hNDlhZmFjY2NkMDUiLCJ1bmlxdWVfbmFtZSI6ImthbmFAd3NvMjEyMzQub25taWNyb3NvZnQuY29tIiwidXBuIjoia2FuYUB3c28yMTIzNC5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAiLCJ3aWRzIjpbIjYyZTkwMzk0LTY5ZjUtNDIzNy05MTkwLTAxMjE3NzE0NWUxMCJdfQ.bKyHO4wmp5JFBJb-0OI7OdeHguF37Zd3z2vgfgstn9iF7uP_PtuEO6Rxdtp07mVKZmNqP50GeZm62FZ74VgB8eDnxQP9mQXEe2rBU94oLVzc9r0bQ1YGqF88RQVcXoM-Q4U3J9rtyuZD1iEog1UsS43krG22YHQ5c-1234Cwbc1noz_bSpx798A1p5-KSD3mckVabkpxn__OU1lyygEfY6FiieuHQ0iT8nxmguGdH371XesxLzyJFOfZLDPHierLMUctQj7e2d_ClbA5nV7CjPfx7PitNVM1owxdnbtSRzkIUKn1gr8cI_0SY7hA4NGF3IrVxoIGcQ1tXaJKDPBqZ2FtozQgvfi61g[\r][\n]"
    [2017-06-14 14:58:36,476] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Action: urn:updateEntityWithDataReturnedOrSinglePropertyValue[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept-Encoding: gzip, deflate[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Postman-Token: c1e955d9-5307-7369-6fd3-8c4cdefd56da[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Content-Type: application/json[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Accept: */*[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Content-Length: 33[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "Connection: Keep-Alive[\r][\n]"
    [2017-06-14 14:58:36,477] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"
    [2017-06-14 14:58:36,478] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "[\r][\n]"
    [2017-06-14 14:58:36,478] DEBUG - wire HTTPS-Sender I/O dispatcher-3 << "{"name":"Updated Sample Account"}"
    [2017-06-14 14:58:37,828] DEBUG - wire HTTPS-Sender I/O dispatcher-3 >> "HTTP/1.1 200 OK[\r][\n]"


    Blocking

    [2017-06-14 15:00:13,791] DEBUG - header >> "POST /api/data/v8.2/accounts(91618256718-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude HTTP/1.1[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Content-Type: application/json; charset=UTF-8[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept: */*[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept-Encoding: gzip, deflate[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Accept-Language: en-US,en;q=0.8[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Action: urn:updateEntityWithDataReturnedOrSinglePropertyValue[\r][\n]"
    [2017-06-14 15:00:13,795] DEBUG - header >> "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsImtpZCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyJ9.eyJhdWQiOiJodHRwczovL3dzbzIxMjM0LmNybTUuZHluYW1pY3MuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0LzIxMzliNDZmLWE3ZjQtNGJiMS1iNDU4LWE0OWFmYWNjY2QwNS8iLCJpYXQiOjE0OTc0MzA0MzAsIm5iZiI6MTQ5NzQzMDQzMCwiZXhwIjoxNDk3NDM0MzMwLCJhY3IiOiIxIiwiYWlvIjoiQVNRQTIvOERBQUFBbWV5QitsbXdTUXJCM3luSTBsMVRtY250blNHOUJjQzh6MEZhOUVOYzUrMD0iLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiYzEyZWM1YmUtODM1Ni00ZWRmLWI5YTQtY2Q1NjNlZDA5MTVhIiwiYXBwaWRhY3IiOiIxIiwiZmFtaWx5X25hbWUiOiJwcml5YSIsImdpdmVuX25hbWUiOiJrYW5hIiwiaXBhZGRyIjoiMjAzLjk0Ljk1LjQiLCJuYW1lIjoia2FuYSBwcml5YSIsIm9pZCI6ImZlNmY4ODVlLTk5ZWItNGJjMC1hMmRhLTZkYzU2ZmMxNDYxNiIsInBsYXRmIjoiMTQiLCJwdWlkIjoiMTAwMzAwMDBBMUJDRTk1RiIsInNjcCI6InVzZXJfaW1wZXJzb25hdGlvbiIsInN1YiI6IkJub3c0T2JEcEoyWElGSWJVR1hfZ2VlaWRDRWV5WC13NFQzYU1WNWRBZjAiLCJ0aWQiOiIyMTM5YjQ2Zi1hN2Y0LTRiYjEtYjQ1OC1hNDlhZmFjY2NkMDUiLCJ1bmlxdWVfbmFtZSI6ImthbmFAd3NvMjEyMzQub25taWNyb3NvZnQuY29tIiwidXBuIjoia2FuYUB3c28yMTIzNC5vbm1pY3Jvc29mdC5jb20iLCJ2ZXIiOiIxLjAiLCJ3aWRzIjpbIjYyZTkwMzk0LTY5ZjUtNDIzNy05MTkwLTAxMjE3NzE0NWUxMCJdfQ.bKyHO4wmp5JFBJb-0OI7OdeHguF37Zd3z2stn9iF7uP_PtuEO6Rxdtp07mVKZmNqP50GeZm62FZ74VgB8eDnxQP9mQXEe2rBU94oLVzc9r0bQ1YGqF88RQVcXoM-Q4U3J9ZD1iEog1UsS43krG22YHQ5c-Cwbc1noz_bSpx798A1p5-KSD3mckVabkpxn__OU1lyygEfY6FiieuHQ0iT8nxmguGdH371XesxLzyJFOfZLDPHierLMUctQj7e2d_ClbA5nV7CjPfx7PitNVM1owxdnbtSRzkIUKn1gr8cI_0SY7hA4NGF3IrVxoIGcQ1tXaJKDPBqZ2FtozQgvfi61g[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Postman-Token: 5adbade0-eb4c-d552-202a-54ff19ee0dfa[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Prefer: return=representation[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "User-Agent: Axis2[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Host: wso21234.crm5.dynamics.com[\r][\n]"
    [2017-06-14 15:00:13,796] DEBUG - header >> "Content-Length: 33[\r][\n]"
    [2017-06-14 15:00:13,797] DEBUG - header >> "[\r][\n]"
    [2017-06-14 15:00:13,797] DEBUG - content >> "{"name":"Updated Sample Account"}"
    [2017-06-14 15:00:13,953] DEBUG - header << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
    [2017-06-14 15:00:13,953] DEBUG - header << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Cache-Control: no-cache[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Pragma: no-cache[\r][\n]"
    [2017-06-14 15:00:13,954] DEBUG - header << "Allow: GET,PUT,PATCH,DELETE[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Content-Type: application/json; odata.metadata=minimal[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Expires: -1[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Server: Microsoft-IIS/8.5[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "REQ_ID: 8ba04189-7459-4837-86e7-dce8df6a9ac1[\r][\n]"
    [2017-06-14 15:00:13,955] DEBUG - header << "Set-Cookie: ReqClientId=582ab259-22e7-4130-81af-02700cf96a92; expires=Tue, 14-Jun-2067 09:30:13 GMT; path=/; secure; HttpOnly[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "Access-Control-Allow-Origin: *[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "Access-Control-Expose-Headers: Preference-Applied,OData-EntityId,Location,ETag,OData-Version,Content-Encoding,Transfer-Encoding,Content-Length,Retry-After[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "OData-Version: 4.0[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "X-AspNet-Version: 4.0.30319[\r][\n]"
    [2017-06-14 15:00:13,956] DEBUG - header << "X-Powered-By: ASP.NET[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Date: Wed, 14 Jun 2017 09:30:13 GMT[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Content-Length: 2149[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Set-Cookie: crmf5cookie=!CJwKVxgHGYXTSBLJGlBgYdD3j/Njchy9e3PTBiqxdXWXGrr92QWgIIwdtlLOkedogQKJlLfUu515Fyg=;secure; path=/[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
    [2017-06-14 15:00:13,957] DEBUG - header << "[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "  "error":{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "    "code":"","message":"Unmapped Request found, PathTemplate:~/entityset/key, HttpVerb:POST","innererror":{[\r][\n]"
    [2017-06-14 15:00:13,962] DEBUG - content << "      "message":"Unmapped Request found, PathTemplate:~/entityset/key, HttpVerb:POST","type":"Microsoft.Crm.CrmHttpException","stacktrace":"   at Microsoft.Crm.Extensibility.OData.EntityController.HandleUnmappedRequest(ODataPath path)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Objec"
    [2017-06-14 15:00:13,963] DEBUG - content << "t instance, Object[] arguments)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Controllers.ActionFilterResult.<Exe"
    [2017-06-14 15:00:13,963] DEBUG - content << "cuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"[\r][\n]"
    [2017-06-14 15:00:13,963] DEBUG - content << "    }[\r][\n]"
    [2017-06-14 15:00:13,964] DEBUG - content << "  }[\r][\n]"
    [2017-06-14 15:00:13,964] DEBUG - content << "}"
    [2017-06-14 15:00:13,966]  INFO - HTTPSender Unable to sendViaPost to url[https://wso21234.crm5.dynamics.com/api/data/v8.2/accounts(31618218-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude]
    org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed

        at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:326)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:196)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:293)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:194)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:125)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:104)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148)
        at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:84)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
        at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:69)
        at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:134)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
        at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:210)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:325)
        at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:371)
        at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    [2017-06-14 15:00:13,988]  INFO - LogMediator To: https://wso21234.crm5.dynamics.com/api/data/v8.2/accounts(31618218-8a4e-e711-80f7-c4346bad279c)?$select=name,creditonhold,address1_latitude, MessageID: urn:uuid:73a06200-8cf2-4b5d-a03e-d19ee4ff5bdd, Direction: request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 401001, ERROR_MESSAGE = Transport error: 405 Error: Method Not Allowed, Payload: {"name":"Updated Sample Account"}
    [2017-06-14 15:00:13,996] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "HTTP/1.1 202 Accepted[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Date: Wed, 14 Jun 2017 09:30:13 GMT[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "Connection: keep-alive[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"
    [2017-06-14 15:00:13,997] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "0[\r][\n]"
    [2017-06-14 15:00:13,998] DEBUG - wire HTTP-Listener I/O dispatcher-1 << "[\r][\n]"

Is there any way to resolve this issues? or Is it an expected behavior?

[1] [Architecture] [PET] Microsoft Dynamics CRM Connector

Thanks,

Kanapriya Kuleswararajan
Software Engineer | WSO2
Mobile : - <a href="tel:077%20489%204438" value="+94774894438" target="_blank">0774894438
Mail : - [hidden email]
LinkedIn : - https://www.linkedin.com/in/kanapriya-kules-94712685/



--

Best Regards,

Malaka Silva
Associate Director / Architect
M: <a href="tel:+94%2077%20721%209791" value="+94777219791" target="_blank">+94 777 219 791
Tel : 94 11 214 5345
Fax :<a href="tel:011%202%20145300" value="+94112145300" target="_blank">94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
https://wso2.com/signature

Don't make Trees rare, we should keep them with care




--

Best Regards,

Malaka Silva
Associate Director / Architect
M: <a href="tel:+94%2077%20721%209791" value="+94777219791" target="_blank">+94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300 
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77

WSO2, Inc. 
lean . enterprise . middleware 
https://wso2.com/signature

Don't make Trees rare, we should keep them with care


_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Loading...