Thursday, May 21, 2009

Complex elements in Groovy WS

Update, moved to Just Thinking: Code

I've been trying to use GroovyWS to test Web Services we are creating. Because of the way we coded the Web Services, I could not use the examples that are online, even the ones that are labeled "Complex objects".

If I used :
object.value = "value"
I would get an exception about not being able to convert the value to a javax.xml.bind.JAXBElement

I finally got to a point that I really needed to use some type of scripting language to access the Web Services, or create an entire application in Java to do it. I decided to take a good look at why I could use Groovy. Here is an example as to how I got it to work. It may not be very Groovy, so any suggestions as to how to make it more Groovy are appreciated. I hope this helps someone.

import groovyx.net.ws.WSClient

def getProxy(wsdl, classLoader) {
new WSClient(wsdl, classLoader)
}

def element(tagName, value) {
new javax.xml.bind.JAXBElement(new javax.xml.namespace.QName(tagName), value.class, value)
}

proxy = getProxy('http://localhost/ServicePort?WSDL', this.class.classLoader)
proxy.initialize()

def sampleData = proxy.create("com.sample.application.Sample")

sampleData.name = element("Name", "Item One")
sampleData.type = element("Type", "Misc");

result = proxy.store(sampleData)

println result.

Friday, May 8, 2009

No help from Celiac Community?

Well, I'm kinda bummed. I just read a scathing review of E Hasslebeck's new book and the posts basically say that if you have not been officially diagnosed Celiac or Gluten sensitive, that you better not go gluten-free until you do. Doesn't matter if you can't afford the test or do want to have the tests for whatever reason.

I wonder if I ever need any help from the official Celiac community, I'm going to told I'm not worthy.

I think I'll still pick up the book in a few weeks. It's a difficult lifestyle change and I can use all the help and knowledge I can get.

Thursday, May 7, 2009

Gluten-free at Starbucks

The Gluten-free cake arrived at my local Starbucks (look here) for an initial look at it. I happened to go to Starbucks this morning and was surprised to find it, so I decided to try one. I was unhappy at first, because they had one unwrapped in the case, along with the other gluten-filled pastries (cross-contamination). I asked if they had one still wrapped and they did. Here is my review of it.

Having had gluten-free baked goods already, I was ready for it to be dry, dense, overly sweet, and have a funny aftertaste. Pleasantly I was wrong.

I found it to be very moist, almost too much. It was a little dense and the combination had me worried that it would become mushy in the mouth. It never did, but it will take some getting used to to "trust it".

It was not too sweet. I found that part to be very pleasant. The orange flavor was not overpowering, although I would not have minded that. The almond flavor was also not very strong, which would have been a deal breaker for me. I love almonds, but I hate almond flavoring.

The taste was great and there was no strange aftertaste. That's the biggest problem I've had with gluten-free pastries so far. It sounds strange, but I really enjoyed it not being there.

The shape really makes you think of a muffin, but the texture is all wrong for that. It is more cake like, but a dense cake. Almost like the types of cakes that are soaked in some liquid (I've never had a rum cake, but this is the texture I would imagine one to be). For a cupcake, and especially for a muffin, it was very dense.

Importantly, I would like this even if I did not have an intolerance to gluten.

If you are meeting a friend for coffee or picking up something quick for breakfast, this is a great addition to what Celiacs can choose. Just don't let them give you the open one in the case. Those of you that don't have gluten problems will like it too. I would like to see more companies think about the gluten intolerant, so give it a try. If you like it, support it by buying one occasionally and may be we'll see more of it.

Undiagnosed Celiac

Since this blog is about what's on my mind and the gluten-free/Celiac thing is on my mind a lot, I probably should cover it here. One thing I want to get into is whether to try and get Diagnosed or not.

Always start from the beginning.

For the last several years, my wife and I have been trying to figure out why I've been having several health problems. We did not think they were all related, so I seen the doctor about some of them, but not mentioned other ones during those sessions. Some of them were starting to get worrisome, especially the inability to concentrate (fuzzy brain). We had blamed everything from lack of sleep to stress.

About 8 months ago, a friend of Patty's was diagnosed with Celiac disease. Patty felt that her friend's symptoms were very close to my own. At that time, we did not have the money to pay for a lot of tests and or the time and energy to attempt to convince my doctor I was not becoming a hypochondriac. So we decide instead to just go on a gluten-free diet and see if that change anything. We also began seriously researching gluten intolerance.

After reading several books and online articles, the most helpful being Gluten-Free Living for Dummies. I had about 80% of the symptoms listed in the Dummies book. Also, a lot of the misdiagnoses listed were things we had thought I might have, including IBS, leaky gut, migraines, depression. Over the last 6 years or so, I was even developing a blistering skin condition, which I had no idea was connected to anything, but was named and explained in the book as DH.

And I improved considerably. It's has not been 100%, but many many improvements. The DH is mostly gone, only occasional small outbreaks. The fuzzy brain problem comes back occasionally, but the depression seems to be all but gone. My dry skin problems seem to be clearing up.

Meanwhile, I seem to be becoming a lot more sensitive to gluten. A few months ago, I forgot to say something to one of my Pastors and he handed me a communion waiver. Since it bothers me that I cannot partake that part of communion, I accepted it and ate it. I was incredibly sick for about a week after. Occasionally I get sick again, but can usually trace it back to something that MIGHT have gluten in it. Eating at a restaurant is no longer fun, especially eating out with friends or team outings from work. The responses I get vary between, "are you sure you can't..." to "oh that's just terrible, I'm so sorry". Some places I can't eat anything at all.

I did not see the doctor at the beginning of these because of high deductibles on my health insurance and I did not have the time or energy for the multiple tests to convince my doctor and because I did not want to go through a cycle of "try this medicine/treatment, no that didn't work...". Especially when what I've found so far seems to be working.

Now I have insurance that does not have high upfront deductibles (it's a Health Saving program, which I think is great), but after the initial amount my company has put in, I do have a large out of pocket cost (then regular insurance kicks in). Do I go ahead and go seem my doctor and see about getting an actual Diagnoses? From what I read, to get an actual diagnoses, I will have to start eating gluten again, so they have something to test. I can't do that, because of the fuzzy brain problem really effects my job performance. Would it be a waste of time to talk to the doctor without eating gluten?

If I go to the doctor, what do I do if she does some tests, they come back negative, and she says it's all in my head, go get a pizza?

What do I do if she says I have to eat gluten for a month so I can have a proper test?

Is it worth the time and (especially) the money going through a whole bunch of test for other issues, that I'm already sure I don't have?