Giter Site home page Giter Site logo

elasticio / soa-model Goto Github PK

View Code? Open in Web Editor NEW

This project forked from membrane/soa-model

0.0 2.0 0.0 21.74 MB

Toolkit and Java API for WSDL, WADL and XML Schema.

Home Page: http://www.membrane-soa.org/soa-model/

License: Apache License 2.0

Dockerfile 0.10% Groovy 89.06% CSS 3.26% JavaScript 1.13% Java 4.50% Batchfile 0.22% Shell 0.34% XSLT 1.39%

soa-model's Introduction

Membrane SOA Model

Check the Repository at GitHub for the latest source code. What is SOA Model?

Membrane SOA Model is an open-source toolkit and Java API for WSDL and XML Schema, licensed under ASF 2.0. that can:

  • Parse, create or modify a WSDL or XML Schema Document from Java
  • Compare two WSDL or XML Schema Documents
  • Create a SOAP Request or Template
  • Analyze a WSDL or Schema document and generate an HMTL report

Command Line Tools

Membrane SOA Model provides command line tools beside the java api for

  • Analyzing a WSDL document and generating a report
  • Creating a SOAP request or template out of WSDL
  • Comparing two WSDL or Schema documents

All you need is to download and run the batch with commands.

Code Samples

Here are some examples of the tasks you can achive with SOA Model. For more details see the documentation.

Parsing a wsdl:

WSDLParser parser = new WSDLParser();
Definitions defs = parser.parse("http://ws.xwebservices.com/XWebBlog/V2/XWebBlog.wsdl");

Creating a new wsdl:

Definitions wsdl = new Definitions("http://predic8.com/wsdl/AddService/1/", "AddService");
wsdl.add(schema);
PortType pt = wsdl.newPortType("AddPortType");
Operation op = pt.newOperation("add");
op.newInput("add").newMessage("add").newPart("parameters", "tns:add");
op.newOutput("addResponse").newMessage("addResponse").newPart("parameters", "tns:addResponse");
return wsdl;

Comparing two wsdls:

Definitions wsdl1 = parser.parse("resources/diff/1/article.wsdl");
Definitions wsdl2 = parser.parse("resources/diff/2/article.wsdl");
WsdlDiffGenerator diffGen = new WsdlDiffGenerator(wsdl1, wsdl2);
List<Difference> lst = diffGen.compare();

Comparing two schemas:

Schema schema1 = parser.parse("resources/diff/1/common.xsd"); 
Schema schema2 = parser.parse("resources/diff/2/common.xsd");
SchemaDiffGenerator diffGen = new SchemaDiffGenerator(schema1, schema2);
List<Difference> lst = diffGen.compare();

Creating a soap request:

Definitions wsdl = parser.parse("resources/article/article.wsdl");
StringWriter writer = new StringWriter();
SOARequestCreator creator = new SOARequestCreator(wsdl, new RequestTemplateCreator(), new MarkupBuilder(writer));
//creator.createRequest(PortType name, Operation name, Binding name);
creator.createRequest("ArticleServicePT", "create", "ArticleServicePTBinding");
System.out.println(writer);

Integration Testing

To run "mvn integration-test" in an isolated environment, you may run

docker build .

if you have a Docker Engine available.

soa-model's People

Contributors

ithena avatar predic8 avatar r41d avatar g1l3sp avatar rrayst avatar vlk32 avatar pascalschumacher avatar xorpherion avatar nc-bmv avatar arykov avatar kanelai avatar tpunder avatar teacube avatar gbonk avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.