| 1 |
<?xml version="1.0" ?> |
| 2 |
|
| 3 |
<definitions |
| 4 |
name="ref types test" |
| 5 |
targetNamespace="urn:ref.types.test" |
| 6 |
xmlns:tns="urn:ref.types.test" |
| 7 |
xmlns:typens="urn:ref.types" |
| 8 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
| 9 |
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" |
| 10 |
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" |
| 11 |
xmlns="http://schemas.xmlsoap.org/wsdl/"> |
| 12 |
|
| 13 |
<!-- type defs --> |
| 14 |
<types> |
| 15 |
<xsd:schema |
| 16 |
targetNamespace="urn:ref.types" |
| 17 |
xmlns:xsd="http://www.w3.org/1999/XMLSchema"> |
| 18 |
|
| 19 |
<xsd:simpleType name="enum"> |
| 20 |
<xsd:restriction base="xsd:string"> |
| 21 |
<xsd:enumeration value="one"/> |
| 22 |
<xsd:enumeration value="two"/> |
| 23 |
<xsd:enumeration value="three"/> |
| 24 |
</xsd:restriction> |
| 25 |
</xsd:simpleType> |
| 26 |
|
| 27 |
<xsd:complexType name="phone"> |
| 28 |
<xsd:all> |
| 29 |
<xsd:element name="areaCode" type="xsd:int"/> |
| 30 |
<xsd:element name="exchange" type="xsd:string"/> |
| 31 |
<xsd:element name="number"> |
| 32 |
<xsd:complexType> |
| 33 |
<xsd:simpleContent> |
| 34 |
<xsd:extension base = "xsd:string"> |
| 35 |
<xsd:attribute name= "length" type="xsd:int" /> |
| 36 |
</xsd:extension> |
| 37 |
</xsd:simpleContent> |
| 38 |
</xsd:complexType> |
| 39 |
</xsd:element> |
| 40 |
</xsd:all> |
| 41 |
</xsd:complexType> |
| 42 |
|
| 43 |
<xsd:complexType name="example"> |
| 44 |
<xsd:all> |
| 45 |
<xsd:element name="address" type="soapenc:string"/> |
| 46 |
<!-- both example and phone contain anonymous types of number elements. --> |
| 47 |
<!-- This should result in two Number classes...one which has a mangled name --> |
| 48 |
<xsd:element name="number"> |
| 49 |
<xsd:complexType> |
| 50 |
<xsd:simpleContent> |
| 51 |
<xsd:extension base = "xsd:string"> |
| 52 |
<xsd:attribute name= "theLength" type="xsd:int" /> |
| 53 |
</xsd:extension> |
| 54 |
</xsd:simpleContent> |
| 55 |
</xsd:complexType> |
| 56 |
</xsd:element> |
| 57 |
|
| 58 |
</xsd:all> |
| 59 |
</xsd:complexType> |
| 60 |
|
| 61 |
<!-- element has the same name as the type. This is allowed by xlm schema --> |
| 62 |
<!-- note that the Phone element is a collection of Phone types --> |
| 63 |
<!-- no mangling should occur since the same underlying java type is used --> |
| 64 |
<xsd:element name="phone" type="typens:phone" maxOccurs="unbounded"/> |
| 65 |
|
| 66 |
<!-- enum element which is the same as the enum type --> |
| 67 |
<!-- no mangling should occur since the same java type is used --> |
| 68 |
<xsd:element name="enum" type="typens:enum"/> |
| 69 |
|
| 70 |
<!-- This is a 'forward use' of a type. Not sure if this is legal, but we currently accept it --> |
| 71 |
<xsd:element name="forward" type="typens:forward" /> |
| 72 |
<xsd:complexType name="forward"> |
| 73 |
<xsd:all> |
| 74 |
<xsd:element name="address" type="soapenc:string"/> |
| 75 |
</xsd:all> |
| 76 |
</xsd:complexType> |
| 77 |
|
| 78 |
<!-- The following have same qname but different java types (NoMangle and Example). --> |
| 79 |
<!-- No mangling should occur --> |
| 80 |
<xsd:complexType name="noMangle"> |
| 81 |
<xsd:all> |
| 82 |
<xsd:element name="address" type="soapenc:string"/> |
| 83 |
</xsd:all> |
| 84 |
</xsd:complexType> |
| 85 |
<xsd:element name="noMangle" type="typens:example" /> |
| 86 |
|
| 87 |
<!-- The following two have same qname and same java names (for different java types). --> |
| 88 |
<!-- mangling should occur --> |
| 89 |
<!-- Note the use of the 'mangle collection' in info..which should be properly mangled --> |
| 90 |
<xsd:complexType name="mangle"> |
| 91 |
<xsd:all> |
| 92 |
<xsd:element name="one" type="soapenc:string"/> |
| 93 |
</xsd:all> |
| 94 |
</xsd:complexType> |
| 95 |
<xsd:element name="mangle" > |
| 96 |
<xsd:complexType> |
| 97 |
<xsd:all> |
| 98 |
<xsd:element name="two" type="soapenc:string"/> |
| 99 |
</xsd:all> |
| 100 |
</xsd:complexType> |
| 101 |
</xsd:element > |
| 102 |
|
| 103 |
<xsd:complexType name="info"> |
| 104 |
<xsd:all> |
| 105 |
<!-- This is a reference to phone. It should be a collection since the |
| 106 |
phone element has the unbounded attribute --> |
| 107 |
<xsd:element ref="typens:phone"/> |
| 108 |
<xsd:element ref="typens:enum"/> |
| 109 |
<xsd:element name="forward" type="typens:forward"/> |
| 110 |
<xsd:element ref="typens:noMangle"/> |
| 111 |
<xsd:element name="noMangle2" type="typens:noMangle"/> |
| 112 |
<xsd:element ref="typens:mangle"/> |
| 113 |
<!-- The following better be Mangle_Type[], not Mangle[] --> |
| 114 |
<xsd:element name="mangle2" type="typens:mangle" maxOccurs="unbounded" /> |
| 115 |
|
| 116 |
<!-- Make sure WSDL2Java properly sets the option element as referenced --> |
| 117 |
<xsd:element ref="typens:option" minOccurs="1" maxOccurs="unbounded" /> |
| 118 |
</xsd:all> |
| 119 |
</xsd:complexType> |
| 120 |
|
| 121 |
<xsd:element name="option" type="typens:optionType"/> |
| 122 |
<xsd:complexType name="optionType"> |
| 123 |
<xsd:sequence> |
| 124 |
<xsd:element name="name" type="xsd:string" /> |
| 125 |
<xsd:element name="value" type="xsd:string" /> |
| 126 |
</xsd:sequence> |
| 127 |
</xsd:complexType> |
| 128 |
</xsd:schema> |
| 129 |
</types> |
| 130 |
|
| 131 |
<!-- message declns --> |
| 132 |
<message name="empty" /> |
| 133 |
<message name="message"> |
| 134 |
<part name="arg" type="typens:info" /> |
| 135 |
</message> |
| 136 |
|
| 137 |
<!-- port type declns --> |
| 138 |
<portType name="RefTest"> |
| 139 |
<operation name="test"> |
| 140 |
<input message="tns:message"/> |
| 141 |
<output message="tns:empty"/> |
| 142 |
</operation> |
| 143 |
</portType> |
| 144 |
|
| 145 |
<!-- binding declns --> |
| 146 |
<binding name="RefTestBinding" type="tns:RefTest"> |
| 147 |
<soap:binding |
| 148 |
style="rpc" |
| 149 |
transport="http://schemas.xmlsoap.org/soap/http"/> |
| 150 |
<operation name="test"> |
| 151 |
<soap:operation soapAction=""/> |
| 152 |
<input> |
| 153 |
<soap:body |
| 154 |
use="encoded" |
| 155 |
namespace="" |
| 156 |
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
| 157 |
</input> |
| 158 |
<output> |
| 159 |
<soap:body |
| 160 |
use="encoded" |
| 161 |
namespace="" |
| 162 |
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> |
| 163 |
</output> |
| 164 |
</operation> |
| 165 |
</binding> |
| 166 |
|
| 167 |
<!-- service decln --> |
| 168 |
<service name="RefTestService"> |
| 169 |
<port name="RefTest" binding="tns:RefTestBinding"> |
| 170 |
<soap:address location="http://localhost:8080/axis/services/RefTest"/> |
| 171 |
</port> |
| 172 |
</service> |
| 173 |
|
| 174 |
</definitions> |
| 175 |
|