find -name "*.jar" -exec sh -c 'unzip -l "{}" | grep -q <class name>' \; -print
find -name "*.jar" -exec sh -c 'unzip -l "{}" | grep -q HttpServletRequest' \; -print
find -name "*.jar" -exec sh -c 'unzip -l "{}" | grep -q <class name>' \; -print
find -name "*.jar" -exec sh -c 'unzip -l "{}" | grep -q HttpServletRequest' \; -print
js> print(parseInt('06'));
6
js> print(parseInt('08'));
NaN
js> print(parseInt('08',10));
8
public static String querySoap(String url, String soapAction, String msg, final String username, final String password) {
String ret = null;
try {
boolean HTTPS = false;
if( url.substring(0, 5).equalsIgnoreCase("https") ) HTTPS = true;
Config c = new Config();
Log.log(Level.INFO, "Url: " + url
+ "\r\nSoapAction: " + soapAction
+ "\r\nSoapMessage: " + msg);
URLConnection connection;
URL u = new URL(url);
if( HTTPS ) {
Log.log(Level.INFO, "We use SSL to connect to : " + url);
// Create a trust manager that does not validate certificate chains
TrustManager[] trustAllCerts = new TrustManager[] {new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return null;
}
public void checkClientTrusted(X509Certificate[] certs, String authType) {
}
public void checkServerTrusted(X509Certificate[] certs, String authType) {
}
}
};
// Install the all-trusting trust manager
try {
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, trustAllCerts, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
} catch (Exception e) {
}
// Create all-trusting host name verifier
HostnameVerifier allHostsValid = new HostnameVerifier() {
public boolean verify(String hostname, SSLSession session) {
return true;
}
};
// Install the all-trusting host verifier
HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid);
} else {
Log.log(Level.INFO, "We do not use SSL to connect to : " + url);
}
connection = u.openConnection();
connection.setConnectTimeout(c.httpConTimeout);
connection.setReadTimeout(c.httpConReadTimeout);
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setUseCaches(false);
connection.setRequestProperty("Content-Type","text/xml;charset=UTF-8");
connection.setRequestProperty("SOAPAction", soapAction);
connection.setRequestProperty("User-Agent","Jakarta Commons-HttpClient/3.1");
connection.setRequestProperty("Content-Length","" + msg.length());
if( username != null && password != null) {
String login = username + ":" + password;
String encodedLogin = Base64.encodeBytes(login.getBytes());
connection.setRequestProperty("Authorization", "Basic " + encodedLogin);
}
OutputStream out = connection.getOutputStream();
Writer wout = new OutputStreamWriter(out);
wout.write(msg);
wout.flush();
wout.close();
StringBuffer strBuf = new StringBuffer();
String inputLine;
BufferedReader bufRead = new BufferedReader(new InputStreamReader(connection.getInputStream(),"UTF-8"));
while ((inputLine = bufRead.readLine()) != null) {
strBuf.append(inputLine);
}
bufRead.close();
ret = strBuf.toString();
Log.log(Level.INFO, "SoapResponse: " + ret);
} catch (Exception e) {
e.printStackTrace();
}
return ret;
}
Output Transform (struct -> string):
<do-reformat-op-attr name="faxnumber">
<arg-value>
<token-xpath expression='$current-value/component[@name="faxNumber"]/text()'/>
</arg-value>
</do-reformat-op-attr>
Input Transform (string -> struct):
<do-reformat-op-attr name="faxnumber">
<arg-value type="structured">
<arg-component name="faxNumber">
<token-local-variable name="current-value"/>
</arg-component>
<arg-component name="faxBitCount">
<token-text xml:space="preserve">0</token-text>
</arg-component>
<arg-component name="faxParameters">
<token-text/>
</arg-component>
</arg-value>
</do-reformat-op-attr>
Cartoon effect on my camera |
Dam on Table Mountain |
Dam water |
More dam water |
Some people choose to ignore warnings |
Nice bird |
uShaka |
uShaka |
Swimming at Silvermine |
Table Mountain |
St James Beach - 26 December 2011 |
View of Constantia wine farms |
View of Table Mountain from Milnerton - I like the panorama mode on my camera phone :) |
Out at the Baxter for 'Some like it Vrot' |
Sea Point |
View from Hillcrest Berry Farm |
Beware of the Prawns (only in Joburg) |