Blayter.com

Where to place the client-config.wsdd file in Railo

So when you are working with web services it is very helpful to see the request and responses between your code and the web service. Thankfully with Java Axis this can accomplished using the client-config.wsdd file. This can be tough at times as you have to drop the file in the right location. The hard part is to find the "working directory" of your application. This can change from OS to OS so first lets find the working directory. If you run the code below it will output the folder where you need to drop the client-config.wsdd into.

<cfscript>
   variables.fileObject = createObject("java","java.io.File");
   variables.directory = variables.fileObject.init("");
   WriteOutput("Working Directory: " & variables.fileObject.getAbsolutePath());
</cfscript>

Once you have your folder location take the code below and put it into that folder

<!--
Save this file as "client-config.wsdd" in the working directory
of your Axis client. Axis will load it automatically. The
configuration here tells Axis to save all incoming and outgoing
XML into a file named "axis.log"
-->
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
   <handler name="log" type="java:org.apache.axis.handlers.LogHandler"/>
   <globalConfiguration>
      <requestFlow>
         <handler type="log"/>
      </requestFlow>
      <responseFlow>
         <handler type="log"/>
      </responseFlow>
   </globalConfiguration>
   <transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
</deployment>

On my Mac I ended up placing the file in my user folder "/Users/john.blayter/" and on my Windows 2008 Server I ended up placing this in my "C:\Program Files\Apache Software Foundation\Tomcat 7.0"

Reading environment variables on the server via ColdFusion

I had the need to read in a environment variable off of the server via ColdFusion. Just replace the ENVIRONMENT_VARIABLE_ON_THE_SERVER with your own variable that you are going after.

<cfset system = CreateObject("java", "java.lang.System")>
<cfset environment = system.getenv()>
<cfset env = environment.get("ENVIRONMENT_VARIABLE_ON_THE_SERVER")>
<cfoutput>#env#</cfoutput>

This is based on some java code that I wrote up for a LCDS project.

public static String getEnvironment(String environmentVariableName) {
Map<String, String> env = System.getenv();
return env.get(environmentVariableName);
}

Picasa model in Wheels

I am in the process of converting my site over to CFWheels. In this journey I wanted to bring in the pictures that my wife uploads to her Picasa site. (Attached) is a model file in that you can adjust to suck in the Picasa photos that you desire into your site.

Update to Unfuddlecfc

I recently needed to change ticketing systems to Unfuddle and didn't want to loose all of the historical information we had in the old system. I found that Terrence Ryan had created a open source project to hit the Unfuddle API. If you take a look at his RiaForge project Unfuddlecfc, you will see that it executes a backup of the project. This project was a great first stepping stone for me.

If you look at the attached file to this posting you will see an updated version of his project. It allows you to do almost everything to write your own transfer script (tickets, milestones, users, custom fields, account, backups, projects, versions, severity, components). The one thing that I could not get working was the files attached to tickets.

UPDATE Thanks to Terrence for giving me admin access for the RiaForge project I have now updated the project with my code. Please go to unfuddlecfc.riaforge.org to get the latest code.

Using MXUnit with Bamboo

I've setup MXUnit and Hudson before using the great instructions found at the MXUnit Blog. I've recently setup my tests to run through Bamboo from Atlassian. There were a couple of things that I learned in the process.

For the most part Bamboo is a lot like Hudson but there are some special things you can do to pass parameters from Bamboo into your ANT script. In the configuration of the job you can pass ANT parameters in the target field. So since I setup my ANT to copy the files from my Bamboo server to my development server for the running of the tests I wanted the root path of Bamboo to be dynamic. I ended up entering the following for my target field.
main -Dbamboo.workingDirectory=${bamboo.build.working.directory}
You can find a list of variables you can pass from Bamboo to ANT here.

Another lesson learned was that the application that I was dealing with was quite large and I opted not to do a clean build every time. So Bamboo would essentially just update its local copy of the site and the changes would be propagated to the development server. When I had first started my ANT script I had all the tests being executed via a single <directory> call. Some of the tests take upwards of 3 minutes each to execute so I changed the ANT script to use the <testcase> instead. This helped by breaking up all of the tests into separate HTTP calls and I was able to get better results in executing the tests. The bad part is that since I didn't have a clean checkout the xml file generated from the <directory> call was left in there. So I kept getting inaccurate results back to bamboo. My resolution for this was adding a couple of lines in my ANT file to clean out the testresults folder.
<property name="junit.out.dir.xml" value="testresults" />
<delete dir="${bamboo.workingDirectory}\${junit.out.dir.xml}\" failonerror="false"/>
<mkdir dir="${bamboo.workingDirectory}\${junit.out.dir.xml}"/>

Service Orientated Architecture and Continuous Integration / CS5 Giveaway

Come join us at the Denver CFUG the evening of December 7th. We will be giving away a copy of CS5 and going over Service Orientated Architecture.

RSVP Now

DESCRIPTION:

Do you wish you better understood object oriented programming? Do you want to eventually migrate your applications to a Flex front end? Do you wish the other programmers on your team wouldn't write so many bugs? (Your code is always perfect) This is where using SOA and CI can help out! At request of the attendees from the last meeting we will be revisiting Service Orientated Architecture.

We will be covering:

What is SOA and how can it help me? Review SOA coding best practices What about Dependency Injection? That's nice, what about preventing bugs? Respect Hudson's bow tie (and point fingers when someone breaks your code) GIVEAWAYS We will also be givingaway a copy of CS5! It will be like an early Christmas present for one attendee!

Goodies provided by Adobe and Apex Systems. Food provided by Apex Systems.

PARKING: When you pull up to the building, please feel free to park in the lot or the covered parking adjacent to the building. When you pull in, you will be asked to take a ticket. By the time the meeting is over, the attendant has gone home and you will not be charged for parking there.

Crave real food

Over the past few months we have found a new guilty pleasure in Castle Rock. Crave Real Food, or The Crave as we lovingly call it, has blessed our small town with unique combinations of burgers that leave you stuffed and wanting to try more. Creations like the "Fatty melt" start with 2 grilled cheese sandwiches as the bun and a killer burger in the middle. Their "Nutter Butter" has to be one of my top favorite burgers there so far. The peanut butter, bacon and jalapeƱos create the fantastic savory flavor with some heat.

So far we have been there 6 times in the past 8 weeks. If you go I highly suggest sitting at the bar. Watching them cook all of these different items is truly a delight to watch.

Meeting tonight: Database Tips, Tricks, & Secrets Presented By Nate Nelson

Have you ever wanted to know how those strange database experts are able to do their job without going insane? This session will cover some heavily used database tips, tricks, and secrets from multiple database platforms. These tips are have been used first hand and compiled for you in one presentation. Every developer that has any interaction with a database should find this session of value.

RSVP

Sturm Hall
2000 E. Asbury Ave.
Room 323 (or some room close by)
Denver, CO 80208

Using Airfoil for syncing audio

This past weekend was the 8th annual Labor Day party in my neighborhood. We close down the street and party until early the next morning. There are a couple of us that have receivers in our garages that we crank up to provide tunes for the party. In the past we have tried satellite radio and the buffer would be off by a second or two. We also tried wireless speakers and they got too much interference from cell phones.

This year we used Airfoil from Rogue Amoeba to sync the music. What Airfoil does is hijack the audio signal from a software application to then broadcast it across a network in sync. I hopped on my neighbors wireless network that happened to be centered between the houses with radios in the garage. This allowed me a strong 802.11G signal in both locations (about 300' apart from each other). I then installed the Airfoil application in combination with my Pandora One application. On the other end I installed the Airfoil Speakers application. Once this was all setup I was able to perfectly sync the audio from the main computer to the other computer. We ran this all night and had perfect audio entertainment for the evening. For $25 it is well worth the money to broadcast your audio across your network in prefect sync.

Recipe: Paloma

This has to be one of my all time favorite summer time drinks.

  1. Glass filled about 1/2 way up with crushed ice
  2. 1 shot of 100% agave Tequila
  3. 1/2 of a lime juiced
  4. Tiny pinch of sea salt
  5. Add the spent lime as a garnish
  6. Fill cup with Fresca and stir

More Entries