I am using BigQuery Connector V1.0.9 to work with DataSet,TableData etc in WSO2 EI 6.5.0
.
OAuth
Credentials like ClientID,ClientSec,AccessToken,RefreshToken
etcbigquery.init
Operation to establish the connectivity.init
operation there is some file created under registry
to store AccessToken
Valuebigquery.init - Code:
<!-- Reading BigQuery Credentials -->
<sequence description="Load Configurations" key="Get_BigQuery_Credentials"/>
<!-- Establish BigQuery Connectivity -->
<bigquery.init>
<apiUrl>{$ctx:apiUrl}</apiUrl>
<accessToken>{$ctx:accessToken}</accessToken>
<clientId>{$ctx:clientId}</clientId>
<clientSecret>{$ctx:clientSecret}</clientSecret>
<refreshToken>{$ctx:refreshToken}</refreshToken>
<registryPath>{$ctx:registryPath}</registryPath>
</bigquery.init>
<log level="full"/>
WireLog:
[2023-03-09 17:11:57,785] [] INFO - LogMediator *********BigQueryAPI - OAuth = is called **********
[2023-03-09 17:11:57,788] [] INFO - DependencyTracker Local entry : Connector/BigQIntegwso2/ was added to the Synapse configuration successfully
[2023-03-09 17:11:58,248] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 << "GET /oauth2/v1/tokeninfo?access_token=ya29.XXXXXX HTTP/1.1[\r][\n]"
[2023-03-09 17:11:58,249] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 << "activityid: 3404708f-5eb0-459d-ad1b-b376ddbc4059[\r][\n]"[2023-03-09 17:11:58,249] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 << "Accept: */*[\r][\n]"
[2023-03-09 17:11:58,249] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 << "Cache-Control: no-cache[\r][\n]"
[2023-03-09 17:11:58,250] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 << "Postman-Token: 238c81f0-ca8d-4577-912e-d30116589a73[\r][\n]"
[2023-03-09 17:11:58,250] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 << "Accept-Encoding: gzip, deflate, br[\r][\n]"
[2023-03-09 17:11:58,250] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 << "Content-Type: application/json[\r][\n]"
[2023-03-09 17:11:58,250] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 << "Host: www.googleapis.com[\r][\n]"
[2023-03-09 17:11:58,250] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 << "Connection: Keep-Alive[\r][\n]"
[2023-03-09 17:11:58,250] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"
[2023-03-09 17:11:58,251] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 << "[\r][\n]"
[2023-03-09 17:11:58,355] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "HTTP/1.1 400 Bad Request[\r][\n]"
[2023-03-09 17:11:58,355] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "Pragma: no-cache[\r][\n]"
[2023-03-09 17:11:58,355] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "Date: Thu, 09 Mar 2023 11:41:57 GMT[\r][\n]"
[2023-03-09 17:11:58,355] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "Expires: Mon, 01 Jan 1990 00:00:00 GMT[\r][\n]"
[2023-03-09 17:11:58,356] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "Cache-Control: no-cache, no-store, max-age=0, must-revalidate[\r][\n]"
[2023-03-09 17:11:58,356] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "Content-Type: application/json; charset=UTF-8[\r][\n]"
[2023-03-09 17:11:58,356] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "Vary: Origin[\r][\n]"
[2023-03-09 17:11:58,356] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "Vary: X-Origin[\r][\n]"
[2023-03-09 17:11:58,356] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "Vary: Referer[\r][\n]"
[2023-03-09 17:11:58,356] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "Content-Encoding: gzip[\r][\n]"
[2023-03-09 17:11:58,357] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "Server: ESF[\r][\n]"
[2023-03-09 17:11:58,357] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "X-XSS-Protection: 0[\r][\n]"
[2023-03-09 17:11:58,357] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "X-Frame-Options: SAMEORIGIN[\r][\n]"
[2023-03-09 17:11:58,357] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "X-Content-Type-Options: nosniff[\r][\n]"
[2023-03-09 17:11:58,357] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000[\r][\n]"
[2023-03-09 17:11:58,357] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "Transfer-Encoding: chunked[\r][\n]"
[2023-03-09 17:11:58,357] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[\r][\n]"
[2023-03-09 17:11:58,358] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,358] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[0x1f][\r][\n]"
[2023-03-09 17:11:58,358] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,358] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[0x8b][\r][\n]"
[2023-03-09 17:11:58,358] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,358] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[0x8][\r][\n]"
[2023-03-09 17:11:58,359] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,359] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[0x0][\r][\n]"
[2023-03-09 17:11:58,359] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,360] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[0x0][\r][\n]"
[2023-03-09 17:11:58,360] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,360] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[0x0][\r][\n]"
[2023-03-09 17:11:58,360] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,361] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[0x0][\r][\n]"
[2023-03-09 17:11:58,361] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,361] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[0x0][\r][\n]"
[2023-03-09 17:11:58,361] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,361] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[0x2][\r][\n]"
[2023-03-09 17:11:58,361] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,362] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[0xff][\r][\n]"
[2023-03-09 17:11:58,362] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,362] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[0xab][\r][\n]"
[2023-03-09 17:11:58,362] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,362] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[0xe6][\r][\n]"
[2023-03-09 17:11:58,362] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,362] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "R[\r][\n]"
[2023-03-09 17:11:58,363] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,363] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "P[\r][\n]"
[2023-03-09 17:11:58,363] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,364] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "P[\r][\n]"
[2023-03-09 17:11:58,364] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,364] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "J[\r][\n]"
[2023-03-09 17:11:58,364] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "00000001[\r][\n]"
[2023-03-09 17:11:58,364] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "-[\r][\n]"
[2023-03-09 17:11:58,365] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "0000001[\r][\n]"
[2023-03-09 17:11:58,365] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "*[\r][\n]"
[2023-03-09 17:11:58,365] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "3c[\r][\n]"
[2023-03-09 17:11:58,365] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[0xca]/R[0xb2]RP[0xca][0xcc]+K[0xcc][0xc9]L[0x89]/[0xc9][0xcf]N[0xcd]S[0xd2][0x81][0xcb][0xc5][0xa7][0xa4][0x16]'[0x17]e[0x16][0x94]d[0xe6][0xe7][0x81][0xd4]yB[0xd4])[0x84]%[0xe6][0x94][0xa6]*q[0xd5]r[0x1][0x0][0x92]_[0xb][0xd2]G[0x0][0x0][0x0][\r][\n]"
[2023-03-09 17:11:58,365] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "0[\r][\n]"
[2023-03-09 17:11:58,366] [] DEBUG - wire HTTPS-Sender I/O dispatcher-6 >> "[\r][\n]"
[2023-03-09 17:11:58,737] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "POST /oauth2/v3/token HTTP/1.1[\r][\n]"
[2023-03-09 17:11:58,738] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "X-Frame-Options: SAMEORIGIN[\r][\n]"
[2023-03-09 17:11:58,738] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000[\r][\n]"
[2023-03-09 17:11:58,738] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "Cache-Control: no-cache, no-store, max-age=0, must-revalidate[\r][\n]"
[2023-03-09 17:11:58,738] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "X-Content-Type-Options: nosniff[\r][\n]"
[2023-03-09 17:11:58,738] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "Content-Encoding: gzip[\r][\n]"
[2023-03-09 17:11:58,738] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "Vary: Origin[\r][\n]"
[2023-03-09 17:11:58,739] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "Vary: X-Origin[\r][\n]"
[2023-03-09 17:11:58,739] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "Vary: Referer[\r][\n]"
[2023-03-09 17:11:58,739] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "Expires: Mon, 01 Jan 1990 00:00:00 GMT[\r][\n]"
[2023-03-09 17:11:58,739] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "Pragma: no-cache[\r][\n]"
[2023-03-09 17:11:58,739] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "X-XSS-Protection: 0[\r][\n]"
[2023-03-09 17:11:58,740] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "Content-Type: application/x-www-form-urlencoded[\r][\n]"
[2023-03-09 17:11:58,740] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "Transfer-Encoding: chunked[\r][\n]"
[2023-03-09 17:11:58,740] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "Host: bigquery.googleapis.com[\r][\n]"
[2023-03-09 17:11:58,740] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "Connection: Keep-Alive[\r][\n]"
[2023-03-09 17:11:58,740] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"
[2023-03-09 17:11:58,741] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "[\r][\n]"
[2023-03-09 17:11:58,741] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "ff[\r][\n]"
[2023-03-09 17:11:58,741] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "[0x1f][0x8b][0x8][0x0][0x0][0x0][0x0][0x0][0x0][0x0]M[0x8e][0xbb]n[0x83]0[0x0]E[0xbf][0xa6][0xd9]@$`[0x1e][0x3][0x3][0xb8][0x1][0xd2]B qS[0xc1][0x84][0xc0][0x18]b[0xa0][0xd8]1[0x8f][0x88]|}Y*U[0xba][0xdb][0xd1]9[0xba][0x82][0xd4][0x82][0x8c][0xf7]|b[0x1d][0x19][0xec][0xfd][0xdb][0xc1][0xdb][0xa6]TF[0x90][0xbc][0xb7]H[\r][0xca]+[0x82]Mvr[0xae][0x8e][0xe3];[\n]"
[2023-03-09 17:11:58,741] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << ":?=)[0xb4]Nb[0x8c].[0x91][0xb][0xe1][0xd7][0xfa][0xca]W'E[0xd8][\r][0xc2]g[0xde][0xb9][0x91]0[0x88][0xee]~.C[0x1e]'[0xad][0xc5][0xea]c[0xd1])[0x10][0x9a][0xe0][0xbe]f[0xe1][0x7][0xf7].[0x12][0x2][0xc9]7[0x4][0x98]GY[0xb3]kD1L[0xf9][0xb4]rb[0x8b][0xff]'v[0xb8][0xa7]d##[0xc1][0x82]L[0xb6][0x1f]C[0x94][0xa4][0x92][0x1b][0xd3][0xe5][0xc6]5[0xea][0xd7]^Y=[0x8e]:[0xa2]Io[0xf0][0xdb]9K[0x15][0xfd][0xcf][0xa0][0x95][0xad][0xee][\r][0xd3][0x4][0xaa]u[0x0]@[0x93]*Pj3e[0x1d][0xc0][0x7][0xfe][0xd0]g[0xc1][0x16]R3[0xa0][0xf3]A[0xd1]Z[0xa0][0xea][0x86]\p>[0xca][\r]cMO[0xe6][0x91][0x8][0xcc][0x86]i[0xeb][0xc8][0x98][0xfd][0xfc][0x2][0xc2][0xf9][0xbd][[0x17][0x1][0x0][0x0][\r][\n]"
[2023-03-09 17:11:58,741] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "0[\r][\n]"
[2023-03-09 17:11:58,741] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 << "[\r][\n]"
[2023-03-09 17:11:58,898] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> "HTTP/1.1 404 Not Found[\r][\n]"
[2023-03-09 17:11:58,898] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> "Content-Type: text/html; charset=UTF-8[\r][\n]"
[2023-03-09 17:11:58,899] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> "Referrer-Policy: no-referrer[\r][\n]"
[2023-03-09 17:11:58,899] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> "Content-Length: 1576[\r][\n]"
[2023-03-09 17:11:58,899] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> "Date: Thu, 09 Mar 2023 11:41:58 GMT[\r][\n]"
[2023-03-09 17:11:58,899] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> "Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000[\r][\n]"
[2023-03-09 17:11:58,899] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> "Connection: close[\r][\n]"
[2023-03-09 17:11:58,900] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> "[\r][\n]"
[2023-03-09 17:11:58,900] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> "<!DOCTYPE html>[\n]"
[2023-03-09 17:11:58,900] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> "<html lang=en>[\n]"
[2023-03-09 17:11:58,900] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> " <meta charset=utf-8>[\n]"
[2023-03-09 17:11:58,900] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> " <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">[\n]"
[2023-03-09 17:11:58,900] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> " <title>Error 404 (Not Found)!!1</title>[\n]"
[2023-03-09 17:11:58,901] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> " <style>[\n]"
[2023-03-09 17:11:58,901] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> " *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min"
[2023-03-09 17:11:58,902] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> "-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}[\n]"
[2023-03-09 17:11:58,906] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> " </style>[\n]"
[2023-03-09 17:11:58,906] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> " <a href=//www.google.com/><span id=logo aria-label=Google></span></a>[\n]"
[2023-03-09 17:11:58,907] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> " <p><b>404.</b> <ins>That[0xe2][0x80][0x99]s an error.</ins>[\n]"
[2023-03-09 17:11:58,907] [] DEBUG - wire HTTPS-Sender I/O dispatcher-7 >> " <p>The requested URL <code>/oauth2/v3/token</code> was not found on this server. <ins>That[0xe2][0x80][0x99]s all we know.</ins>[\n]"
[2023-03-09 17:11:58,908] [] ERROR - RelayUtils Error while building Passthrough stream
org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: DOCTYPE is not allowed
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:109)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:570)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:566)
at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:165)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:168)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:121)
at org.apache.synapse.mediators.AbstractListMediator.buildMessage(AbstractListMediator.java:146)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:95)
at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:171)
at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:242)
at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:242)
at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:242)
at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:179)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:805)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:303)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:578)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:195)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:265)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.stream.XMLStreamException: DOCTYPE is not allowed
at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:36)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
... 24 more
[2023-03-09 17:11:58,916] [] ERROR - TemplateMediator Error while building message. Error while building Passthrough stream
org.apache.axis2.AxisFault: Error while building Passthrough stream
Accesstoken
Expired and noticed HTTP/1.1 400 Bad Request
ERROR in above shared Wirelog.refreshToken
in init
Operation, why that accesstoken expired? The main purpose of refresh token is to refresh/regenerate the access token when it expires to make it alive. Correct me if i'm wrong.I need to manually generate credentials again and update in WSO2 API also. How can we avoid this situation?
PS: Worked with Gmail/Outlook Connector where simlar set of token param are used , this kinda ERROR not happened frequently. But with BigQuery Connector expired every an hour.
Kindly suggest some better way to handle this situation?
Your token endpoint seems Wrong. Shouldn't it be https://www.googleapis.com/oauth2/v4/token
So change your apiUrl to https://www.googleapis.com
.
Following is a sample dataset.
{
"accessToken": "ya29.BwKYx40Dith1DFQBDjZOHNqhcxmKs9zbkjAWQa1q8mdMFndp2-q8ifG66fwprOigRwKSNw",
"apiUrl": "https://www.googleapis.com",
"clientId": "504627865627-kdni8r2s10sjddfgXzqb4bvnba.apps.googleusercontent.com",
"clientSecret": "ChlbHI_T7zssXXTRYuqj_-TM",
"refreshToken": "1/uWful-diQNAdk-alDUa6ixxxxxxxx-LpJIikEQ2sqA",
"registryPath": "connectors/bq",
"projectId": "publicdata",
"datasetId": "samples",
"fields": "id",
"callback": "callBackFunction",
"apiKey": "154987fd5h4x6gh4",
"prettyPrint": "true",
"quotaUser": "1hx46f5g4h5ghx6h41x54gh6f4hx",
"userIp": "192.77.88.12",
"ifNoneMatch":"hnk59tKBkX8cdlePZ8VtzgVzuO4/tS1oqpXxnkU21hZeK5k4lqRrRr8",
"ifMatch":"hnk59tKBkX8cdlePZ8VtzgVzuO4/tS1oqpXxnkU21hZeK5k4lqRrRr8"
}
Take a look at this document as well.