}
/** Unmarshall a message element and add it to the parameter list */
private SOAPContentElement getParameterFromMessage(ParameterMetaData paramMetaData, SOAPElement soapElement, boolean optional) throws BindingException
{
Name xmlName = new NameImpl(paramMetaData.getXmlName());
SOAPContentElement soapContentElement = null;
Iterator childElements = soapElement.getChildElements();
while (childElements.hasNext())
{
Object childNode = childElements.next();
if (childNode instanceof SOAPElement)
{
SOAPElementImpl childElement = (SOAPElementImpl)childNode;
// If this message was manipulated by a handler the child may not be a content element
if (!(childElement instanceof SOAPContentElement))
childElement = (SOAPContentElement)soapElement.replaceChild(new SOAPContentElement(childElement), childElement);
// The parameters are expected to be lazy
SOAPContentElement aux = (SOAPContentElement)childElement;
Name elName = aux.getElementName();
if (xmlName.equals(elName))
{
soapContentElement = aux;
soapContentElement.setParamMetaData(paramMetaData);
break;
}