|
| 1 | +# ABYSS SPEC TRANSFORMER |
| 2 | + |
| 3 | +This application generates an OpenAPI definition file based on 3.0 specification from a wsdl which gives as a URL or directory path. |
| 4 | +An example is below |
| 5 | + |
| 6 | +**Input** |
| 7 | + |
| 8 | +```xml |
| 9 | +<?xml version="1.0" standalone="no"?> |
| 10 | +<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" |
| 11 | + xmlns="http://schemas.xmlsoap.org/wsdl/" |
| 12 | + xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" |
| 13 | + xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" |
| 14 | + xmlns:tns="http://thomas-bayer.com/blz/" |
| 15 | + xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
| 16 | + xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" |
| 17 | + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" |
| 18 | + xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" |
| 19 | + targetNamespace="http://thomas-bayer.com/blz/"> |
| 20 | + <wsdl:documentation>BLZService</wsdl:documentation> |
| 21 | + <wsdl:types> |
| 22 | + <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://thomas-bayer.com/blz/"> |
| 23 | + <xsd:element name="getBank" type="tns:getBankType"></xsd:element> |
| 24 | + <xsd:element name="getBankResponse" type="tns:getBankResponseType"></xsd:element> |
| 25 | + <xsd:complexType name="getBankType"> |
| 26 | + <xsd:sequence> |
| 27 | + <xsd:element name="blz" type="xsd:string"></xsd:element> |
| 28 | + </xsd:sequence> |
| 29 | + </xsd:complexType> |
| 30 | + <xsd:complexType name="getBankResponseType"> |
| 31 | + <xsd:sequence> |
| 32 | + <xsd:element name="details" type="tns:detailsType"></xsd:element> |
| 33 | + </xsd:sequence> |
| 34 | + </xsd:complexType> |
| 35 | + <xsd:complexType name="detailsType"> |
| 36 | + <xsd:sequence> |
| 37 | + <xsd:element minOccurs="0" name="bezeichnung" type="xsd:string"></xsd:element> |
| 38 | + <xsd:element minOccurs="0" name="bic" type="xsd:string"></xsd:element> |
| 39 | + <xsd:element minOccurs="0" name="ort" type="xsd:string"></xsd:element> |
| 40 | + <xsd:element minOccurs="0" name="plz" type="xsd:string"></xsd:element> |
| 41 | + </xsd:sequence> |
| 42 | + </xsd:complexType> |
| 43 | + </xsd:schema> |
| 44 | + </wsdl:types> |
| 45 | + <wsdl:message name="getBank"> |
| 46 | + <wsdl:part name="parameters" element="tns:getBank"></wsdl:part> |
| 47 | + </wsdl:message> |
| 48 | + <wsdl:message name="getBankResponse"> |
| 49 | + <wsdl:part name="parameters" element="tns:getBankResponse"></wsdl:part> |
| 50 | + </wsdl:message> |
| 51 | + <wsdl:portType name="BLZServicePortType"> |
| 52 | + <wsdl:operation name="getBank"> |
| 53 | + <wsdl:input message="tns:getBank"></wsdl:input> |
| 54 | + <wsdl:output message="tns:getBankResponse" wsaw:Action="http://thomas-bayer.com/blz/BLZService/getBankResponse"></wsdl:output> |
| 55 | + </wsdl:operation> |
| 56 | + </wsdl:portType> |
| 57 | + <wsdl:binding name="BLZServiceSOAP11Binding" type="tns:BLZServicePortType"> |
| 58 | + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"></soap:binding> |
| 59 | + <wsdl:operation name="getBank"> |
| 60 | + <soap:operation style="document" soapAction=""></soap:operation> |
| 61 | + <wsdl:input> |
| 62 | + <soap:body use="literal"></soap:body> |
| 63 | + </wsdl:input> |
| 64 | + <wsdl:output> |
| 65 | + <soap:body use="literal"></soap:body> |
| 66 | + </wsdl:output> |
| 67 | + </wsdl:operation> |
| 68 | + </wsdl:binding> |
| 69 | + <wsdl:binding name="BLZServiceSOAP12Binding" type="tns:BLZServicePortType"> |
| 70 | + <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"></soap12:binding> |
| 71 | + <wsdl:operation name="getBank"> |
| 72 | + <soap12:operation style="document" soapAction=""></soap12:operation> |
| 73 | + <wsdl:input> |
| 74 | + <soap12:body use="literal"></soap12:body> |
| 75 | + </wsdl:input> |
| 76 | + <wsdl:output> |
| 77 | + <soap12:body use="literal"></soap12:body> |
| 78 | + </wsdl:output> |
| 79 | + </wsdl:operation> |
| 80 | + </wsdl:binding> |
| 81 | + <wsdl:binding name="BLZServiceHttpBinding" type="tns:BLZServicePortType"> |
| 82 | + <http:binding verb="POST"></http:binding> |
| 83 | + <wsdl:operation name="getBank"> |
| 84 | + <http:operation location="BLZService/getBank"></http:operation> |
| 85 | + <wsdl:input> |
| 86 | + <mime:content part="getBank" type="text/xml"></mime:content> |
| 87 | + </wsdl:input> |
| 88 | + <wsdl:output> |
| 89 | + <mime:content part="getBank" type="text/xml"></mime:content> |
| 90 | + </wsdl:output> |
| 91 | + </wsdl:operation> |
| 92 | + </wsdl:binding> |
| 93 | + <wsdl:service name="BLZService"> |
| 94 | + <wsdl:port name="BLZServiceSOAP11port_http" binding="tns:BLZServiceSOAP11Binding"> |
| 95 | + <soap:address location="http://www.thomas-bayer.com/axis2/services/BLZService"></soap:address> |
| 96 | + </wsdl:port> |
| 97 | + <wsdl:port name="BLZServiceSOAP12port_http" binding="tns:BLZServiceSOAP12Binding"> |
| 98 | + <soap12:address location="http://www.thomas-bayer.com/axis2/services/BLZService"></soap12:address> |
| 99 | + </wsdl:port> |
| 100 | + <wsdl:port name="BLZServiceHttpport" binding="tns:BLZServiceHttpBinding"> |
| 101 | + <http:address location="http://www.thomas-bayer.com/axis2/services/BLZService"></http:address> |
| 102 | + </wsdl:port> |
| 103 | + </wsdl:service> |
| 104 | +</wsdl:definitions> |
| 105 | +``` |
| 106 | + |
| 107 | +**Output** |
| 108 | + |
| 109 | +```java |
| 110 | +OpenAPITransformer openAPITransformer = new OpenAPITransformer(); |
| 111 | + openAPITransformer.transform("http://thomas-bayer.com/axis2/services/BLZService?wsdl");` |
| 112 | +``` |
| 113 | + |
| 114 | +```yaml |
| 115 | +openapi: 3.0.1 |
| 116 | +info: |
| 117 | + title: BLZService |
| 118 | + version: "1.0" |
| 119 | +servers: |
| 120 | +- url: http://www.thomas-bayer.com/axis2/services/BLZService |
| 121 | +tags: |
| 122 | +- name: BLZServiceSOAP11Binding |
| 123 | + externalDocs: |
| 124 | + description: Soap 1.1 Service |
| 125 | + url: http://www.thomas-bayer.com/axis2/services/BLZService |
| 126 | +- name: BLZServiceHttpBinding |
| 127 | + externalDocs: |
| 128 | + description: HTTP Service |
| 129 | + url: http://www.thomas-bayer.com/axis2/services/BLZService |
| 130 | +- name: BLZServiceSOAP12Binding |
| 131 | + externalDocs: |
| 132 | + description: Soap 1.2 Service |
| 133 | + url: http://www.thomas-bayer.com/axis2/services/BLZService |
| 134 | +paths: |
| 135 | + /BLZService/getBank: |
| 136 | + post: |
| 137 | + tags: |
| 138 | + - BLZServiceHttpBinding |
| 139 | + operationId: getBank_HttpService |
| 140 | + requestBody: |
| 141 | + $ref: '#/components/requestBodies/getBank' |
| 142 | + responses: |
| 143 | + 200: |
| 144 | + $ref: '#/components/responses/200_getBankResponse' |
| 145 | + /getBank: |
| 146 | + post: |
| 147 | + tags: |
| 148 | + - BLZServiceSOAP12Binding |
| 149 | + - BLZServiceSOAP11Binding |
| 150 | + operationId: getBank_SoapService |
| 151 | + requestBody: |
| 152 | + $ref: '#/components/requestBodies/getBank' |
| 153 | + responses: |
| 154 | + 200: |
| 155 | + $ref: '#/components/responses/200_getBankResponse' |
| 156 | +components: |
| 157 | + schemas: |
| 158 | + getBankResponseType: |
| 159 | + title: getBankResponseType |
| 160 | + required: |
| 161 | + - details |
| 162 | + type: object |
| 163 | + properties: |
| 164 | + details: |
| 165 | + $ref: '#/components/schemas/detailsType' |
| 166 | + getBankResponse: |
| 167 | + title: getBankResponse |
| 168 | + required: |
| 169 | + - getBankResponseType |
| 170 | + type: object |
| 171 | + properties: |
| 172 | + getBankResponseType: |
| 173 | + $ref: '#/components/schemas/getBankResponseType' |
| 174 | + getBankType: |
| 175 | + title: getBankType |
| 176 | + required: |
| 177 | + - blz |
| 178 | + type: object |
| 179 | + properties: |
| 180 | + blz: |
| 181 | + type: string |
| 182 | + detailsType: |
| 183 | + title: detailsType |
| 184 | + required: |
| 185 | + - bezeichnung |
| 186 | + - bic |
| 187 | + - ort |
| 188 | + - plz |
| 189 | + type: object |
| 190 | + properties: |
| 191 | + bezeichnung: |
| 192 | + type: string |
| 193 | + bic: |
| 194 | + type: string |
| 195 | + ort: |
| 196 | + type: string |
| 197 | + plz: |
| 198 | + type: string |
| 199 | + getBank: |
| 200 | + title: getBank |
| 201 | + required: |
| 202 | + - getBankType |
| 203 | + type: object |
| 204 | + properties: |
| 205 | + getBankType: |
| 206 | + $ref: '#/components/schemas/getBankType' |
| 207 | + responses: |
| 208 | + 200_getBankResponse: |
| 209 | + description: Successful operation |
| 210 | + content: |
| 211 | + application/xml: |
| 212 | + schema: |
| 213 | + $ref: '#/components/x-messages/getBankResponse' |
| 214 | + requestBodies: |
| 215 | + getBank: |
| 216 | + description: getBank message object as request body |
| 217 | + content: |
| 218 | + application/xml: |
| 219 | + schema: |
| 220 | + $ref: '#/components/x-messages/getBank' |
| 221 | + required: true |
| 222 | + x-messages: |
| 223 | + getBankResponse: |
| 224 | + $ref: '#/components/schemas/getBankResponse' |
| 225 | + getBank: |
| 226 | + $ref: '#/components/schemas/getBank' |
| 227 | +``` |
0 commit comments