Federico
Federico

Reputation: 31

WSO2: External WS returning error 400 when invoked from WSO2 ESB

Hello: I am trying to hit an external WS from a WSO2 service. The remote service responds with error "400 Bad Request", but does not specifies what the problem is. Curious thing is that if I grab the same request that is sent through the ESB, and send it using cURL, everything works fine.

In case it makes a difference, I am using basic security with the credentials embedded in the message (I build the security header using javascript). I have tried adding and removing all SOAP headers I could find, nothing worked.

I am thinking that maybe the ESB is adding something to the message that I cannot see in the logs. Have anyone seen this?

I hope you can help me... please let me know if more information is needed. Thanks!

Upvotes: 2

Views: 946

Answers (3)

Federico
Federico

Reputation: 31

Just to get this closed, not that the answer is actually useful: our problem was that someone added a rule in the hosts configuration so that the external WS IP was being blocked from one of our ESB servers.

Upvotes: 1

Amila Maharachchi
Amila Maharachchi

Reputation: 2149

You can do the following to troubleshoot the issue. Most probably, this may be caused due to something added by the ESB when the request goes out to the backend. You can check the message and the header values going out and coming into the ESB by enabling wire logs.

See this blog post on how to do it. After that, you will be able to compare the headers and payload sent by the ESB and CURL.

Upvotes: 0

susankha
susankha

Reputation: 156

According to the provided information, you can use "Proxy-Authorization" property with Wso2 ESB proxy configuration to achieve your requirement. You can refer the sample configuration provided in the document [1] for more informations.

[1]- https://docs.wso2.com/display/ESB490/Enabling+HTTP+Basic+Authentication+through+a+Proxy+Server

Upvotes: 0

Related Questions