01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19:
20: /**
21: *
22: */package org.apache.axis2.jaxws.wsdl;
23:
24: import javax.wsdl.Definition;
25: import java.util.Set;
26:
27: /**
28: * Schema Reader interface is used to read schema from wsdl and derive appropriate package names
29: * from targetnamespace. The algorithm for deriving reading packages names from schema is as
30: * follows: 1) Read the inline schema defined in the wsdl 2) check if there is any jaxb
31: * customization/binding defined namely schemaBinding. if(schemaBinding defined) then read the
32: * package name and add that to the package set. else read the targetnamespace convert tns to
33: * package and add to pkg set. 3) check if there are any xsd imports or includes then for(each
34: * import) read the inline schema or perfor step 1 check if there is any jaxb schemaBinding
35: * customization defined if(schemaBinding defined) then read the package name and add that to the
36: * package set. else read the targetnamespace convert tns to package and add to pkg set. Do Step 3
37: * recursively so we cover Schema imports within import n times.
38: */
39: public interface SchemaReader {
40: public Set<String> readPackagesFromSchema(Definition wsdlDefinition)
41: throws SchemaReaderException;
42: }
|