Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SOAP to REST Conversion

SOAP to REST Conversion

More Decks by API Strategy & Practice Conference

Other Decks in Technology

Transcript

  1. © 2015 predic8 GmbH About me •  Programmer •  Open

    Source –  Membrane Service Proxy •  Co-Founder –  predic8, Bonn ( APIs, Integration) –  Orientation in Objects, Mannheim ( Java, JavaScript Development) 2
  2. © 2015 predic8 GmbH 9 Func%on   Variable   List

     of  Parameters     article = createArticle( 45,“Oolong“, 4.98)
  3. © 2015 predic8 GmbH 10 PUT /articles/455 { "article" :

    { "name" : "Oolong", "text" : "Green Tea", "price" : 5.99 } } Generic  Methode   Resource  
  4. © 2015 predic8 GmbH SOAP Operation HTTP Method Path Params

    Request Body Response Body Request Header Response Header Status Code get GET /articles/{id} id - JSON, XML Accept Content- Type 200, 404 getAll GET /articles/ - - JSON, XML Accept Content- Type 200, 404 delete DELETE /articles/{id} id - - 204 create POST /articles/ -. JSON, XML - Content- Type Location 201 14
  5. © 2015 predic8 GmbH 16 POST /articles/ HTTP/1.1 Content-Type: application/json

    { "article" : { "name" : "Oolong", "text" : "Green Tea", "price" : 5.99 } } API Gateway ArticleService Service Proxy REST2SOAP SOAP REST/JSON
  6. © 2015 predic8 GmbH <s11:Envelope xmlns:s11=“..."> <s11:Body> <ar:create xmlns:ar=“..."> <article>

    <name>Oolong</name> <description>Green Tea</description> <price> <amount>5.99</amount> <currency>EUR</currency> </price> </article> </ar:create> </s11:Body> </s11:Envelope> 17 API Gateway ArticleService Service Proxy REST2SOAP SOAP REST/JSON
  7. © 2015 predic8 GmbH 19 <http:request xmlns:http="http://membrane-soa.org/schemas/http/v1/" method="POST" http-version="1.1"> <uri

    value="/articles/"> <path> <component>articles</component> </path> </uri> <headers> <header name="Accept">*/*</header> <header name="Content-Type">application/json</header> </headers> <body type="json"> <root type="o"> <article type="o"> <name type="s">Oolong</name> <text type="s">Green Tea</description> <price type="f">5.99</price> </article> </root> </body> </http:request>
  8. © 2015 predic8 GmbH 20 <soap:Envelope xmlns:soap=“..."> <soap:Body> <ns2:createResponse xmlns:ns2=“...">

    <id>AR-00009</id> </ns2:createResponse> </soap:Body> </soap:Envelope> 20 API Gateway ArticleService Service Proxy REST2SOAP SOAP REST/JSON
  9. © 2015 predic8 GmbH 21 HTTP/1.1 201 Created Location: http://localhost/articles/AR-00009

    21 API Gateway ArticleService Service Proxy REST2SOAP SOAP REST/JSON