1 <?xml version="1.0" encoding="UTF-8"?>
   2 <!--
   3  Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
   4  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5 
   6  This code is free software; you can redistribute it and/or modify it
   7  under the terms of the GNU General Public License version 2 only, as
   8  published by the Free Software Foundation.  Oracle designates this
   9  particular file as subject to the "Classpath" exception as provided
  10  by Oracle in the LICENSE file that accompanied this code.
  11 
  12  This code is distributed in the hope that it will be useful, but WITHOUT
  13  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15  version 2 for more details (a copy is included in the LICENSE file that
  16  accompanied this code).
  17 
  18  You should have received a copy of the GNU General Public License version
  19  2 along with this work; if not, write to the Free Software Foundation,
  20  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21 
  22  Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  23  or visit www.oracle.com if you need additional information or have any
  24  questions.
  25 -->
  26 
  27 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  28            xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
  29            elementFormDefault="qualified"
  30            targetNamespace="http://java.sun.com/xml/ns/jaxws"
  31            attributeFormDefault="unqualified">
  32   <xsd:annotation>
  33     <xsd:documentation>
  34 
  35       DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  36       
  37       Copyright (c) 2006-2017 Oracle and/or its affiliates. All rights reserved.
  38       
  39       The contents of this file are subject to the terms of either the GNU
  40       General Public License Version 2 only ("GPL") or the Common Development
  41       and Distribution License("CDDL") (collectively, the "License").  You
  42       may not use this file except in compliance with the License.  You can
  43       obtain a copy of the License at
  44       https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
  45       or packager/legal/LICENSE.txt.  See the License for the specific
  46       language governing permissions and limitations under the License.
  47       
  48       When distributing the software, include this License Header Notice in each
  49       file and include the License file at packager/legal/LICENSE.txt.
  50       
  51       GPL Classpath Exception:
  52       Oracle designates this particular file as subject to the "Classpath"
  53       exception as provided by Oracle in the GPL Version 2 section of the License
  54       file that accompanied this code.
  55       
  56       Modifications:
  57       If applicable, add the following below the License Header, with the fields
  58       enclosed by brackets [] replaced by your own identifying information:
  59       "Portions Copyright [year] [name of copyright owner]"
  60       
  61       Contributor(s):
  62       If you wish your version of this file to be governed by only the CDDL or
  63       only the GPL Version 2, indicate your decision by adding "[Contributor]
  64       elects to include this software in this distribution under the [CDDL or GPL
  65       Version 2] license."  If you don't indicate a single choice of license, a
  66       recipient has the option to distribute your version of this file under
  67       either the CDDL, the GPL Version 2 or to extend the choice of license to
  68       its licensees as provided above.  However, if you add GPL Version 2 code
  69       and therefore, elected the GPL Version 2 license, then the option applies
  70       only if the new code is made subject to such option by the copyright
  71       holder.
  72       
  73     </xsd:documentation>
  74   </xsd:annotation>
  75 
  76     <xs:annotation>
  77         <xs:documentation>
  78             Schema for JAX-WS 2.0 WSDL customization.
  79         </xs:documentation>
  80     </xs:annotation>
  81 
  82     <xs:group name="declaration">
  83         <xs:annotation>
  84             <xs:documentation>
  85                 TODO
  86             </xs:documentation>
  87         </xs:annotation>
  88         <xs:choice>
  89             <xs:element ref="jaxws:package"/>
  90             <xs:element ref="jaxws:enableWrapperStyle"/>
  91             <xs:element ref="jaxws:enableAsyncMapping"/>
  92             <xs:element ref="jaxws:enableMIMEContent"/>
  93             <xs:element ref="jaxws:class"/>
  94             <xs:element ref="jaxws:method"/>
  95             <xs:element ref="jaxws:parameter"/>
  96             <xs:element ref="jaxws:provider"/>
  97             <xs:any namespace="##other" processContents="lax" />
  98         </xs:choice>
  99     </xs:group>
 100     
 101     <xs:element name="bindings">
 102         <xs:annotation>
 103             <xs:documentation>
 104                 WSDL customization binding declaration.
 105 
 106                 There are two ways to specify binding declarations.
 107 
 108                 1. All binding declarations pertainingto a given WSDL document are grouped together in a standalone
 109                 document, called an external binding file.
 110 
 111                 2. The second approach consists in embeddeding binding declarations directly inside a WSDL document. In
 112                 either case, the jaxws:bindings element is used as a container for JAX-WS binding declarations. It
 113                 contains a (possibly empty) list of binding declarations, in any order.
 114 
 115                 A binding declaration embedded in a WSDL document can only affect the WSDL element it extends. When a
 116                 jaxws:bindings element is used as a WSDL extension, it MUST NOT have a node attribute. Moreover, it MUST
 117                 NOT have an element whose qualified name is jaxws:bindings amongs its children.
 118             </xs:documentation>
 119         </xs:annotation>
 120         <xs:complexType>
 121             <xs:sequence>
 122                 <xs:choice minOccurs="0" maxOccurs="unbounded">
 123                     <xs:group ref="jaxws:declaration"/>
 124                     <xs:element ref="jaxws:bindings"/>
 125                 </xs:choice>               
 126             </xs:sequence>
 127 
 128             <xs:attribute name="wsdlLocation" type="xs:anyURI">
 129                 <xs:annotation>
 130                     <xs:documentation>
 131                         Location of the remote WSDL to associate binding declarations with. It MUST NOT be present if
 132                         the jaxws:bindings element is used as an extension inside a WSDL document or one of its ancestor
 133                         jaxws:bindings elements already contains this attribute.
 134                     </xs:documentation>
 135                 </xs:annotation>
 136 
 137             </xs:attribute>
 138 
 139             <xs:attribute name="node" type="xs:string">
 140                 <xs:annotation>
 141                     <xs:documentation>
 142                         The value of the string is an XPATH 1.0 compliant string that resolves to a node in a remote
 143                         WSDL to associate binding declarations with. The remote WSDL is specified by the
 144                         wsdlLocation attribute occuring in the current element or in a parent of this element.
 145 
 146                         The node attribute can be used to customize the inlined schema inside the WSDL, in this case the
 147                         node attribute must point to the xs:schema node inside the WSDL. Further jaxb:bindings should be
 148                         used as the child of jaxws:bindings.
 149 
 150                         Example:
 151                         <!--
 152                         <jaxws:bindings wsdlLocation="..."
 153                                         xmlns:xs="http://www.w3.org/2001/XMLSchema"
 154                                         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 155                                         xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
 156                                         xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
 157                             <jaxws:bindings
 158                                     node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='urn:test:types']">
 159                                 <jaxb:schemaBindings>
 160                                     <jaxb:package name="client.types"/>
 161                                 </jaxb:schemaBindings>
 162                                 <jaxb:bindings node="//xs:complexType[@name='class']">
 163                                     <jaxb:class name="Clazz"/>
 164                                 </jaxb:bindings>
 165                             </jaxws:bindings>
 166                         </jaxws:bindings>
 167                         -->
 168                         NOTE: It MUST NOT be present if the jaxws:bindings appears inside a WSDL document.
 169                     </xs:documentation>
 170                 </xs:annotation>
 171             </xs:attribute>
 172 
 173             <xs:attribute name="version" type="xs:token" default="2.0">
 174                 <xs:annotation>
 175                     <xs:documentation>
 176                         Used to indicate the version of WSDL customization declarations. Only valid on root level
 177                         bindings element.
 178                         If this is absent, it will implicitly be assumed to be 2.0.
 179                     </xs:documentation>
 180                 </xs:annotation>
 181             </xs:attribute>
 182         </xs:complexType>
 183 
 184     </xs:element>
 185 
 186     <xs:complexType name="tJavaDoc">
 187         <xs:annotation></xs:annotation>
 188         <xs:sequence>
 189             <xs:element name="javadoc" type="xs:string" minOccurs="0"/>
 190         </xs:sequence>
 191     </xs:complexType>
 192 
 193     <xs:element name="package">
 194         <xs:annotation>
 195             <xs:documentation>
 196                 If absent, the default package name is computed from the targetNamespace of the WSDL in scope. The rules
 197                 of targetNamespace to Java package name is described in the JAXB specification.
 198 
 199                 Appears in the context of a WSDL document, either as an extension to the wsdl:definitions element or in
 200                 an external binding file at a place where there is a WSDL document in scope.
 201 
 202                 Scope:
 203                 wsd;definitions
 204 
 205                 Example:
 206                 <!--
 207                 <jaxws:bindings wsdlLocation="..."
 208                                 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 209                                 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 210                                 xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
 211                                 xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
 212                     <jaxws:package></jaxws:package>
 213                 </jaxws:bindings>
 214                 -->
 215             </xs:documentation>
 216         </xs:annotation>
 217 
 218         <xs:complexType>
 219             <xs:complexContent>
 220                 <xs:extension base="jaxws:tJavaDoc">
 221                     <xs:attribute name="name" type="xs:string" use="required"/>
 222                 </xs:extension>
 223             </xs:complexContent>
 224         </xs:complexType>
 225     </xs:element>
 226 
 227 
 228     <xs:element name="enableWrapperStyle" type="xs:boolean">
 229         <xs:annotation>
 230             <xs:documentation>
 231                 enableWrapperStyle can be used to disable wrapper style Java method generation. If absent the default
 232                 value of enableWrapperStyle is true. Setting it to true may not result into wrapper style method
 233                 generation unless the wrapper style rules are satisfied as defined in JAX-WS 2.1 specification 2.3.1.2.
 234 
 235                 Scope:
 236                 wsd;definitions, wsdl:portType, wsdl:portType/wsdl:operation.
 237 
 238                 Example:
 239                 <jaxws:bindings wsdlLocation="..."
 240                                 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 241                                 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 242                                 xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
 243                                 xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
 244                     <!-- Turn off wrapper style Java method signature generation -->
 245                     <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
 246                 </jaxws:bindings>
 247             </xs:documentation>
 248         </xs:annotation>
 249     </xs:element>
 250 
 251     <xs:element name="enableAsyncMapping" type="xs:boolean">
 252         <xs:annotation>
 253             <xs:documentation>
 254                 enableAsyncMapping can be used to enable async method generation in the entpoint interface generated
 255                 from a WSDL. If absent the default value of enableAsyncMapping is false. See JAX-WS 2.1 spec
 256                 section 2.3.4.2.
 257 
 258                 Scope:
 259                 wsd;definitions, wsdl:portType, wsdl:portType/wsdl:operation.
 260 
 261                 Note: These generated async methods can be used only on the client side.
 262 
 263                 Example:
 264                 <jaxws:bindings wsdlLocation="..."
 265                                 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 266                                 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 267                                 xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
 268                                 xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
 269                     <!-- Generate async methods in the generated Java endpoint interface for all the portTypes and
 270                     operations in the WSDL's scope.  -->
 271                     <jaxws:enableAsyncMapping>false</jaxws:enableAsyncMapping>
 272                 </jaxws:bindings>
 273             </xs:documentation>
 274         </xs:annotation>
 275     </xs:element>
 276 
 277     <xs:element name="enableMIMEContent" type="xs:boolean">
 278         <xs:annotation>
 279             <xs:documentation>
 280                 If present the use of the mime:content information is enabled as defined in the JAX-WS 2.1 spec
 281                 section 2.6.3.1
 282 
 283                 Scope:
 284                 wsdl:definitions, wsdl:binding, wsdl:binding/wsdl:operation
 285 
 286                 Example:
 287                 <jaxws:bindings wsdlLocation="..."
 288                                 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 289                                 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 290                                 xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
 291                                 xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
 292 
 293                     <!-- Enables MIME content for all the bindings in the WSDL's scope.  -->
 294                     <jaxws:enableMIMEContent>false</jaxws:enableMIMEContent>
 295                 </jaxws:bindings>
 296             </xs:documentation>
 297         </xs:annotation>
 298     </xs:element>
 299 
 300     <xs:element name="class">
 301         <xs:annotation>
 302             <xs:documentation>
 303                 Customizes the name of generated classes for the SEI, service class or the fault class.
 304 
 305                 Scope:
 306                 wsd;portType - The name of generated SEI (Service Endpoint Interface)
 307                 wsdl:portType/wsdl:operation/wsdl:fault - The generated fault class name.
 308                 wsdl:service - Name of the generated Service class.
 309 
 310                 Example:
 311 
 312                 <jaxws:bindings wsdlLocation="..."
 313                                 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 314                                 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 315                                 xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
 316                                 xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
 317 
 318                     <!-- Customize the generated SEI class name -->
 319                     <jaxws:bindings node="wsdl:definitions/wsdl:portType[@name='Hello']">
 320                         <jaxws:class name="HelloWorld"/>
 321                     </jaxws:bindings>
 322 
 323                     <!-- customize the generated Service class name -->
 324                     <jaxws:bindings node="wsdl:definitions/wsdl:service[@name='Hello']">
 325                         <jaxws:class name="CustomService"/>
 326                     </jaxws:bindings>
 327 
 328                     <!-- customize the generated fault class name -->
 329                     <jaxws:bindings
 330                             node="wsdl:definitions/wsdl:portType[@name='Hello']/wsdl:operation[@name='Foo']/wsdl:fault[@name='FooFault']">
 331                         <jaxws:class name="FooException"/>
 332                     </jaxws:bindings>
 333                 </jaxws:bindings>
 334             </xs:documentation>
 335         </xs:annotation>
 336         <xs:complexType>
 337             <xs:complexContent>
 338                 <xs:extension base="jaxws:tJavaDoc">
 339                     <xs:attribute name="name" type="xs:string" use="required"/>
 340                 </xs:extension>
 341             </xs:complexContent>
 342         </xs:complexType>
 343     </xs:element>
 344 
 345     <xs:element name="method">
 346         <xs:annotation>
 347             <xs:documentation>
 348                 Customizes the name of Java method in the generated classes.
 349 
 350                 Scope:
 351                 wsd;portType/wsdl:operation - name of Java methods corresponding to wsdl:operation
 352                 wsdl:service/wsdl:port - Name of the port getter in the generated Service class
 353 
 354                 Example:
 355 
 356                 <jaxws:bindings wsdlLocation="..."
 357                                 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 358                                 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 359                                 xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
 360                                 xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
 361 
 362                     <!-- Renames Java method from hello() to helloWorld() -->
 363                     <jaxws:bindings node="wsdl:definitions/wsdl:portType[@name='Hello']/wsdl:operation[@name='Hello']">
 364                         <jaxws:class name="helloWorld"/>
 365                     </jaxws:bindings>
 366 
 367                     <!-- Renames the generated port getter method form getHelloPort(), which is default for "HelloPort",
 368                      to getCustomizedPort -->
 369                     <jaxws:bindings node="wsdl:definitions/wsdl:service[@name='Hello']/wsdl:port[@name='HelloPort']">
 370                         <jaxws:method name="getCustomizedPort"/>
 371                     </jaxws:bindings>
 372 
 373                 </jaxws:bindings>
 374             </xs:documentation>
 375         </xs:annotation>
 376 
 377         <xs:complexType>
 378             <xs:complexContent>
 379                 <xs:extension base="jaxws:tJavaDoc">
 380                     <xs:attribute name="name" type="xs:string" use="required"/>
 381                 </xs:extension>
 382             </xs:complexContent>
 383         </xs:complexType>
 384     </xs:element>
 385 
 386     <xs:element name="parameter">
 387         <xs:annotation>
 388             <xs:documentation>
 389                 Customizes the name of the Java method parameters in the generated SEI.
 390 
 391                 Scope:
 392                 wsd;portType/wsdl:operation
 393                 wsdl:binding/wsdl:operation To rename wsdl:header (additional header parameters, this support is
 394                 optional as JAX-WS 2.1 spec makes additional header mapping optional.
 395                 Example:
 396 
 397                 <jaxws:bindings wsdlLocation="..."
 398                                 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 399                                 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 400                                 xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
 401                                 xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
 402                                 xmlns:types1="urn:test:types">
 403 
 404                     <!-- Rename a wrapper child parameter 'argument' to 'helloArgument'-->
 405                     <jaxws:bindings node="wsdl:definitions/wsdl:portType[@name='Hello']/wsdl:operation[@name='Hello']">
 406                         <jaxws:parameter
 407                                 part="wsdl:definitions/wsdl:message[@name='HelloRequest']/wsdl:part[@name='parameters']"
 408                                 childElementName="types1:argument" name="helloArgument"/>
 409                     </jaxws:bindings>
 410 
 411                     <!-- Rename a BARE parameter 'in' to 'fooRequest'-->
 412                     <jaxws:bindings node="wsdl:definitions/wsdl:portType[@name='Hello']/wsdl:operation[@name='Foo']">
 413                         <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
 414                         <jaxws:parameter part="wsdl:definitions/wsdl:message[@name='FooRequest']/wsdl:part[@name='in']"
 415                                          name="fooRequest"/>
 416                     </jaxws:bindings>
 417                 </jaxws:bindings>
 418 
 419             </xs:documentation>
 420         </xs:annotation>
 421         <xs:complexType>
 422             <xs:attribute name="part" type="xs:string" use="required">
 423                 <xs:annotation>
 424                     <xs:documentation>
 425                         A XPath expression identifying a wsdl:part child of a wsdl:message.
 426                     </xs:documentation>
 427                 </xs:annotation>
 428             </xs:attribute>
 429             <xs:attribute name="childElementName" type="xs:QName" use="optional">
 430                 <xs:annotation>
 431                     <xs:documentation>
 432                         The qualified name of a child element information item of the global type definition or global
 433                         element declaration referred to by the wsdl:part identified by the previous attribute. It is
 434                         optional and you need it only to rename parameters corresponding to wrapper style operation.
 435                     </xs:documentation>
 436                 </xs:annotation>
 437             </xs:attribute>
 438             <xs:attribute name="name" type="xs:string" use="required">
 439                 <xs:annotation>
 440                     <xs:documentation>
 441                         The name of the Java formal parameter corresponding to the parameter identified by the previous
 442                         two attributes.
 443                     </xs:documentation>
 444                 </xs:annotation>
 445             </xs:attribute>
 446         </xs:complexType>
 447     </xs:element>
 448 
 449     <xs:element name="provider">
 450         <xs:annotation>
 451             <xs:documentation>
 452                 This binding declaration specifies that the annotated port will be used with the
 453                 javax.xml.ws.Provider interface.
 454             </xs:documentation>
 455         </xs:annotation>
 456     </xs:element>
 457 
 458 </xs:schema>