Mule http request giving 404 mapped as failure
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I am trying to pass the multiple URI params in the http request as follows:
<http:listener-config name="HTTP_Listener_Configuration"
host="localhost" port="8081" doc:name="HTTP Listener Configuration"
connectionIdleTimeout="40000" />
<http:request-config name="HTTP_Request_Configuration1" protocol="HTTPS" host="" port="443" doc:name="HTTP Request Configuration" connectionIdleTimeout="300000" responseTimeout="50000">
<http:basic-authentication username="user" password="123"/>
</http:request-config>
<flow name="testFlow">
<http:listener config-ref="HTTP_Listener_Configuration"
path="/paypal" allowedMethods="GET" doc:name="HTTP" />
<set-variable variableName="config" value="#[{'p1':'3054', 'p2':'child/Lines'}]" doc:name="Variable"/>
<http:request config-ref="HTTP_Request_Configuration1" path="/resources/shipment/{p1}/{p2}" method="GET" doc:name="HTTP">
<http:request-builder>
<http:uri-params expression="#[flowVars.config]"/>
</http:request-builder>
</http:request>
</flow>
But this is giving me error as below:
Response code 404 mapped as failure.
ERROR 2019-01-04 18:46:34,526
[[paypaltest].HTTP_Listener_Configuration.worker.01]
org.mule.exception.DefaultMessagingExceptionStrategy:
********************************************************************************
Message : Response code 404 mapped as failure.
Payload : org.glassfish.grizzly.utils.BufferInputStream@b473ec2
Element : /testFlow/processors/1 @ test:test.xml:29 (HTTP)
Element XML : <http:request config-ref="HTTP_Request_Configuration1" path="/resources/shipments/{p1}/{p2}" method="GET" doc:name="HTTP">
<http:request-builder>
<http:uri-params expression="#[flowVars.config]"></http:uri-params>
</http:request-builder>
</http:request>
--------------------------------------------------------------------------------
Root Exception stack trace:
org.mule.module.http.internal.request.ResponseValidatorException: Response code 404 mapped as failure.
Please let me know if any help can be provide!
mule mule-studio mule-component mule-esb
add a comment |
I am trying to pass the multiple URI params in the http request as follows:
<http:listener-config name="HTTP_Listener_Configuration"
host="localhost" port="8081" doc:name="HTTP Listener Configuration"
connectionIdleTimeout="40000" />
<http:request-config name="HTTP_Request_Configuration1" protocol="HTTPS" host="" port="443" doc:name="HTTP Request Configuration" connectionIdleTimeout="300000" responseTimeout="50000">
<http:basic-authentication username="user" password="123"/>
</http:request-config>
<flow name="testFlow">
<http:listener config-ref="HTTP_Listener_Configuration"
path="/paypal" allowedMethods="GET" doc:name="HTTP" />
<set-variable variableName="config" value="#[{'p1':'3054', 'p2':'child/Lines'}]" doc:name="Variable"/>
<http:request config-ref="HTTP_Request_Configuration1" path="/resources/shipment/{p1}/{p2}" method="GET" doc:name="HTTP">
<http:request-builder>
<http:uri-params expression="#[flowVars.config]"/>
</http:request-builder>
</http:request>
</flow>
But this is giving me error as below:
Response code 404 mapped as failure.
ERROR 2019-01-04 18:46:34,526
[[paypaltest].HTTP_Listener_Configuration.worker.01]
org.mule.exception.DefaultMessagingExceptionStrategy:
********************************************************************************
Message : Response code 404 mapped as failure.
Payload : org.glassfish.grizzly.utils.BufferInputStream@b473ec2
Element : /testFlow/processors/1 @ test:test.xml:29 (HTTP)
Element XML : <http:request config-ref="HTTP_Request_Configuration1" path="/resources/shipments/{p1}/{p2}" method="GET" doc:name="HTTP">
<http:request-builder>
<http:uri-params expression="#[flowVars.config]"></http:uri-params>
</http:request-builder>
</http:request>
--------------------------------------------------------------------------------
Root Exception stack trace:
org.mule.module.http.internal.request.ResponseValidatorException: Response code 404 mapped as failure.
Please let me know if any help can be provide!
mule mule-studio mule-component mule-esb
add a comment |
I am trying to pass the multiple URI params in the http request as follows:
<http:listener-config name="HTTP_Listener_Configuration"
host="localhost" port="8081" doc:name="HTTP Listener Configuration"
connectionIdleTimeout="40000" />
<http:request-config name="HTTP_Request_Configuration1" protocol="HTTPS" host="" port="443" doc:name="HTTP Request Configuration" connectionIdleTimeout="300000" responseTimeout="50000">
<http:basic-authentication username="user" password="123"/>
</http:request-config>
<flow name="testFlow">
<http:listener config-ref="HTTP_Listener_Configuration"
path="/paypal" allowedMethods="GET" doc:name="HTTP" />
<set-variable variableName="config" value="#[{'p1':'3054', 'p2':'child/Lines'}]" doc:name="Variable"/>
<http:request config-ref="HTTP_Request_Configuration1" path="/resources/shipment/{p1}/{p2}" method="GET" doc:name="HTTP">
<http:request-builder>
<http:uri-params expression="#[flowVars.config]"/>
</http:request-builder>
</http:request>
</flow>
But this is giving me error as below:
Response code 404 mapped as failure.
ERROR 2019-01-04 18:46:34,526
[[paypaltest].HTTP_Listener_Configuration.worker.01]
org.mule.exception.DefaultMessagingExceptionStrategy:
********************************************************************************
Message : Response code 404 mapped as failure.
Payload : org.glassfish.grizzly.utils.BufferInputStream@b473ec2
Element : /testFlow/processors/1 @ test:test.xml:29 (HTTP)
Element XML : <http:request config-ref="HTTP_Request_Configuration1" path="/resources/shipments/{p1}/{p2}" method="GET" doc:name="HTTP">
<http:request-builder>
<http:uri-params expression="#[flowVars.config]"></http:uri-params>
</http:request-builder>
</http:request>
--------------------------------------------------------------------------------
Root Exception stack trace:
org.mule.module.http.internal.request.ResponseValidatorException: Response code 404 mapped as failure.
Please let me know if any help can be provide!
mule mule-studio mule-component mule-esb
I am trying to pass the multiple URI params in the http request as follows:
<http:listener-config name="HTTP_Listener_Configuration"
host="localhost" port="8081" doc:name="HTTP Listener Configuration"
connectionIdleTimeout="40000" />
<http:request-config name="HTTP_Request_Configuration1" protocol="HTTPS" host="" port="443" doc:name="HTTP Request Configuration" connectionIdleTimeout="300000" responseTimeout="50000">
<http:basic-authentication username="user" password="123"/>
</http:request-config>
<flow name="testFlow">
<http:listener config-ref="HTTP_Listener_Configuration"
path="/paypal" allowedMethods="GET" doc:name="HTTP" />
<set-variable variableName="config" value="#[{'p1':'3054', 'p2':'child/Lines'}]" doc:name="Variable"/>
<http:request config-ref="HTTP_Request_Configuration1" path="/resources/shipment/{p1}/{p2}" method="GET" doc:name="HTTP">
<http:request-builder>
<http:uri-params expression="#[flowVars.config]"/>
</http:request-builder>
</http:request>
</flow>
But this is giving me error as below:
Response code 404 mapped as failure.
ERROR 2019-01-04 18:46:34,526
[[paypaltest].HTTP_Listener_Configuration.worker.01]
org.mule.exception.DefaultMessagingExceptionStrategy:
********************************************************************************
Message : Response code 404 mapped as failure.
Payload : org.glassfish.grizzly.utils.BufferInputStream@b473ec2
Element : /testFlow/processors/1 @ test:test.xml:29 (HTTP)
Element XML : <http:request config-ref="HTTP_Request_Configuration1" path="/resources/shipments/{p1}/{p2}" method="GET" doc:name="HTTP">
<http:request-builder>
<http:uri-params expression="#[flowVars.config]"></http:uri-params>
</http:request-builder>
</http:request>
--------------------------------------------------------------------------------
Root Exception stack trace:
org.mule.module.http.internal.request.ResponseValidatorException: Response code 404 mapped as failure.
Please let me know if any help can be provide!
mule mule-studio mule-component mule-esb
mule mule-studio mule-component mule-esb
asked Jan 4 at 13:26
pulsepulse
93110
93110
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
It means that the url doesn't exist. Try to hit the url directly in postman before implementing in Mule. Since you wiped out the host="", I'll pretend it's example.com. My guess is that it's having an issue with p2. If you'd like to send the actual string, you'll need to URL encode the "/", which is %2F
So to test hit https://www.example.com/resources/shipments/3054/child%2FLines, with the Basic Auth for Authorization.
Postman: https://www.getpostman.com/apps
thanks..your guess is right as its working with one parameter i.e.p1
but as soon as i am implementingp2
its not working.. I tried your solution but its giving me same problem.
– pulse
Jan 7 at 5:36
add a comment |
The issue i faced was unique to me, i tried this REST api call from SOAPUI and there it gave me the same error i.e. 404 not found
so i compared it with POSTMAN request and found that Authorization
header was the missing piece for this.
After adding this to http header
it worked perfectly.
add a comment |
Please refer
https://docs.mulesoft.com/connectors/http/http-authentication
here are two solutions :
1. Add preemptive="true" in basic authentication configuration
The pre-emptive option passes the user name and password without waiting for a prompt from the server.
- Add Authorization in the http:header value ="Basic dXNlcjoxMjM="
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54039838%2fmule-http-request-giving-404-mapped-as-failure%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
It means that the url doesn't exist. Try to hit the url directly in postman before implementing in Mule. Since you wiped out the host="", I'll pretend it's example.com. My guess is that it's having an issue with p2. If you'd like to send the actual string, you'll need to URL encode the "/", which is %2F
So to test hit https://www.example.com/resources/shipments/3054/child%2FLines, with the Basic Auth for Authorization.
Postman: https://www.getpostman.com/apps
thanks..your guess is right as its working with one parameter i.e.p1
but as soon as i am implementingp2
its not working.. I tried your solution but its giving me same problem.
– pulse
Jan 7 at 5:36
add a comment |
It means that the url doesn't exist. Try to hit the url directly in postman before implementing in Mule. Since you wiped out the host="", I'll pretend it's example.com. My guess is that it's having an issue with p2. If you'd like to send the actual string, you'll need to URL encode the "/", which is %2F
So to test hit https://www.example.com/resources/shipments/3054/child%2FLines, with the Basic Auth for Authorization.
Postman: https://www.getpostman.com/apps
thanks..your guess is right as its working with one parameter i.e.p1
but as soon as i am implementingp2
its not working.. I tried your solution but its giving me same problem.
– pulse
Jan 7 at 5:36
add a comment |
It means that the url doesn't exist. Try to hit the url directly in postman before implementing in Mule. Since you wiped out the host="", I'll pretend it's example.com. My guess is that it's having an issue with p2. If you'd like to send the actual string, you'll need to URL encode the "/", which is %2F
So to test hit https://www.example.com/resources/shipments/3054/child%2FLines, with the Basic Auth for Authorization.
Postman: https://www.getpostman.com/apps
It means that the url doesn't exist. Try to hit the url directly in postman before implementing in Mule. Since you wiped out the host="", I'll pretend it's example.com. My guess is that it's having an issue with p2. If you'd like to send the actual string, you'll need to URL encode the "/", which is %2F
So to test hit https://www.example.com/resources/shipments/3054/child%2FLines, with the Basic Auth for Authorization.
Postman: https://www.getpostman.com/apps
answered Jan 4 at 13:50
utechtzsutechtzs
43519
43519
thanks..your guess is right as its working with one parameter i.e.p1
but as soon as i am implementingp2
its not working.. I tried your solution but its giving me same problem.
– pulse
Jan 7 at 5:36
add a comment |
thanks..your guess is right as its working with one parameter i.e.p1
but as soon as i am implementingp2
its not working.. I tried your solution but its giving me same problem.
– pulse
Jan 7 at 5:36
thanks..your guess is right as its working with one parameter i.e.
p1
but as soon as i am implementing p2
its not working.. I tried your solution but its giving me same problem.– pulse
Jan 7 at 5:36
thanks..your guess is right as its working with one parameter i.e.
p1
but as soon as i am implementing p2
its not working.. I tried your solution but its giving me same problem.– pulse
Jan 7 at 5:36
add a comment |
The issue i faced was unique to me, i tried this REST api call from SOAPUI and there it gave me the same error i.e. 404 not found
so i compared it with POSTMAN request and found that Authorization
header was the missing piece for this.
After adding this to http header
it worked perfectly.
add a comment |
The issue i faced was unique to me, i tried this REST api call from SOAPUI and there it gave me the same error i.e. 404 not found
so i compared it with POSTMAN request and found that Authorization
header was the missing piece for this.
After adding this to http header
it worked perfectly.
add a comment |
The issue i faced was unique to me, i tried this REST api call from SOAPUI and there it gave me the same error i.e. 404 not found
so i compared it with POSTMAN request and found that Authorization
header was the missing piece for this.
After adding this to http header
it worked perfectly.
The issue i faced was unique to me, i tried this REST api call from SOAPUI and there it gave me the same error i.e. 404 not found
so i compared it with POSTMAN request and found that Authorization
header was the missing piece for this.
After adding this to http header
it worked perfectly.
answered Jan 8 at 10:14
pulsepulse
93110
93110
add a comment |
add a comment |
Please refer
https://docs.mulesoft.com/connectors/http/http-authentication
here are two solutions :
1. Add preemptive="true" in basic authentication configuration
The pre-emptive option passes the user name and password without waiting for a prompt from the server.
- Add Authorization in the http:header value ="Basic dXNlcjoxMjM="
add a comment |
Please refer
https://docs.mulesoft.com/connectors/http/http-authentication
here are two solutions :
1. Add preemptive="true" in basic authentication configuration
The pre-emptive option passes the user name and password without waiting for a prompt from the server.
- Add Authorization in the http:header value ="Basic dXNlcjoxMjM="
add a comment |
Please refer
https://docs.mulesoft.com/connectors/http/http-authentication
here are two solutions :
1. Add preemptive="true" in basic authentication configuration
The pre-emptive option passes the user name and password without waiting for a prompt from the server.
- Add Authorization in the http:header value ="Basic dXNlcjoxMjM="
Please refer
https://docs.mulesoft.com/connectors/http/http-authentication
here are two solutions :
1. Add preemptive="true" in basic authentication configuration
The pre-emptive option passes the user name and password without waiting for a prompt from the server.
- Add Authorization in the http:header value ="Basic dXNlcjoxMjM="
answered Jan 9 at 6:37
Deepak BishtDeepak Bisht
163
163
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54039838%2fmule-http-request-giving-404-mapped-as-failure%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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