//////////////////(1.1)First Copy the Types/////////////////////////////
//Types may get changed inside the Operation pumping.
Types wsdl4jTypes = wsdl4JDefinition.getTypes();
WSDLTypes wsdlTypes = this.wsdlComponentFactory.createTypes();
this.womDefinition.setTypes(wsdlTypes);
if (null != wsdl4jTypes) {
this.copyExtensibleElements(wsdl4jTypes.getExtensibilityElements(),
wsdlTypes, null);
}
//////////////////(1.2) /////////////////////////////
// create new Schema extensions element for wrapping
Element[] schemaElements = generateWrapperSchema(wsdl4JDefinition);
if (schemaElements!=null && schemaElements.length>0){
for (int i = 0; i < schemaElements.length; i++) {
Element schemaElement = schemaElements[i];
if (schemaElement!=null){
ExtensionFactory extensionFactory = wsdlComponentFactory.createExtensionFactory();
org.apache.wsdl.extensions.Schema schemaExtensibilityElement = (org.apache.wsdl.extensions.Schema) extensionFactory.getExtensionElement(
ExtensionConstants.SCHEMA);
wsdlTypes.addExtensibilityElement(schemaExtensibilityElement);
schemaExtensibilityElement.setElement(schemaElement);
}
}
}