{
QName typeName = part.getTypeName();
if( typeName == null )
{
typeName = partName;
SchemaGlobalElement type = wsdlContext.getSchemaTypeLoader().findElement( typeName );
if( type != null )
{
messageParts.add( new MessageXmlPart( children[0], type.getType(), part, bindingOperation,
isRequest ) );
}
else
log.error( "Missing element [" + typeName + "] in associated schema for part ["
+ part.getName() + "]" );
}
else
{
SchemaType type = wsdlContext.getSchemaTypeLoader().findType( typeName );
if( type != null )
{
messageParts.add( new MessageXmlPart( children[0], type, part, bindingOperation, isRequest ) );
}
else
log.error( "Missing type [" + typeName + "] in associated schema for part [" + part.getName()
+ "]" );
}
}
}
}
}
else
{
Part part = inputParts[0];
QName elementName = part.getElementName();
if( elementName != null )
{
// just check for correct message element, other elements are
// avoided (should create an error)
XmlObject[] paths = msgXml.selectPath( "declare namespace env='"
+ wsdlContext.getSoapVersion().getEnvelopeNamespace() + "';" + "declare namespace ns='"
+ elementName.getNamespaceURI() + "';" + "$this/env:Envelope/env:Body/ns:"
+ elementName.getLocalPart() );
if( paths.length == 1 )
{
SchemaGlobalElement elm = wsdlContext.getSchemaTypeLoader().findElement( elementName );
if( elm != null )
{
messageParts.add( new MessageXmlPart( paths[0], elm.getType(), part, bindingOperation, isRequest ) );
}
else
throw new Exception( "Missing part type in associated schema" );
}
else