this.inputElement.setNamespace(this.namespace);
this.inputElement.setTopElement(true);
xmlSchema.addElement(this.inputElement);
// set the complex type for this element
XmlType xmlType = new XmlTypeImpl();
xmlType.setAnonymous(true);
xmlType.setSimpleType(false);
Parameter parameter;
for (Iterator iter = this.inputParameters.iterator(); iter.hasNext();) {
parameter = (Parameter) iter.next();
if (!parameter.isSchemaGenerated()){
parameter.generateSchema(configurator,schemaMap);
}
parameter.getElement().setTopElement(false);
xmlType.addElement(parameter.getElement());
QName elementTypeQName = parameter.getElement().getType().getQname();
if (!xmlSchema.containsNamespace(elementTypeQName.getNamespaceURI())) {
// if the element namespace does not exists we have to add it
if (!elementTypeQName.getNamespaceURI().equals(Constants.URI_2001_SCHEMA_XSD)) {
XmlImport xmlImport = new XmlImport(elementTypeQName.getNamespaceURI());
xmlSchema.addImport(xmlImport);
}
xmlSchema.addNamespace(elementTypeQName.getNamespaceURI());
}
}
this.inputElement.setType(xmlType);
// generate the output Element
this.outPutElement = new XmlElementImpl(false);
this.outPutElement.setName(this.name + "Response");
this.outPutElement.setNamespace(this.namespace);
this.outPutElement.setTopElement(true);
xmlSchema.addElement(this.outPutElement);
xmlType = new XmlTypeImpl();
xmlType.setAnonymous(true);
xmlType.setSimpleType(false);
if (this.outputParameter != null) {
if (!this.outputParameter.isSchemaGenerated()){
this.outputParameter.generateSchema(configurator,schemaMap);
}
xmlType.addElement(this.outputParameter.getElement());
QName elementTypeQName = this.outputParameter.getElement().getType().getQname();
if (!xmlSchema.containsNamespace(elementTypeQName.getNamespaceURI())) {
// if the element namespace does not exists we have to add it
if (!elementTypeQName.getNamespaceURI().equals(Constants.URI_2001_SCHEMA_XSD)) {
XmlImport xmlImport = new XmlImport(elementTypeQName.getNamespaceURI());