https://github.com/membrane/soa-model
Toolkit and Java API for WSDL, WADL and XML Schema.
https://github.com/membrane/soa-model
Last synced: 5 months ago
JSON representation
Toolkit and Java API for WSDL, WADL and XML Schema.
- Host: GitHub
- URL: https://github.com/membrane/soa-model
- Owner: membrane
- License: apache-2.0
- Created: 2012-11-19T13:00:49.000Z (almost 13 years ago)
- Default Branch: main
- Last Pushed: 2025-02-06T09:21:41.000Z (8 months ago)
- Last Synced: 2025-04-14T10:42:38.859Z (6 months ago)
- Language: Groovy
- Homepage: http://www.membrane-soa.org/soa-model/
- Size: 21.5 MB
- Stars: 91
- Watchers: 21
- Forks: 73
- Open Issues: 48
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-java - Membrane SOA Model
README
Membrane SOA Model
==================
Check the [Repository at GitHub](https://github.com/membrane/soa-model) 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 reportCommand 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 documentsAll 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](http://membrane-soa.org/soa-model-doc/).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 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 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.