I am using the Java Adwords API. Is there a way that I can see what the SOAP request looks like that is being sent when I create an AdGroup (mutate)?
You can view the SOAP XML by enabling logging. The default soapXmlLogger is just configured to log errors, but you can change it from WARN to INFO if you want to see everything; for example:
log4j.category.com.google.api.ads.adwords.lib.client.AdWordsServiceClient.soapXmlLogger=INFO, SOAP_LOG, CONSOLE
with your user object - call -
$user->LogAll();
by default this will write to a file called soap_xml.log - you might need to create it or adjust the permissions to make sure it is writable by apache - but you should be able to see all the soap requests there.
Using log4j.xml, the following appender will remove soap request/response logs
<logger name="com.google.api.ads.adwords.lib.client.AdWordsServiceClient.soapXmlLogger" additivity="false">
<level value="error"/>
<appender-ref ref="<your-appender>"/>
</logger>
Related
I'm experimenting with ReactiveSearch and so far have tried the DataSearch and ResultList components. I'm looking over the required component to look at all the props and I see this
<ReactiveBase
app="appname"
credentials="abcdef123:abcdef12-ab12-ab12-ab12-abcdef123456"
headers={{
secret: 'reactivesearch-is-awesome'
}}
>
<Component1 .. />
<Component2 .. />
</ReactiveBase>
If the app is already secured using Appbaseio and the credentials gives my React app access to my ES cluster hosted there... what exactly could headers be used for? At first I thought username and password but you wouldn't do that.
What would be some of the scenarios where I SHOULD/COULD use the headers prop?
The headers are added to each request sent to the url. Normally you wouldn't need these. But in production you might want to add a layer of proxy server between your elasticsearch cluster and the client side ReactiveSearch code, this is where headers can be helpful.
You could add authentication in the flow. For example, you could restrict the elasticsearch calls to authenticated users by sending an access token via the headers prop and then verifying it at the proxy server (example of proxy server).
You could also implement some custom logic by adding custom headers and a logic to handle them at the proxy server.
We have an application that depends on ORN.
We want to have a health check endpoint for that application to know if it works fine and all its dependencies work fine.
In order to check if ORN is working, currently we are using:
https://support.something.com/cgi-bin/something.cfg/services/soap?wsdl
as health check endpoint for ORN. It works fine, but it's too big (1800 lines):
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright # 2009, 2017, Oracle and/or its affiliates. All rights reserved.
http://www.oracle.com
-->
<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
...
</wsdl:service>
</wsdl:definitions>
Is there another health check endpoint for ORN?
Ideally, I'd like something to have something like this:
https://support.something.com/cgi-bin/something.cfg/check
that returns just
OK
Are you actually trying to test the availability of the SOAP API, all APIs, the Customer Portal, or something else. Depending on your test, the answer will be different. APIs might be up while CP is down, or any potential combination of the distributed components of the platform.
For the SOAP API test that you have, rather than checking for WSDL availability, you could try one of the SOAP operations that returns fewer lines; a ROQL query would probably be a good choice.
The REST API would probably be the root "connect" path, which doesn't require authentication. https://my.osvc.site.com/services/rest/latest.
For Customer Portal, you could just hit the index/home page, which would tell you that CP is up.
Chat could use a REST/SOAP approach as mentioned above.
Email probably cannot be checked in any useful way in this manner.
Of course, you could implement a CP controller or custom script that acts as an API endpoint, but that is not a best practice and will probably not be a good longterm solution, even though such practices are commonplace in the SI space currently.
I am using Kaa client to pump data to Kaa server.
I want to fetch this data in order to showcase on a client application. With the use of Log Appenders, I am able to do so.
However, is it possible to do the same without adding any external db? I read in Kaa documentation that by default, Kaa stores data to MySQL (MaraidB / PostGre).
However, when I tried to access Mysql (which is part of Kaa Sandbox), I was unable to do so.
Can anyone tell how can we do this?
Yes, Kaa should be configured to append the gathered telemetry to some Log Appender (one can also create a Customer Log Appender with specific functionality if required) or even a set of Log Appenders - depending on the use case.
The easiest way is to configure one of the existing Log Appenders to log the data to e.g. Cassandra and then retrieve the data from there.
Should you need real time triggering of some actions depending on the data received from client(s), you would probably need to try developing a Custom Log Appender for that.
We need to have a external Log appender in order to log the data. The internal database takes care of Schema, event class families, Client/server profile info, notification info logging.
i would like to customize the view of the published Endpoint Page, that is generated by the cxf-plugin (http://localhost:8080/myApp/services). The display of the SOAP Endpoints should have the layout of the entire app as well as access is restricted by by spring security. My question is, how this is possible to accomplish?
My first idea would be to customize the output of this Servlet via CSS, but i'm struggling how to get this done. The problem here is, that authorization information seem to be a problem.
Another alternative would be to create my own controller and display the information in a customized fashion. The problem is here, that i'm not aware of the possibilities to get on the information about the endpoints, the WSDL documents and so on, that are published via the /services Servlet.
The third, but worst solution (at least from my perspective) could be to create my own controller, do a http get on /services, parse the html and extract the endpoint information via approach.
Perhaps anyone has done this already before and can give me a hint how to get the endpoint information into my controller.
Thanks for your help!
I'm wondering if anyone has any advice regarding using PhoneGap to send and receive information from a web server. Is there a standard way of doing this? Any best practices? I'm pretty new to app development and any advice would be helpful.
Thanks
I personally use jQuery ajax. The awesome thing about phonegap and running js on a phone is that you have no normal javascript security issues like crossdomain issues.
One thing you need to remember is that in order to reach outside servers you will need to add a new key to your plist in your external hosts
KEY: websites
VALUE: *
the * is a catch all so any domain can be accessed.
as for the ajax treat it like a normal ajax request:
$.ajax({
url:'http://your-url.com/script.php',
type:'post',
data:'arg=foo&argB=bar',
success:function(data){
console.log(data);
},
error:function(w,t,f){
console.log(w+' '+t+' '+f);
}
});
good luck happy deving!
I've got a few phonegap tutorials on my blog -
http://www.drewdahlman.com/meusLabs/
Use any AJAX you want.
Remember to allow the server you're going to communicate in your config.xml file!
<access /> - deny all
<access origin="*" /> - allow any
<access origin="http://example.com*" subdomains="true" /> - allow all of example.com
There are more examples in the config.xml file.