WSO2-how to pass two parameters at a time with WSO2 ESB configuration












0















I have created a API in API manager. I can invoke it with



http://localhost:6547/generatereports/1.0/Reports/dcuid/vcid


I am passing two parameters with "dcuid and vcid" at a time but not passing.



reportsapi:



<?xml version="1.0" encoding="UTF-8"?>
<api context="generatereports/1.0/Reports" name="reportsdataapi" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="GET" protocol="http" uri-template="/{dcuid}/{vcid}">
<inSequence>
<property description="http" name="HTTP_SC" scope="axis2" type="STRING" value="404"/>
<log level="full"/>
<send>
<endpoint key="reportsendpoint"/>
</send>
</inSequence>
<outSequence>
<switch source="get-property('axis2','HTTP_SC')">
<case regex="200">
<log description="200log" level="custom">
<property expression="$ctx:ERROR_CODE" name="200reserrorcode"/>
</log>
<send/>
</case>
<default>
<log description="reslog" level="custom">
<property expression="$ctx:ERROR_CODE" name="reserrorcode"/>
<property expression="$ctx:ERROR_MESSAGE" name="reserrormessage"/>
<property expression="get-property('axis2','HTTP_SC')" name="reshttpsc"/>
</log>
</default>
</switch>

<send/>
</outSequence>
<faultSequence>
<switch source="get-property('axis2','HTTP_SC')">
<case regex="200">
<log description="200log" level="custom">
<property expression="$ctx:ERROR_CODE" name="200reserrorcode"/>
</log>
</case>
<default>
<log description="reslog" level="custom">
<property expression="$ctx:ERROR_CODE" name="reserrorcode"/>
<property expression="$ctx:ERROR_MESSAGE" name="reserrormessage"/>
<property expression="get-property('axis2','HTTP_SC')" name="reshttpsc"/>
</log>
</default>
</switch>

<send/>
</faultSequence>
</resource>
</api>


wso2 configuration process with to send the response is other than 200 response code
reportsendpoint:



    <?xml version="1.0" encoding="UTF-8"?>
<endpoint name="reporsendpoint" xmlns="http://ws.apache.org/ns/synapse">
<http method="get" uri-template="http://localhost:6547/generatereports/1.0/Reports/{uri.var.dcuid}/{uri.var.vcid}"/>
</endpoint>









share|improve this question

























  • Can you please explain "but not passing" part?

    – Bee
    Nov 28 '18 at 6:23











  • localhost:6547/generatereports/1.0/Reports/dcuid/vcid this urls configuraterate.passing dynamic with dcuid and vcid if you have any process with to send the response is other than 200 response code @ Bee

    – Aisha Varun
    Nov 28 '18 at 9:34













  • Sorry, still not clear.

    – Bee
    Nov 28 '18 at 9:44











  • this service url working fine getting data to send the response 200 if you have service not working or any internal server error to send the mail another response with client @Bee

    – Aisha Varun
    Nov 28 '18 at 9:56













  • ok. so you want to send a different response (or log?) if the status code is not 200? If the answer is yes, what's the title of the question about?

    – Bee
    Nov 28 '18 at 10:06
















0















I have created a API in API manager. I can invoke it with



http://localhost:6547/generatereports/1.0/Reports/dcuid/vcid


I am passing two parameters with "dcuid and vcid" at a time but not passing.



reportsapi:



<?xml version="1.0" encoding="UTF-8"?>
<api context="generatereports/1.0/Reports" name="reportsdataapi" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="GET" protocol="http" uri-template="/{dcuid}/{vcid}">
<inSequence>
<property description="http" name="HTTP_SC" scope="axis2" type="STRING" value="404"/>
<log level="full"/>
<send>
<endpoint key="reportsendpoint"/>
</send>
</inSequence>
<outSequence>
<switch source="get-property('axis2','HTTP_SC')">
<case regex="200">
<log description="200log" level="custom">
<property expression="$ctx:ERROR_CODE" name="200reserrorcode"/>
</log>
<send/>
</case>
<default>
<log description="reslog" level="custom">
<property expression="$ctx:ERROR_CODE" name="reserrorcode"/>
<property expression="$ctx:ERROR_MESSAGE" name="reserrormessage"/>
<property expression="get-property('axis2','HTTP_SC')" name="reshttpsc"/>
</log>
</default>
</switch>

<send/>
</outSequence>
<faultSequence>
<switch source="get-property('axis2','HTTP_SC')">
<case regex="200">
<log description="200log" level="custom">
<property expression="$ctx:ERROR_CODE" name="200reserrorcode"/>
</log>
</case>
<default>
<log description="reslog" level="custom">
<property expression="$ctx:ERROR_CODE" name="reserrorcode"/>
<property expression="$ctx:ERROR_MESSAGE" name="reserrormessage"/>
<property expression="get-property('axis2','HTTP_SC')" name="reshttpsc"/>
</log>
</default>
</switch>

<send/>
</faultSequence>
</resource>
</api>


wso2 configuration process with to send the response is other than 200 response code
reportsendpoint:



    <?xml version="1.0" encoding="UTF-8"?>
<endpoint name="reporsendpoint" xmlns="http://ws.apache.org/ns/synapse">
<http method="get" uri-template="http://localhost:6547/generatereports/1.0/Reports/{uri.var.dcuid}/{uri.var.vcid}"/>
</endpoint>









share|improve this question

























  • Can you please explain "but not passing" part?

    – Bee
    Nov 28 '18 at 6:23











  • localhost:6547/generatereports/1.0/Reports/dcuid/vcid this urls configuraterate.passing dynamic with dcuid and vcid if you have any process with to send the response is other than 200 response code @ Bee

    – Aisha Varun
    Nov 28 '18 at 9:34













  • Sorry, still not clear.

    – Bee
    Nov 28 '18 at 9:44











  • this service url working fine getting data to send the response 200 if you have service not working or any internal server error to send the mail another response with client @Bee

    – Aisha Varun
    Nov 28 '18 at 9:56













  • ok. so you want to send a different response (or log?) if the status code is not 200? If the answer is yes, what's the title of the question about?

    – Bee
    Nov 28 '18 at 10:06














0












0








0








I have created a API in API manager. I can invoke it with



http://localhost:6547/generatereports/1.0/Reports/dcuid/vcid


I am passing two parameters with "dcuid and vcid" at a time but not passing.



reportsapi:



<?xml version="1.0" encoding="UTF-8"?>
<api context="generatereports/1.0/Reports" name="reportsdataapi" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="GET" protocol="http" uri-template="/{dcuid}/{vcid}">
<inSequence>
<property description="http" name="HTTP_SC" scope="axis2" type="STRING" value="404"/>
<log level="full"/>
<send>
<endpoint key="reportsendpoint"/>
</send>
</inSequence>
<outSequence>
<switch source="get-property('axis2','HTTP_SC')">
<case regex="200">
<log description="200log" level="custom">
<property expression="$ctx:ERROR_CODE" name="200reserrorcode"/>
</log>
<send/>
</case>
<default>
<log description="reslog" level="custom">
<property expression="$ctx:ERROR_CODE" name="reserrorcode"/>
<property expression="$ctx:ERROR_MESSAGE" name="reserrormessage"/>
<property expression="get-property('axis2','HTTP_SC')" name="reshttpsc"/>
</log>
</default>
</switch>

<send/>
</outSequence>
<faultSequence>
<switch source="get-property('axis2','HTTP_SC')">
<case regex="200">
<log description="200log" level="custom">
<property expression="$ctx:ERROR_CODE" name="200reserrorcode"/>
</log>
</case>
<default>
<log description="reslog" level="custom">
<property expression="$ctx:ERROR_CODE" name="reserrorcode"/>
<property expression="$ctx:ERROR_MESSAGE" name="reserrormessage"/>
<property expression="get-property('axis2','HTTP_SC')" name="reshttpsc"/>
</log>
</default>
</switch>

<send/>
</faultSequence>
</resource>
</api>


wso2 configuration process with to send the response is other than 200 response code
reportsendpoint:



    <?xml version="1.0" encoding="UTF-8"?>
<endpoint name="reporsendpoint" xmlns="http://ws.apache.org/ns/synapse">
<http method="get" uri-template="http://localhost:6547/generatereports/1.0/Reports/{uri.var.dcuid}/{uri.var.vcid}"/>
</endpoint>









share|improve this question
















I have created a API in API manager. I can invoke it with



http://localhost:6547/generatereports/1.0/Reports/dcuid/vcid


I am passing two parameters with "dcuid and vcid" at a time but not passing.



reportsapi:



<?xml version="1.0" encoding="UTF-8"?>
<api context="generatereports/1.0/Reports" name="reportsdataapi" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="GET" protocol="http" uri-template="/{dcuid}/{vcid}">
<inSequence>
<property description="http" name="HTTP_SC" scope="axis2" type="STRING" value="404"/>
<log level="full"/>
<send>
<endpoint key="reportsendpoint"/>
</send>
</inSequence>
<outSequence>
<switch source="get-property('axis2','HTTP_SC')">
<case regex="200">
<log description="200log" level="custom">
<property expression="$ctx:ERROR_CODE" name="200reserrorcode"/>
</log>
<send/>
</case>
<default>
<log description="reslog" level="custom">
<property expression="$ctx:ERROR_CODE" name="reserrorcode"/>
<property expression="$ctx:ERROR_MESSAGE" name="reserrormessage"/>
<property expression="get-property('axis2','HTTP_SC')" name="reshttpsc"/>
</log>
</default>
</switch>

<send/>
</outSequence>
<faultSequence>
<switch source="get-property('axis2','HTTP_SC')">
<case regex="200">
<log description="200log" level="custom">
<property expression="$ctx:ERROR_CODE" name="200reserrorcode"/>
</log>
</case>
<default>
<log description="reslog" level="custom">
<property expression="$ctx:ERROR_CODE" name="reserrorcode"/>
<property expression="$ctx:ERROR_MESSAGE" name="reserrormessage"/>
<property expression="get-property('axis2','HTTP_SC')" name="reshttpsc"/>
</log>
</default>
</switch>

<send/>
</faultSequence>
</resource>
</api>


wso2 configuration process with to send the response is other than 200 response code
reportsendpoint:



    <?xml version="1.0" encoding="UTF-8"?>
<endpoint name="reporsendpoint" xmlns="http://ws.apache.org/ns/synapse">
<http method="get" uri-template="http://localhost:6547/generatereports/1.0/Reports/{uri.var.dcuid}/{uri.var.vcid}"/>
</endpoint>






wso2 wso2esb wso2carbon






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 '18 at 18:25









James Z

11.2k71935




11.2k71935










asked Nov 27 '18 at 17:41









Aisha VarunAisha Varun

11




11













  • Can you please explain "but not passing" part?

    – Bee
    Nov 28 '18 at 6:23











  • localhost:6547/generatereports/1.0/Reports/dcuid/vcid this urls configuraterate.passing dynamic with dcuid and vcid if you have any process with to send the response is other than 200 response code @ Bee

    – Aisha Varun
    Nov 28 '18 at 9:34













  • Sorry, still not clear.

    – Bee
    Nov 28 '18 at 9:44











  • this service url working fine getting data to send the response 200 if you have service not working or any internal server error to send the mail another response with client @Bee

    – Aisha Varun
    Nov 28 '18 at 9:56













  • ok. so you want to send a different response (or log?) if the status code is not 200? If the answer is yes, what's the title of the question about?

    – Bee
    Nov 28 '18 at 10:06



















  • Can you please explain "but not passing" part?

    – Bee
    Nov 28 '18 at 6:23











  • localhost:6547/generatereports/1.0/Reports/dcuid/vcid this urls configuraterate.passing dynamic with dcuid and vcid if you have any process with to send the response is other than 200 response code @ Bee

    – Aisha Varun
    Nov 28 '18 at 9:34













  • Sorry, still not clear.

    – Bee
    Nov 28 '18 at 9:44











  • this service url working fine getting data to send the response 200 if you have service not working or any internal server error to send the mail another response with client @Bee

    – Aisha Varun
    Nov 28 '18 at 9:56













  • ok. so you want to send a different response (or log?) if the status code is not 200? If the answer is yes, what's the title of the question about?

    – Bee
    Nov 28 '18 at 10:06

















Can you please explain "but not passing" part?

– Bee
Nov 28 '18 at 6:23





Can you please explain "but not passing" part?

– Bee
Nov 28 '18 at 6:23













localhost:6547/generatereports/1.0/Reports/dcuid/vcid this urls configuraterate.passing dynamic with dcuid and vcid if you have any process with to send the response is other than 200 response code @ Bee

– Aisha Varun
Nov 28 '18 at 9:34







localhost:6547/generatereports/1.0/Reports/dcuid/vcid this urls configuraterate.passing dynamic with dcuid and vcid if you have any process with to send the response is other than 200 response code @ Bee

– Aisha Varun
Nov 28 '18 at 9:34















Sorry, still not clear.

– Bee
Nov 28 '18 at 9:44





Sorry, still not clear.

– Bee
Nov 28 '18 at 9:44













this service url working fine getting data to send the response 200 if you have service not working or any internal server error to send the mail another response with client @Bee

– Aisha Varun
Nov 28 '18 at 9:56







this service url working fine getting data to send the response 200 if you have service not working or any internal server error to send the mail another response with client @Bee

– Aisha Varun
Nov 28 '18 at 9:56















ok. so you want to send a different response (or log?) if the status code is not 200? If the answer is yes, what's the title of the question about?

– Bee
Nov 28 '18 at 10:06





ok. so you want to send a different response (or log?) if the status code is not 200? If the answer is yes, what's the title of the question about?

– Bee
Nov 28 '18 at 10:06












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53505268%2fwso2-how-to-pass-two-parameters-at-a-time-with-wso2-esb-configuration%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53505268%2fwso2-how-to-pass-two-parameters-at-a-time-with-wso2-esb-configuration%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Contact image not getting when fetch all contact list from iPhone by CNContact

count number of partitions of a set with n elements into k subsets

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks