/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* WSDLGenerator uses WSDLResolver while creating WSDL artifacts. WSDLResolver
* is used to control the file names and which artifact to be generated or not.
*
* @author Jitendra Kotamraju
*/
/**
* targetNS -> schema documents.
*/
private final Map<String, List<SDDocumentImpl>> nsMapping = new HashMap<String,List<SDDocumentImpl>>();
this.serviceName = serviceName;
this.portTypeName = portTypeName;
if(wsdl.hasPortType())
abstractWsdl = doc;
}
}
}
}
}
/**
* Generates the concrete WSDL that contains service element.
*
* @return Result the generated concrete WSDL
*/
r.setSystemId(filename);
return r;
}
/**
* At present, it returns file URL scheme eventhough there is no resource
* in the filesystem.
*
* @return URL of the generated document
*
*/
try {
} catch (MalformedURLException e) {
// TODO: I really don't think this is the right way to handle this error,
// WSDLResolver needs to be documented carefully.
throw new WebServiceException(e);
}
}
/**
* Updates filename if the suggested filename need to be changed in
* wsdl:import. If the metadata already contains abstract wsdl(i.e. a WSDL
* which has the porttype), then the abstract wsdl shouldn't be generated
*
* return null if abstract WSDL need not be generated
* Result the abstract WSDL
*/
if (abstractWsdl != null) {
return null; // Don't generate abstract WSDL
}
return r;
}
/**
* Updates filename if the suggested filename need to be changed in
* xsd:import. If there is already a schema document for the namespace
* in the metadata, then it is not generated.
*
* return null if schema need not be generated
* Result the generated schema document
*/
throw new ServerRtException("server.rt.err",
"More than one schema for the target namespace "+namespace);
}
return null; // Don't generate schema
}
return r;
}
/**
* Converts SDDocumentSource to SDDocumentImpl and updates original docs. It
* categories the generated documents into WSDL, Schema types.
*
* @return the primary WSDL
* null if it is not there in the generated documents
*
*/
if (doc == concreteWsdlSource) {
}
}
return concreteWsdl;
}
}