Skip to content

Instantly share code, notes, and snippets.

worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
server {
listen 17743;
server_name axion.webfactional.com;
location / {
proxy_pass http://127.0.0.1:13459;
}
location /static/ {
root /home/axion/webapps/taxicab_fees/current/;
application:start(inets).
SoapBody = "<soap:Body><GetWeather xmlns=\"http://www.webserviceX.NET\"><CityName>Chicago</CityName><CountryName>United States</CountryName></GetWeather></soap:Body>".
SoapEnvelope = lists:append([
"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">",
SoapBody,
"</soap:Envelope>"]
).
{ok, {{_, _, _}, _, ResponseBody}} = httpc:request(post, {"http://www.webservicex.net/globalweather.asmx", [], "text/xml", SoapEnvelope}, [], []).
{Xml, _} = xmerl_scan:string(ResponseBody).
{_, _, [{_, _, [{_, _, [{_, [], Data}]}]}]} = xmerl_lib:simplify_element(Xml).
@minostro
minostro / gist:7648322
Created November 25, 2013 20:30
stacktrace when using fntest in immutant-demo toy project.
➜ immutant-demo lein test
lein test immutant-demo.core-test
lein test immutant-demo.integration-test
Exception in thread "main" java.lang.IllegalArgumentException: No implementation of method: :ready? of protocol: #'jboss-as.management/Server found for class: clojure.lang.Var$Unbound
at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:541)
at jboss_as.management$eval2567$fn__2581$G__2554__2586.invoke(management.clj:6)
at jboss_as.management$wait_for_ready_QMARK_.invoke(management.clj:135)
at fntest.core$with_deployments$fn__3385.invoke(core.clj:62)
(use-fixtures :once
(compose-fixtures
fnt/with-jboss
(fnt/with-deployment "immutant-demo-fntest" {:root "/Users/milinostroza/Sandbox/immutant-demo-fntest/", :context-path "/foo"})))
@minostro
minostro / gist:7663704
Created November 26, 2013 18:50
full jboss log
2:39:43,220 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1
12:39:43,453 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA
12:39:43,499 INFO [org.jboss.as] (MSC service thread 1-5) JBAS015899: JBoss AS 7.2.x.slim.incremental.6 "Janus" starting
12:39:43,505 DEBUG [org.jboss.as.config] (MSC service thread 1-5) Configured system properties:
awt.nativeDoubleBuffering = true
awt.toolkit = apple.awt.CToolkit
file.encoding = MacRoman
file.encoding.pkg = sun.io
file.separator = /
ftp.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
lein test immutant-demo-fntest.integration-test
Starting JBoss
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Xms64m -Xmx1024m -XX:MaxPermSize=1024m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -Djboss.home.dir=/Users/milinostroza/.immutant/current/jboss -Dlogging.configuration=file:/Users/milinostroza/.immutant/current/jboss/standalone/configuration/logging.properties -Dorg.jboss.boot.log.file=/Users/milinostroza/Sandbox/immutant-demo-fntest/target/isolated-immutant/standalone/log/boot.log -jar /Users/milinostroza/.immutant/current/jboss/jboss-modules.jar -mp /Users/milinostroza/.immutant/current/jboss/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.server.base.dir=/Users/milinostroza/Sandbox/immutant-demo-fntest/target/isolated-immutant/standalone -Djboss.socket.binding.port-offset=67
Timed out waiting for JBoss (try setting WAIT_FOR_JBOSS=120)
Stopping JBoss
Exception in thread "main" java.net.ConnectException: Connection re
(ns immutant-demo-fntest.integration-test
(:use clojure.test)
(:require [clj-http.client :as http]
[fntest.core :as fnt]
[immutant.util :as util]))
; (use-fixtures :once
; (compose-fixtures
; fnt/with-jboss
; (fnt/with-deployment "immutant-demo-fntest.clj" {:root "./", :context-path "/foo"})))
@minostro
minostro / gist:7665585
Created November 26, 2013 20:25
jboss log
14:24:35,683 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1
14:24:35,908 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA
14:24:35,952 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: JBoss AS 7.2.x.slim.incremental.6 "Janus" starting
14:24:35,957 DEBUG [org.jboss.as.config] (MSC service thread 1-6) Configured system properties:
awt.nativeDoubleBuffering = true
awt.toolkit = apple.awt.CToolkit
file.encoding = MacRoman
file.encoding.pkg = sun.io
file.separator = /
ftp.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
(ns immutant-demo-fntest.integration-test
(:use clojure.test)
(:require [clj-http.client :as http]
[fntest.core :as fnt]))
; (deftest first-integration-test
; (testing "jbos"
; (is (= "hola" (util/app-uri)))))