Thanks Kesavan. As you mentioned this is working with the latest built.
On Mon, Jul 11, 2016 at 6:11 PM, Keerthika Mahendralingam < keerth...@wso2.com> wrote: > Hi All, > > I am checking GoToTraining connector. I am getting the following error > when the API response with "201 Created" with empty body. > > Only getting this error when the Content-Type of the response is " > *application/json*" as in [1] or "*application/json;charset=UTF-8*". This > is working fine if we get the empty response with "*application/json; > charset=UTF-8*" > > Is there any reason for this? > > Please note that I tested with ESB 5.0.0-Beta and the latest build that I > download from Jenkins build today. > > [1]. > > HTTPS-Sender I/O dispatcher-1 << "POST > /G2T/rest/organizers/8150166600242801157/trainings HTTP/1.1[\r][\n]" > > [2016-07-11 16:01:56,406] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:56,406] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << > "Authorization: OAuth oauth_token=jkjFA5LtTutQWp90MrDTAUXVSFYQ[\r][\n]" > > [2016-07-11 16:01:56,407] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:56,407] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << > "Action: urn:createTraining[\r][\n]" > > [2016-07-11 16:01:56,407] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:56,407] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << > "Accept-Charset: UTF-8[\r][\n]" > > [2016-07-11 16:01:56,407] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:56,407] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << > "Content-Type: application/json[\r][\n]" > > [2016-07-11 16:01:56,407] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:56,407] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << > "Accept: application/json[\r][\n]" > > [2016-07-11 16:01:56,407] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:56,407] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << > "Transfer-Encoding: chunked[\r][\n]" > > [2016-07-11 16:01:56,407] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:56,407] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << > "Host: api.citrixonline.com[\r][\n]" > > [2016-07-11 16:01:56,407] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:56,407] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << > "Connection: Keep-Alive[\r][\n]" > > [2016-07-11 16:01:56,408] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:56,408] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << > "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" > > [2016-07-11 16:01:56,408] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:56,408] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << > "[\r][\n]" > > [2016-07-11 16:01:56,408] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:56,408] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << > "dd[\r][\n]" > > [2016-07-11 16:01:56,408] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:56,408] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << > "{"times":[{"startDate":"2016-07-13T09:00:00Z", > "endDate":"2016-07-13T12:00:00Z"}], "description":"Learn Java Fundamentals > from the Professionals.", "name":"Java Fundamentals 1.7", "timeZone":"", > "registrationSettings":{}}[\r][\n]" > > [2016-07-11 16:01:56,408] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:56,408] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << > "0[\r][\n]" > > [2016-07-11 16:01:56,449] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:56,408] DEBUG - wire HTTPS-Sender I/O dispatcher-1 << > "[\r][\n]" > > [2016-07-11 16:01:57,797] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,797] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> > "HTTP/1.1 201 Created[\r][\n]" > > [2016-07-11 16:01:57,797] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,797] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> > "Access-Control-Allow-Headers: origin, x-requested-with, authorization, > accept, content-type[\r][\n]" > > [2016-07-11 16:01:57,797] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,797] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> > "Access-Control-Allow-Methods: GET, PUT, POST, DELETE[\r][\n]" > > [2016-07-11 16:01:57,797] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,797] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> > "Access-Control-Allow-Origin: *[\r][\n]" > > [2016-07-11 16:01:57,797] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,797] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> > "Access-Control-Max-Age: 3628800[\r][\n]" > > [2016-07-11 16:01:57,797] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,797] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> > "Content-Type: application/json[\r][\n]" > > [2016-07-11 16:01:57,798] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,797] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> > "Date: Mon, 11 Jul 2016 10:30:08 GMT[\r][\n]" > > [2016-07-11 16:01:57,798] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,798] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> > "Server: Apache-Coyote/1.1[\r][\n]" > > [2016-07-11 16:01:57,798] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,798] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> > "Set-Cookie: JSESSIONID=C08B15DE303D2608C7EC9911A5A185CE; Path=/; > HttpOnly[\r][\n]" > > [2016-07-11 16:01:57,798] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,798] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> > "Content-Length: 21[\r][\n]" > > [2016-07-11 16:01:57,798] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,798] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> > "Connection: keep-alive[\r][\n]" > > [2016-07-11 16:01:57,798] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,798] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> > "[\r][\n]" > > [2016-07-11 16:01:57,798] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,798] DEBUG - wire HTTPS-Sender I/O dispatcher-1 >> > ""9003108347841687554"" > > [2016-07-11 16:01:57,799] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,799] DEBUG - headers http-outgoing-1 << HTTP/1.1 201 > Created > > [2016-07-11 16:01:57,799] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,799] DEBUG - headers http-outgoing-1 << > Access-Control-Allow-Headers: origin, x-requested-with, authorization, > accept, content-type > > [2016-07-11 16:01:57,800] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,800] DEBUG - headers http-outgoing-1 << > Access-Control-Allow-Methods: GET, PUT, POST, DELETE > > [2016-07-11 16:01:57,800] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,800] DEBUG - headers http-outgoing-1 << > Access-Control-Allow-Origin: * > > [2016-07-11 16:01:57,800] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,800] DEBUG - headers http-outgoing-1 << > Access-Control-Max-Age: 3628800 > > [2016-07-11 16:01:57,800] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,800] DEBUG - headers http-outgoing-1 << Content-Type: > application/json > > [2016-07-11 16:01:57,800] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,800] DEBUG - headers http-outgoing-1 << Date: Mon, 11 > Jul 2016 10:30:08 GMT > > [2016-07-11 16:01:57,800] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,800] DEBUG - headers http-outgoing-1 << Server: > Apache-Coyote/1.1 > > [2016-07-11 16:01:57,800] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,800] DEBUG - headers http-outgoing-1 << Set-Cookie: > JSESSIONID=C08B15DE303D2608C7EC9911A5A185CE; Path=/; HttpOnly > > [2016-07-11 16:01:57,800] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,800] DEBUG - headers http-outgoing-1 << > Content-Length: 21 > > [2016-07-11 16:01:57,800] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,800] DEBUG - headers http-outgoing-1 << Connection: > keep-alive > > [2016-07-11 16:01:57,806] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,806] ERROR - JsonUtil #getNewJsonPayload. Could not > save JSON payload. Invalid input stream found. MessageID: > urn:uuid:3347b1bd-15e0-4db2-9a8b-f901f23558c9 > > [2016-07-11 16:01:57,810] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > [2016-07-11 16:01:57,809] ERROR - DeferredMessageBuilder Error building > message > > [2016-07-11 16:01:57,810] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - > org.apache.axis2.AxisFault: Payload is not a JSON string. > > [2016-07-11 16:01:57,810] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at > org.apache.synapse.commons.json.JsonUtil.getNewJsonPayload(JsonUtil.java:555) > > [2016-07-11 16:01:57,810] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at > org.apache.synapse.commons.json.JsonStreamBuilder.processDocument(JsonStreamBuilder.java:45) > > [2016-07-11 16:01:57,810] INFO > {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} - at > org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:148) > > > > ================================================================================================ > > > [2]. > > [2016-07-11 17:41:58,583] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "POST /G2T/rest/organizers/8150166600242801157/trainings HTTP/1.1[\r][\n]" > > [2016-07-11 17:41:58,583] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "Accept-Language: en-US,en;q=0.8[\r][\n]" > > [2016-07-11 17:41:58,583] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "Cookie: RWID=8_75735[\r][\n]" > > [2016-07-11 17:41:58,584] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "Authorization: OAuth oauth_token=jkjFA5LtTutQWp90MrDTAUXVSFYQ[\r][\n]" > > [2016-07-11 17:41:58,584] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "Accept-Encoding: gzip, deflate[\r][\n]" > > [2016-07-11 17:41:58,584] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "Origin: chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop[\r][\n]" > > [2016-07-11 17:41:58,584] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "Postman-Token: 42793fcf-b660-a44b-d75d-0299ab7297f2[\r][\n]" > > [2016-07-11 17:41:58,584] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "Content-Type: application/json[\r][\n]" > > [2016-07-11 17:41:58,584] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "Accept: */*[\r][\n]" > > [2016-07-11 17:41:58,584] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "Cache-Control: no-cache[\r][\n]" > > [2016-07-11 17:41:58,584] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "Transfer-Encoding: chunked[\r][\n]" > > [2016-07-11 17:41:58,584] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "Host: api.citrixonline.com[\r][\n]" > > [2016-07-11 17:41:58,584] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "Connection: Keep-Alive[\r][\n]" > > [2016-07-11 17:41:58,584] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" > > [2016-07-11 17:41:58,585] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "[\r][\n]" > > [2016-07-11 17:41:58,585] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "dd[\r][\n]" > > [2016-07-11 17:41:58,585] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "{"times":[{"startDate":"2016-07-13T09:00:00Z", > "endDate":"2016-07-13T12:00:00Z"}], "description":"Learn Java Fundamentals > from the Professionals.", "name":"Java Fundamentals 1.7", "timeZone":"", > "registrationSettings":{}}[\r][\n]" > > [2016-07-11 17:41:58,585] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "0[\r][\n]" > > [2016-07-11 17:41:58,585] DEBUG - wire HTTPS-Sender I/O dispatcher-4 << > "[\r][\n]" > > [2016-07-11 17:41:59,796] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "HTTP/1.1 201 Created[\r][\n]" > > [2016-07-11 17:41:59,797] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "Access-Control-Allow-Headers: origin, x-requested-with, authorization, > accept, content-type[\r][\n]" > > [2016-07-11 17:41:59,797] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "Access-Control-Allow-Methods: GET, PUT, POST, DELETE[\r][\n]" > > [2016-07-11 17:41:59,797] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "Access-Control-Allow-Origin: *[\r][\n]" > > [2016-07-11 17:41:59,797] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "Access-Control-Max-Age: 3628800[\r][\n]" > > [2016-07-11 17:41:59,797] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "Content-Encoding: gzip[\r][\n]" > > [2016-07-11 17:41:59,797] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "Content-Type: > application/json;charset=UTF-8[\r][\n]" > > [2016-07-11 17:41:59,797] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "Date: Mon, 11 Jul 2016 12:10:10 GMT[\r][\n]" > > [2016-07-11 17:41:59,797] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "Server: Apache-Coyote/1.1[\r][\n]" > > [2016-07-11 17:41:59,798] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "Set-Cookie: JSESSIONID=77D04BAE1D14328BC34A36394113DE06; Path=/; > HttpOnly[\r][\n]" > > [2016-07-11 17:41:59,798] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "Vary: Accept-Encoding[\r][\n]" > > [2016-07-11 17:41:59,798] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "Content-Length: 41[\r][\n]" > > [2016-07-11 17:41:59,798] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "Connection: keep-alive[\r][\n]" > > [2016-07-11 17:41:59,798] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "[\r][\n]" > > [2016-07-11 17:41:59,798] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> > "[0x1f][0x8b][0x8][0x0][0x0][0x0][0x0][0x0][0x0][0x0]S2516456031217[0xb7][0xb4]0224P[0x2][0x0][0xd0][0x9a][0x7][0xfa][0x15][0x0][0x0][0x0]" > > [2016-07-11 17:41:59,799] DEBUG - headers http-outgoing-5 << HTTP/1.1 201 > Created > > [2016-07-11 17:41:59,799] DEBUG - headers http-outgoing-5 << > Access-Control-Allow-Headers: origin, x-requested-with, authorization, > accept, content-type > > [2016-07-11 17:41:59,799] DEBUG - headers http-outgoing-5 << > Access-Control-Allow-Methods: GET, PUT, POST, DELETE > > [2016-07-11 17:41:59,799] DEBUG - headers http-outgoing-5 << > Access-Control-Allow-Origin: * > > [2016-07-11 17:41:59,799] DEBUG - headers http-outgoing-5 << > Access-Control-Max-Age: 3628800 > > [2016-07-11 17:41:59,799] DEBUG - headers http-outgoing-5 << > Content-Encoding: gzip > > [2016-07-11 17:41:59,799] DEBUG - headers http-outgoing-5 << Content-Type: > application/json;charset=UTF-8 > > [2016-07-11 17:41:59,799] DEBUG - headers http-outgoing-5 << Date: Mon, 11 > Jul 2016 12:10:10 GMT > > [2016-07-11 17:41:59,799] DEBUG - headers http-outgoing-5 << Server: > Apache-Coyote/1.1 > > [2016-07-11 17:41:59,800] DEBUG - headers http-outgoing-5 << Set-Cookie: > JSESSIONID=77D04BAE1D14328BC34A36394113DE06; Path=/; HttpOnly > > [2016-07-11 17:41:59,800] DEBUG - headers http-outgoing-5 << Vary: > Accept-Encoding > > [2016-07-11 17:41:59,800] DEBUG - headers http-outgoing-5 << > Content-Length: 41 > > [2016-07-11 17:41:59,800] DEBUG - headers http-outgoing-5 << Connection: > keep-alive > > [2016-07-11 17:41:59,801] ERROR - JsonUtil #getNewJsonPayload. Could not > save JSON payload. Invalid input stream found. MessageID: > urn:uuid:3a9d2664-d2f0-4029-817c-8f5bfdb0299f > > [2016-07-11 17:41:59,802] ERROR - DeferredMessageBuilder Error building > message > > org.apache.axis2.AxisFault: Payload is not a JSON string. > > at > org.apache.synapse.commons.json.JsonUtil.getNewJsonPayload(JsonUtil.java:555) > > at > org.apache.synapse.commons.json.JsonStreamBuilder.processDocument(JsonStreamBuilder.java:45) > > at > org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:148) > > at > org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:137) > > at > org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:100) > > at > org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:77) > > at > org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:171) > > at > org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:268) > > at > org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:756) > > at > org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:277) > > at > org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554) > > at > org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188) > > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) > > at > org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:255) > > at > org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) > > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > > at java.lang.Thread.run(Thread.java:722) > > > > ======================================================================================================== > > Template and proxy used: > > <?xml version="1.0" encoding="UTF-8"?> > <template name="createTraining" xmlns="http://ws.apache.org/ns/synapse"> > <parameter name="name"/> > <parameter name="description"/> > <parameter name="timeZone"/> > <parameter name="times"/> > <parameter name="disableWebRegistration"/> > <parameter name="disableConfirmationEmail"/> > <parameter name="organizers"/> > <sequence> > <property expression="$func:name" name="uri.var.name" > xmlns:ns="http://org.apache.synapse/xsd" xmlns:ns2=" > http://org.apache.synapse/xsd"/> > <property expression="$func:description" > name="uri.var.description" > xmlns:ns="http://org.apache.synapse/xsd" xmlns:ns2=" > http://org.apache.synapse/xsd"/> > <property expression="$func:timeZone" name="uri.var.timeZone" > xmlns:ns="http://org.apache.synapse/xsd" xmlns:ns2=" > http://org.apache.synapse/xsd"/> > <property expression="$func:times" name="uri.var.times" > xmlns:ns="http://org.apache.synapse/xsd" xmlns:ns2=" > http://org.apache.synapse/xsd"/> > <property expression="$func:disableWebRegistration" > name="uri.var.disableWebRegistration" > xmlns:ns="http://org.apache.synapse/xsd" xmlns:ns2=" > http://org.apache.synapse/xsd"/> > <property expression="$func:disableConfirmationEmail" > name="uri.var.disableConfirmationEmail" > xmlns:ns="http://org.apache.synapse/xsd" xmlns:ns2=" > http://org.apache.synapse/xsd"/> > <property expression="$func:organizers" > name="uri.var.organizers" > xmlns:ns="http://org.apache.synapse/xsd" xmlns:ns2=" > http://org.apache.synapse/xsd"/> > <payloadFactory media-type="json"> > <format> > { > "times": $1, > "description": "$2", > "name": "$3", > "timeZone": "$4" > } > </format> > <args> > <arg evaluator="xml" > expression="get-property('uri.var.times')" > xmlns:ns="http://org.apache.synapse/xsd" xmlns:ns2=" > http://org.apache.synapse/xsd"/> > <arg evaluator="xml" > expression="get-property('uri.var.description')" > xmlns:ns="http://org.apache.synapse/xsd" xmlns:ns2=" > http://org.apache.synapse/xsd"/> > <arg evaluator="xml" > expression="get-property('uri.var.name')" > xmlns:ns="http://org.apache.synapse/xsd" xmlns:ns2=" > http://org.apache.synapse/xsd"/> > <arg evaluator="xml" > expression="get-property('uri.var.timeZone')" > xmlns:ns="http://org.apache.synapse/xsd" xmlns:ns2=" > http://org.apache.synapse/xsd"/> > </args> > </payloadFactory> > > <header name="Authorization" scope="transport" value="OAuth > oauth_token=jkjFA5LtTutQWp90MrDTAUXVSFYQ"/> > <header name="Content-Type" scope="transport" > value="application/json; charset=UTF-8"/> > <call> > <endpoint> > <http method="POST" uri-template=" > https://api.citrixonline.com/G2T/rest/organizers/8150166600242801157/trainings > "/> > </endpoint> > </call> > > </sequence> > </template> > > > ================================================================================================== > > <?xml version="1.0" encoding="UTF-8"?> > <proxy xmlns="http://ws.apache.org/ns/synapse" > name="test" > transports="https,http" > statistics="disable" > trace="disable" > startOnLoad="true"> > <target> > <inSequence> > <property name="name" expression="json-eval($.name)"/> > <property name="description" > expression="json-eval($.description)"/> > <property name="times" expression="json-eval($.times)"/> > <call-template target="createTraining"> > <with-param name="name" value="Java Fundamentals 1.7"/> > <with-param name="description" > value="Learn Java Fundamentals from the > Professionals."/> > <with-param name="times" > > value="[{"startDate":"2016-07-13T09:00:00Z", > "endDate":"2016-07-13T12:00:00Z"}]"/> > </call-template> > </inSequence> > </target> > <description/> > </proxy> > > > Thanks, > Keerthika. > -- > <dev-requ...@wso2.org> > Keerthika Mahendralingam > Software Engineer > Mobile :+94 (0) 776 121144 > keerth...@wso2.com > WSO2, Inc. > lean . enterprise . middleware > -- <dev-requ...@wso2.org> Keerthika Mahendralingam Software Engineer Mobile :+94 (0) 776 121144 keerth...@wso2.com WSO2, Inc. lean . enterprise . middleware
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev