Recent Notes
Displaying notes 1 - 10
Created by freyo on May 17, 2013 19:52:17
Last update: May 17, 2013 19:52:17
Angie. please look at the related notes "Android unit testing example" and "Android unit testing basics". The examples might be out-of-date since they were from the Froyo era.
Created by angie on May 17, 2013 15:20:39
Last update: May 17, 2013 15:20:39
Thank you Freyo for this explanation & step-by-step instructions. I could follow till point # 7. After that I am lost.
1). Point # 8 mentions "Copy the test suite apk into MyRepository/testcases." Where is this test suite apk located?
2). How do I generate the AndroidTest.apk file.
3). Where do I get the host_config.xml file from?
Thank you in advance.
Angie.
Created by Dr. Xi on May 01, 2013 20:53:45
Last update: May 01, 2013 20:57:39
This is the stack trace:
java.lang.NullPointerException
at org....
Root Cause: Hibernate cannot join JTA transaction. Hibernate configuration specified jta-data-source but transaction manager was org.springframework.orm.jpa.JpaTransactionManager .
Solution: When using jta-data-source , the transaction manager should be org.springframework.transaction.jta.JtaTransactionManager . Or, change datasource to non-jta-data-source .
Reference: Spring entityManagerFactory in jta and non-jta modes
Created by Dr. Xi on April 29, 2013 09:00:48
Last update: April 29, 2013 09:00:48
In the case proposed by Diony , signing multiple elements by id, simply change the newSignedInfo to:
// Create the SignedInfo
final List transforms0...
I must admit that I don't understand transformations, so take my example code with a grain of salt.
Also, signing a doc fragment by PATH does not work, simply because there's no way to identify the fragment with a URI without referring to it by id. Reference ode from org.jcp.xml.dsig.internal.dom.DOMURIDereferencer :
// Check if same-document URI and register...
Created by Fang on April 17, 2013 08:50:04
Last update: April 17, 2013 08:50:04
I got HTTP status 406 even with explicit Accept header like this:
curl -x localhost:8088 -H 'Accept: application/jso...
The root cause was that I forgot to include Jackson JSON lib in the dependencies.
Solution: add this to pom.xml
<dependency>
<groupId>org.codehaus.jackson</gr...
Created by magnum on January 06, 2013 20:15:00
Last update: April 05, 2013 09:59:12
nslookup :
$ nslookup www.google.com
Server: 127.0.0.1
...
dig :
$ dig +noall +answer www.google.com
www.google....
host
$ host www.google.com
www.google.com has addres...
About the use of reverse DNS from webdnstools.com :
Many things use reverse DNS. An example is anti-spam email software. Before delivering an email, it is common for anti-spam software to perform a reverse DNS lookup on the IP address of the source mail server. It then checks that the reverse DNS entry matches the SPF record provided by the name server of the source email domain. If it does not match, it may flag the email as spam.
Created by voodoo on March 24, 2013 13:44:47
Last update: March 29, 2013 13:08:31
Use getpwnam group of functions. Example code:
#include <sys/types.h>
#include <pwd.h>
#inc...
For gid, use getgrnam
Created by google.YE6XH8BY on March 26, 2013 23:30:48
Last update: March 26, 2013 23:30:48
use this code:
jQuery("#ghcs").trigger("reloadGrid", [{"page" : 1}]);
note: specify the page=1 to reset paging.
Created by Dr. Xi on March 21, 2013 19:47:46
Last update: March 22, 2013 12:30:27
It's normal practice to import types from an external xsd file in WSDL like this:
<wsdl:types> <xsd:schema xmlns:xsd="htt... When you use <dynamic-wsdl> and have Commons XMLSchema on the class path, Spring-WS inlines the xsd in the wsdl. But that doesn't happen when you use <static-wsdl> . You can define a SimpleXsdSchema bean to expose the xsd: <?xml version="1.0" encoding="UTF-8"?> <beans x... where the bean id "hello" should match the schemaLocation attribute in the WSDL (without the .xsd suffix). But note that the SimpleXsdSchema does not inline the xsd. It only makes the xsd available via an HTTP URL. Alternatively, you can simply put the xsd file under the content directory of the webapp (just link any CSS or JavaScript). Anyway, that's a lot of manual...
Created by Dr. Xi on March 22, 2013 12:18:39
Last update: March 22, 2013 12:18:39
This is a step-by-step guide to create a "contract-first" web service with Apache CXF. It's a lot easier than doing the same thing with Spring-WS. The project uses standard Maven directory layout. Define the data types ( src/main/resources/hello.xsd ):
<xs:schema xmlns:xs="http://www.w3.org/200... Define the service ( src/main/resources/hello.wsdl ): <?xml version='1.1' encoding='UTF-8'?> <wsdl:de... Create pom.xml : <project xmlns="http://maven.apache.org/POM/4.... Generate jaxb bindings: $ mvn generate-sources Code the web service ( src/main/java/com/example/cxfdemo/HelloPortImpl.java ): package com.example.cxfdemo; import javax.j... Declare the CXF servlet in web.xml ( src/main/webapp/WEB-INF/web.xml ): <?xml version="1.0" encoding="UTF-8"?> <web-app... Wire up the web service implementation ( src/main/webapp/WEB-INF/cxf-servlet.xml ): <?xml version="1.0" encoding="UTF-8"?> <beans x... Build the WAR: $ mvn clean package After the webapp is deployed (Tomcat running on port 8080), the web service (WSDL) is available via...