Hello All,
I started yesterday with
SOAP for the first time. What I'm attempting to do is to make a SOAP request from an
ejb, after I passed
jsp form data into some collection object. I didn't find much on the web either!
My questions are:
1.) What is the best way for receiving jsp form data placed into the HttpServletRequest, so that later it can be put into a SOAP request? I have loaded httprequest data into Vectors, HashMaps and Hashtables, but it appears that when you load parameters for a SOAP request it must be from a vector and it's getting complicated loading a hashmap into a vector of vectors to match the key value pairs.
Here are the arguments for parameter:
Parameter(java.lang.String name, java.lang.Class type, java.lang.Object value,
java.lang.String encodingStyleURI)
One example I had found hardcoded the keys(form element name) and added each element value singularly into a vector for the SOAP request.
For example:
Vector params = new Vector();
params.addElement(new Parameter("firstName", String.class, args[0], null));
params.addElement(new Parameter("lastName", String.class, args[1], null));
I may have to duplicate this as I have different datatypes involved, but it seems like very bad coding.
2.) Does anyone know of any good code examples on the web for creating a SOAP request with an ejb as I may be doing a wrong approach here?
Thanks,
James