Hi Udara, Thanks for the reply. I added the content type header to my jaggery code and re-run
var url = "http://localhost:8280/services/ldap"; var data = {"application": "ldap","operation": "searchEntity", "objectClass": "inetOrgPerson"}; * var optionalHeaders = {"Content-Type": "application/json"}; //Is this what you meant?* var ldapJson = post(url, data ,optionalHeaders); ---------------- And ESB side logs are ------------- [2014-02-01 18:01:14,871] DEBUG - ProxyServiceMessageReceiver Proxy Service ldap received a new message from : 127.0.0.1 [2014-02-01 18:01:14,886] DEBUG - ProxyServiceMessageReceiver Message To: /services/ldap [2014-02-01 18:01:14,887] DEBUG - ProxyServiceMessageReceiver SOAPAction: null [2014-02-01 18:01:14,887] DEBUG - ProxyServiceMessageReceiver WSA-Action: null [2014-02-01 18:01:14,887] DEBUG - ProxyServiceMessageReceiver Setting specified anonymous fault-sequence for proxy [2014-02-01 18:01:14,887] DEBUG - ProxyServiceMessageReceiver Using the anonymous in-sequence of the proxy service for mediation [2014-02-01 18:01:14,887] DEBUG - SequenceMediator Start : Sequence <anonymous> [2014-02-01 18:01:14,887] DEBUG - SequenceMediator Sequence <SequenceMediator> :: mediate() [2014-02-01 18:01:14,887] DEBUG - SequenceMediator Mediation started from mediator position : 0 [2014-02-01 18:01:14,888] DEBUG - JsonReadOnlyStream <init> [2014-02-01 18:01:14,888] *ERROR - JsonUtil #newJsonPayload. Could not save JSON payload. Invalid input stream found. MessageID: urn:uuid:420d3015-d143-4dc6-9c49-8bb61b01d0d3* [2014-02-01 18:01:14,901] DEBUG - JsonStreamBuilder #processDocument. No JSON payload found in request. MessageID: urn:uuid:420d3015-d143-4dc6-9c49-8bb61b01d0d3 [2014-02-01 18:01:14,902] DEBUG - PropertyMediator Start : Property mediator [2014-02-01 18:01:14,902] DEBUG - PropertyMediator Removing property : NO_ENTITY_BODY (scope:axis2) [2014-02-01 18:01:14,902] DEBUG - PropertyMediator End : Property mediator [2014-02-01 18:01:14,902] DEBUG - PropertyMediator Start : Property mediator [2014-02-01 18:01:14,902] DEBUG - PropertyMediator Setting property : messageType at scope : axis2 to : application/json (i.e. constant : application/json) [2014-02-01 18:01:14,902] DEBUG - PropertyMediator End : Property mediator [2014-02-01 18:01:14,902] DEBUG - LogMediator Start : Log mediator [2014-02-01 18:01:14,903] INFO - LogMediator To: /services/ldap, MessageID: urn:uuid:420d3015-d143-4dc6-9c49-8bb61b01d0d3, Direction: request, Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope "><soapenv:Body></soapenv:Body></soapenv:Envelope> [2014-02-01 18:01:14,918] DEBUG - LogMediator End : Log mediator [2014-02-01 18:01:14,918] DEBUG - LogMediator Start : Log mediator [2014-02-01 18:01:14,918] DEBUG - JsonReadOnlyStream <init> [2014-02-01 18:01:14,918] ERROR - JsonUtil #newJsonPayload. Could not save JSON payload. Invalid input stream found. MessageID: urn:uuid:420d3015-d143-4dc6-9c49-8bb61b01d0d3 [2014-02-01 18:01:14,918] ERROR - SynapseJsonPath #stringValueOf. Error evaluating JSON Path <$.objectClass>. Returning empty result. Error>>> Invalid container object [2014-02-01 18:01:14,919] DEBUG - JsonReadOnlyStream <init> [2014-02-01 18:01:14,919] ERROR - JsonUtil #newJsonPayload. Could not determine availability of the JSON input stream. MessageID: urn:uuid:420d3015-d143-4dc6-9c49-8bb61b01d0d3. Error>>> Stream closed [2014-02-01 18:01:14,919] ERROR - SynapseJsonPath #stringValueOf. Error evaluating JSON Path <$.application>. Returning empty result. Error>>> Unexpected exception java.io.IOException: Stream closed occur at position -1. *[2014-02-01 18:01:14,919] INFO - LogMediator objectClass = , application = * [2014-02-01 18:01:14,919] DEBUG - LogMediator End : Log mediator [2014-02-01 18:01:14,919] DEBUG - SequenceMediator End : Sequence <anonymous> ---------------- It seems like now ESB doesn't accept the json payload of the request message. On Sat, Feb 1, 2014 at 2:33 PM, Udara Liyanage <[email protected]> wrote: > Did you specify the message type as json when sending the request to ESB. > > Touched, not typed. Erroneous words are a feature, not a typo. > -- Dimuthu Upeksha Engineering Intern WSO2 inc.
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
