Do you have any idea from where you get the ClassCastException . I mean the line number of you code ?
Thanks Deepal > Hi, > > I'm fairly new, but learning every day. I'm writing a web service in > Axis2 1.3. I'm getting an odd ClassCastException when I send a > request to my web service. The odd thing is that it only occurs when > the test tool (soapUI) I'm using formats the xml of the soap request. > If I leave the content all on one line the error doesn't occur. I > started > > Working request: > > <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" > xmlns:bat="http://service.ws.mgi.jax.org/xsd/batch" > xmlns:bt="http://service.ws.mgi.jax.org/xsd/batchType"> > <soap:Header/> > <soap:Body> > <bat:request> > <bat:batchRequest><bat:IDSet > IDType="symbol"><bt:id>Trp53</bt:id></bat:IDSet></bat:batchRequest> > </bat:request> > </soap:Body> > </soap:Envelope> > > > Broken request: > > <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" > xmlns:bat="http://service.ws.mgi.jax.org/xsd/batch" > xmlns:bt="http://service.ws.mgi.jax.org/xsd/batchType"> > <soap:Header/> > <soap:Body> > <bat:request> > <bat:batchRequest><bat:IDSet > IDType="symbol"><bt:id>Trp53</bt:id></bat:IDSet></bat:batchRequest> > </bat:request> > </soap:Body> > </soap:Envelope> > > Here is the code that is parsing the xml: > > for (Iterator iter = request.getChildElements(); > iter.hasNext();) { > // get key and element requestElement = > (OMElementImpl) iter.next(); key = > requestElement.getLocalName(); > // determine what argument type it is and load to > args > if (key.equals("IDSet")) { > // this is a set if ids, get the id type and list of ids > children = new HashSet(); > // get the ID type attribute from this arg > QName attName = new QName("IDType"); > this.args.put("IDType", new String[] > {requestElement.getAttributeValue(attName)}); > // get all children of IDSet, these are the input ids > for(Iterator it = requestElement.getChildren(); > it.hasNext();){ > child = (OMElementImpl) it.next(); > if (!child.getText().trim().equals("")) { > children.add(child.getText().trim()); > } > } > > Am I doing something incorrect in the way I am parsing with AXIOM? Do > I need to filter the incoming request a certain way to get rid of > control characters? I would not expect the formatting done by the > test tool to insert illegal characters, so I am assuming I am making a > newbie type of error. > > Any help or suggestion is greatly appreciated. > > Thanks, > Mark Airey > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- Thanks, Deepal ................................................................ "The highest tower is built one brick at a time" --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
