Tuesday, September 20, 2005

Support for SOAP Attachments in Document/Literal Service

I take part in an SOA project where I have to create, test and deploy web services based on WSDL files supplied by a partner Co. We use Apache Axis 1.2. ( http://ws.apache.org/axis ) Recently I ran into a problem with one of the services which has an attachment as part of the request message. It is a "docment/literal" service by wsdl definition. I generate the java classes using wsdl2java. The service interface has 2 arguments - an object which holds information about the file being attached, and an org.apache.axis.attachments.OctetStream object, which is the attachment itself. When I invoke the service using the generated JUnit testcase, I keep getting a SAXException like "Invalid element in com.xyz.MyClass - myClass". This is an exception thrown by Axis BeanDeserializer at the server side.
 
Every thing magically starts working as soon as I change the binding style in wsdl to "RPC" instead of "document". Even if I first generate the code using wsdl with style="document" and then just change the style in server-config.wsdd to "style=RPC" at the time of deployment, it still works fine.
 
Is a document style web service allowed to have only one argument in the corresponding implementation java class? Is it failing because I have 2 arguments in there? I am basically seeing that the BeanDeserializer goes for a toss when deserializing the incoming request message. I intercepted the outgoing request at the client side and incoming request at the server side using Axis handlers. They look fine to me. Besides, the fact that the deserialization works when I change server-config.wsdd to "style=RPC" baffles me. I am attaching the files I used.

Tuesday, September 13, 2005

What is the glucose tolerance test like?

What is the glucose tolerance test like?

For 8 to 14 hours before the test, you can't eat or drink anything but sips of water, so you'll want to schedule it for first thing in the morning. (Don't smoke or exercise either.) For three days before the test, you'll be told to eat at least 150 grams of carbohydrate a day. (If you eat a normal diet and have an extra piece of bread at each meal, you'll likely be getting enough carbs.)

When you arrive for the test, the technician will take a blood sample to measure your fasting blood glucose level and then ask you to drink either a more concentrated dose or a larger volume of the glucose solution (containing 100 grams of glucose). Then brace yourself for three more arm pricks as they test your blood every hour for the next three hours. (You'll definitely need a source of distraction this time, as you'll have to stay seated in the waiting room between blood drawings. You might also want to bring a sandwich, so you can eat right after your final blood sample is drawn. You'll most likely be quite hungry.) The technician should alternate arms each time she draws your blood.

If one of the readings is abnormal, you may have to take another test later in your pregnancy. Or your practitioner may ask you to make some changes in your diet and exercise routine. If two or more of your readings are abnormal, you'll be diagnosed with gestational diabetes and you'll need to talk to your practitioner about a treatment plan. This chart shows the levels that the American Diabetes Association considers abnormal at each interval of the test:

Interval Abnormal reading
Fasting 95 mg/dl or higher
One-hour 180 mg/dl or higher
Two-hour 155 mg/dl or higher
Three-hour 140 mg/dl or higher
 

Tuesday, September 06, 2005