我仍然是ESB的新手,我的第一个开始是WSO2。我正在浏览网站上的教程,我能够正确设置它。现在我的问题是我如何使用curl向ESB服务器而不是Apache ant发出请求。
我要发送的请求是用蚂蚁写的,目前工作正常。
ant stockquoat -Dtrpurl=http://localhost:8280/services/StockQuoatProxy -Dmode=quoat -Dsymbol=IBM
根据我的经验,我知道-D选项用于传递参数。
那么我如何在卷曲中传递这个
答案 0 :(得分:0)
curl命令
curl --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction:urn:getQuote" --data @request.xml http://localhost:8280/services/StockQuoatProxy
request.xml文件应包含此有效负载
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:MessageID>urn:uuid:aff28543-56ba-4aef-982a-f74a685d777d</wsa:MessageID><wsa:Action>urn:getQuote</wsa:Action></soapenv:Header><soapenv:Body><m0:getQuote xmlns:m0="http://services.samples"><m0:request><m0:symbol>IBM</m0:symbol></m0:request></m0:getQuote></soapenv:Body></soapenv:Envelope>