I have a SOAP web service and I can make an API call using below command. It works fine.
curl --user test:test123 --header "Content-Type: text/xml;charset=UTF-8" --data @checkPayment.xml http://192.168.100.10:8081/asywspay/WSDeclarationPayment
Above mentioned SOAP service is exposed via WSO2 API Manager 1.6 and the end-point is http://api.store.com:8280/WSDeclarationPayment/1.0.
Then I make an API call using below command.
curl --user test:test123 --header "Content-Type: text/xml;charset=UTF-8" --header "Authorization: Bearer 7bcc2235a6b0bebfbf4ff684f59f97a7" --data @checkPayment.xml http://api.store.com:8280/WSDeclarationPayment/1.0
It gives me error This request requires HTTP authentication
. Even though I pass the credentials using --user test:test123
via curl it's not passed through the API Manager.
Given that tried it this way as well.
curl --header "Content-Type: text/xml;charset=UTF-8" --header "Authorization: Bearer 7bcc2235a6b0bebfbf4ff684f59f97a7" --header "Authorization: Basic dGVzdDp0ZXN0MTIz" --data @checkPayment.xml http://api.store.com:8280/WSDeclarationPayment/1.0
Then I get error <faultcode>S:Client</faultcode><faultstring>Cannot find dispatch method for {
How can I fix this?