Hi, I'm working on an offsite dev service for Ally Financial and encountered the following issue. I'm using ESB 4.8.1 and IS 5.0.0 I have successfully used the DBReport and DBLookup mediators (*inside main sequence [3]*) in combination with my local MySQL database as per [1].
But when I attempt the same scenario inside a OAuth secured RESTful API [4], I'm getting the following error [5]. [2015-04-16 12:47:21,481] DEBUG - wire << "<faultstring>The *endpoint reference (EPR) for the Operation not found* is /services/SimpleStockQuoteService?symbol=WSO2 and the *WSA Action = null.* If this EPR was previously reachable, please contact the server administrator.</faultstring>[\r][\n]" I have verified that the OAuth functionality is working as expected [5]. I have also found this issue [2] already reported in JIRA. Is there any workaround or a patch created that can be applied to ESB 4.8.1? [1] https://docs.wso2.com/display/ESB481/Sample+362%3A+DBReport+and+DBLookup+Mediators+Together [2] https://wso2.org/jira/browse/ESBJAVA-2750 [3] working main sequence <sequence name="main"> <in> <send> <endpoint> <address uri=" http://localhost:9000/services/SimpleStockQuoteService"/> </endpoint> </send> </in> <out> <log level="custom"> <property name="text" value="** Reporting to the Database **"/> </log> <dbreport> <connection> <pool> <password>user123</password> <user>user</user> <url>jdbc:mysql://localhost/ESB_SP_SAMPLE</url> <driver>com.mysql.jdbc.Driver</driver> </pool> </connection> <statement> <sql>call updateCompany(?,?)</sql> <parameter xmlns:m1="http://services.samples/xsd" xmlns:m0="http://services.samples" expression="//m0:return/m1:last/child::text()" type="DOUBLE"/> <parameter xmlns:m1="http://services.samples/xsd" xmlns:m0="http://services.samples" expression="//m0:return/m1:symbol/child::text()" type="VARCHAR"/> </statement> </dbreport> <log level="custom"> <property name="text" value="** Looking up from the Database **"/> </log> <dblookup> <connection> <pool> <password>user123</password> <user>user</user> <url>jdbc:mysql://localhost/ESB_SP_SAMPLE</url> <driver>com.mysql.jdbc.Driver</driver> </pool> </connection> <statement> <sql>call getCompany(?)</sql> <parameter xmlns:m1="http://services.samples/xsd" xmlns:m0="http://services.samples" expression="//m0:return/m1:symbol/child::text()" type="VARCHAR"/> <result name="stock_prize" column="price"/> </statement> </dblookup> <log level="custom"> <property name="text" expression="fn:concat('Stock Prize - ',get-property('stock_prize'))"/> </log> <send/> </out> </sequence> command: ant stockquote -Daddurl= http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl= http://localhost:8280/ -Dsymbol=WSO2 [4] API created <api name="updateStockPriceAPI" context="/update"> <resource methods="GET"> <inSequence> <log level="full" description="Outgoing"> <property name="STATUS" value="***** REQUEST HITS updateStockPriceAPI IN SEQUENCE *****"/> <property name="Symbol" expression="$ctx:query.param.symbol"/> </log> <property name="SOAPAction" value="urn:getQuote" scope="transport"/> <send> <endpoint> <http method="get" uri-template=" http://localhost:9000/services/SimpleStockQuoteService?symbol={query.param.symbol} "/> </endpoint> </send> </inSequence> <outSequence> <log description="Incoming"> <property name="Text" value="** Reporting to the Database **"/> </log> <dbreport> <connection> <pool> <password>user123</password> <user>user</user> <url>jdbc:mysql://localhost/ESB_SP_SAMPLE</url> <driver>com.mysql.jdbc.Driver</driver> </pool> </connection> <statement> <sql>call updateCompany(?,?)</sql> <parameter xmlns:m1="http://services.samples/xsd" xmlns:m0="http://services.samples" expression="//m0:return/m1:last/child::text()" type="DOUBLE"/> <parameter xmlns:m1="http://services.samples/xsd" xmlns:m0="http://services.samples" expression="//m0:return/m1:symbol/child::text()" type="VARCHAR"/> </statement> </dbreport> <log level="custom"> <property name="text" value="** Looking up from the Database **"/> </log> <dblookup> <connection> <pool> <password>user123</password> <user>user</user> <url>jdbc:mysql://localhost/ESB_SP_SAMPLE</url> <driver>com.mysql.jdbc.Driver</driver> </pool> </connection> <statement> <sql>call getCompany(?)</sql> <parameter xmlns:m1="http://services.samples/xsd" xmlns:m0="http://services.samples" expression="//m0:return/m1:symbol/child::text()" type="VARCHAR"/> <result name="stock_prize" column="price"/> </statement> </dblookup> <log level="custom"> <property name="text" expression="fn:concat('Stock Prize - ',get-property('stock_prize'))"/> </log> <send/> </outSequence> </resource> <handlers> <handler class="org.wso2.handler.SimpleOauthHandler"/> </handlers> </api> command: curl -v -X GET -H "Authorization: Bearer 7f57807ed7e0bad2de5182b104b65f6" http://localhost:8280/update?symbol=WSO2 [5] ESB Wire log [2015-04-16 12:47:21,408] DEBUG - wire >> "GET /update?symbol=WSO2 HTTP/1.1[\r][\n]" [2015-04-16 12:47:21,408] DEBUG - wire >> "User-Agent: curl/7.37.1[\r][\n]" [2015-04-16 12:47:21,408] DEBUG - wire >> "Host: localhost:8280[\r][\n]" [2015-04-16 12:47:21,408] DEBUG - wire >> "Accept: */*[\r][\n]" [2015-04-16 12:47:21,408] DEBUG - wire >> "*Authorization*: *Bearer* *7f57807ed7e0bad2de5182b104b65f6*[\r][\n]" [2015-04-16 12:47:21,408] DEBUG - wire >> "[\r][\n]" [2015-04-16 12:47:21,434] INFO - LogMediator To: /update?symbol=WSO2, MessageID: urn:uuid:e326e3fd-ec3d-4d7e-b8ac-fd6368cceb6d, Direction: request, STATUS = ***** REQUEST HITS updateStockPriceAPI IN SEQUENCE *****, Symbol = WSO2, Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv=" http://www.w3.org/2003/05/soap-envelope "><soapenv:Body></soapenv:Body></soapenv:Envelope> [2015-04-16 12:47:21,441] DEBUG - wire << "GET /services/SimpleStockQuoteService?symbol=WSO2 HTTP/1.1[\r][\n]" [2015-04-16 12:47:21,441] DEBUG - wire << "Authorization: Bearer 7f57807ed7e0bad2de5182b104b65f6[\r][\n]" [2015-04-16 12:47:21,442] DEBUG - wire << "SOAPAction: urn:getQuote[\r][\n]" [2015-04-16 12:47:21,442] DEBUG - wire << "Accept: */*[\r][\n]" [2015-04-16 12:47:21,442] DEBUG - wire << "Host: localhost:9000[\r][\n]" [2015-04-16 12:47:21,442] DEBUG - wire << "Connection: Keep-Alive[\r][\n]" [2015-04-16 12:47:21,442] DEBUG - wire << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" [2015-04-16 12:47:21,442] DEBUG - wire << "[\r][\n]" [2015-04-16 12:47:21,446] DEBUG - wire >> "HTTP/1.1 500 Internal Server Error[\r][\n]" [2015-04-16 12:47:21,446] DEBUG - wire >> "Content-Type: application/xml; charset=UTF-8[\r][\n]" [2015-04-16 12:47:21,446] DEBUG - wire >> "Date: Thu, 16 Apr 2015 07:17:21 GMT[\r][\n]" [2015-04-16 12:47:21,446] DEBUG - wire >> "Transfer-Encoding: chunked[\r][\n]" [2015-04-16 12:47:21,446] DEBUG - wire >> "Connection: Keep-Alive[\r][\n]" [2015-04-16 12:47:21,446] DEBUG - wire >> "[\r][\n]" [2015-04-16 12:47:21,447] DEBUG - wire >> "d[\r][\n]" [2015-04-16 12:47:21,447] DEBUG - wire >> "<faultstring>[\r][\n]" [2015-04-16 12:47:21,447] DEBUG - wire >> "e1[\r][\n]" [2015-04-16 12:47:21,447] DEBUG - wire >> "The endpoint reference (EPR) for the Operation not found is /services/SimpleStockQuoteService?symbol=WSO2 and the WSA Action = null. If this EPR was previously reachable, please contact the server administrator.</faultstring>[\r][\n]" [2015-04-16 12:47:21,447] DEBUG - wire >> "0[\r][\n]" [2015-04-16 12:47:21,447] DEBUG - wire >> "[\r][\n]" [2015-04-16 12:47:21,448] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:1d470875-da16-49d0-9a93-dff0c4b8c351, Direction: response, Text = ** Reporting to the Database ** [2015-04-16 12:47:21,466] INFO - LogMediator text = ** Looking up from the Database ** [2015-04-16 12:47:21,479] INFO - LogMediator text = Stock Prize - [2015-04-16 12:47:21,480] DEBUG - wire << "HTTP/1.1 500 Internal Server Error[\r][\n]" [2015-04-16 12:47:21,480] DEBUG - wire << "Content-Type: application/xml; charset=UTF-8[\r][\n]" [2015-04-16 12:47:21,480] DEBUG - wire << "Date: Thu, 16 Apr 2015 07:17:21 GMT[\r][\n]" [2015-04-16 12:47:21,480] DEBUG - wire << "Server: WSO2-PassThrough-HTTP[\r][\n]" [2015-04-16 12:47:21,480] DEBUG - wire << "Transfer-Encoding: chunked[\r][\n]" [2015-04-16 12:47:21,480] DEBUG - wire << "[\r][\n]" [2015-04-16 12:47:21,480] DEBUG - wire << "ee[\r][\n]" [2015-04-16 12:47:21,481] DEBUG - wire << "<faultstring>The endpoint reference (EPR) for the Operation not found is /services/SimpleStockQuoteService?symbol=WSO2 and the WSA Action = null. If this EPR was previously reachable, please contact the server administrator.</faultstring>[\r][\n]" [2015-04-16 12:47:21,481] DEBUG - wire << "0[\r][\n]" [2015-04-16 12:47:21,481] DEBUG - wire << "[\r][\n]" Thanks, Suhan -- Suhan Dharmasuriya Software Engineer - Test Automation *WSO2, Inc. * lean . enterprise . middleware Tel: +94 112 145345 Mob: +94 779 869138 Blog: http://suhan-opensource.blogspot.com/
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
