JBoss.orgCommunity Documentation

S-RAMP Guide


TBD

Preface
1. Introduction to S-RAMP
1.1. The S-RAMP Specification
1.2. Purpose
1.3. Overview
1.4. Core Properties
1.5. Custom Properties
1.6. Classifiers
1.7. Relationships
2. Getting Started
2.1. Prerequisites
2.2. Download, Installation and Configuration
2.3. Check your Installation
3. S-RAMP Data Models
3.1. Core Data Model (core)
3.2. XML Schema (XSD) Data Model (xsd)
3.3. WSDL Data Model (wsdl)
3.4. Policy Data Model (policy)
3.5. SOA Data Model (soa)
3.6. Service Implementation Data Model (serviceImplementation)
3.7. Custom/Extension Data Models (ext)
4. Query Language
5. S-RAMP REST API
5.1. Overview
5.2. Adding Artifacts
5.3. Updating Artifacts
5.4. Deleting Artifacts
5.5. Querying
5.5.1. Queries
5.5.2. Feeds
5.6. Getting Full Artifact
5.7. Batch changes: S-RAMP Archives (Packages)
6. Overlord S-RAMP Implementation
6.1. Overview
6.2. Server
6.2.1. Overview
6.2.2. Configuring
6.2.3. Extending: Custom Deriver
6.3. Client
6.3.1. Basic Usage
6.3.2. Extended Feature: Ontologies
6.3.3. Extended Feature: Auditing
7. Overlord S-RAMP REST API Endpoints
7.1. API: Get Service Document
7.2. API: Publish Artifact
7.2.1. Publish a Document Style Artifact
7.2.2. Publish a Non-Document Style Artifact
7.2.3. Publish a Document Style Artifact with Meta-Data
7.3. API: Update Artifact
7.4. API: Update Artifact Content
7.5. API: Get Artifact
7.6. API: Get Artifact Content
7.7. API: Delete Artifact
7.8. API: Get Artifact Feed (by model)
7.9. API: Get Artifact Feed (by type)
7.10. API: Query
7.11. API: Query
7.12. API: Batch Processing
7.13. API: Add Ontology
7.14. API: List Ontologies
7.15. API: Update Ontology
7.16. API: Get Ontology
7.17. API: Delete Ontology
7.18. API: Get Artifact Audit History
7.19. API: Get User Audit History
7.20. API: Add Artifact Audit Entry
7.21. API: Get Artifact Audit Entry
8. Overlord S-RAMP Command Line
8.1. Connecting to S-RAMP server
8.2. Browsing the S-RAMP repository
8.3. Updating artifact MetaData
8.3.1. Properties
8.3.2. Custom Properties
8.3.3. Classifications
8.4. Querying the S-RAMP Repository using XPath2 Syntax
9. Overlord S-RAMP Maven Integration
9.1. Overview
9.2. Enabling the S-RAMP Wagon
9.3. Deploying to S-RAMP
10. S-RAMP Samples
11. SOA Governance
11.1. Introduction
11.2. Concepts
11.3. Workflow
11.3.1. Repository Events using S-RAMP Queries
12. API Managment
12.1. Introduction
A. Example Appendix
A.1. Appendix Sub-section
Example Bibliography
Example Glossary
Index

TBD

S-RAMP stands for SOA Repository Artifact Model and Protocol. S-RAMP is a new specification worked on by the OASIS Technical Committee.

 

The SOA Repository Artifact Model and Protocol (S-RAMP) TC defines a common data model for SOA repositories as well as an interaction protocol to facilitate the use of common tooling and sharing of data. The TC will define an ATOM binding which documents the syntax for interaction with a compliant repository for create, read, update, delete and query operations.

 
 -- OASIS Charter https://www.oasis-open.org/committees/s-ramp/charter.php

The first version of the specification (1.0) should be finalized in the first half of 2013. Two of the developers on the project participated in the Technical Committee.

The s-ramp-<version>.zip (or tar.gz) archive can be downloaded from the http://www.jboss.org/overlord website. Grab the latest, extract the archive and run:

ant install

The first thing this does is to download jBPM, RESTEasy and ModeShape from sourceforge.

Note

This download is slow and can take up to 15 minutes.

The downloads will be stored in the jbpm5 directory, so future installs will be faster. In this same directory it will create a jbpm-installer directory with jBPM and a sub-directory containing the application server jboss-as-7.1.1.Final. The application server has ModeShape and RESTEasy ed as modules. Next run:

ant configure

This will add some S-RAMP specific services to jBPM. It deploys the s-ramp-server.war, the s-ramp-ui.war and the governance.war. Finally, it points jBPM to obtain its workflow data from the S-RAMP repository, rather than BRMS/Drools-Guvnor. At this point we want to populate the S-RAMP repository with some initial data. For this the repository needs to be up and running. Go ahead and start the JBoss application server by running:

ant start

If your system support the tail command, you can run:

ant tail

This will monitor the startup process. It should be ready as soon as you see the following in the application server console output:

[exec] 12:00:13,905 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "s-ramp-ui.war"
[exec] 12:00:13,910 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "s-ramp-server.war"
[exec] 12:00:13,915 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "s-ramp-governance.war"
[exec] 12:00:13,918 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "jbpm-human-task-war.war"
[exec] 12:00:13,922 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "jbpm-gwt-console.war"
[exec] 12:00:13,925 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "jbpm-gwt-console-server.war"
[exec] 12:00:13,928 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "jbpm-form-builder.war"
[exec] 12:00:13,931 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "drools-guvnor.war"
[exec] 12:00:13,933 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "designer.war"

Tip

S-RAMP can be configured to use a remote jBPM server, so to cut down on bootup time you can deploy the S-RAMP applications on a dedicated application server.

Now you can upload the by running:

ant upload

This completes the installation process.

To make sure your installation works you can fire up the s-ramp-ui. You should see the GUI as shown in Figure 2.1, “Welcome screen of the s-ramp-ui.”:


You can click on Browse Artifacts and see a list of files related to the S-RAMP default workflows. Alternatively you can fire up the s-ramp shell in the bin directory of the distribution:

./s-ramp.sh
**********************************************************************
           _____       ______  ___ ___  ________
          /  ___|      | ___ \/ _ \|  \/  | ___ \
          \ `--. ______| |_/ / /_\ \ .  . | |_/ /
           `--. \______|    /|  _  | |\/| |  __/
          /\__/ /      | |\ \| | | | |  | | |
          \____/       \_| \_\_| |_|_|  |_|_|

  JBoss S-RAMP Kurt Stam and Eric Wittmann, Licensed under the
  Apache License, V2.0, Copyright 2012
**********************************************************************
s-ramp>

To connect the shell to the server type connect and hit the tab key. It should auto-complete to say s-ramp:connect http://localhost:8080/s-ramp-server and when hitting the return key the cursor should go from red to green. To browse the artifacts in the repository run the following query:

s-ramp> s-ramp:query /s-ramp
Querying the S-RAMP repository:
	/s-ramp
Atom Feed (9 entries)
  Idx                    Type Name
  ---                    ---- ----
    1           ImageDocument user-properties.png
    2                Document overlord.demo.CheckDeployment-taskform.flt
    3         BrmsPkgDocument SRAMPPackage.pkg
    4           ImageDocument overlord.demo.SimpleReleaseProcess-image.png
    5           ImageDocument run-build-install.png
    6                Document overlord.demo.SimpleReleaseProcess-taskform.flt
    7           ImageDocument audio-input-microphone-3.png
    8            BpmnDocument overlord.demo.SimpleReleaseProcess.bpmn
    9            TextDocument HttpClientWorkDefinitions.wid

In later chapters will go into more detail, but if this all worked you can be sure that your installation is in good working order.

The S-RAMP specification defines a number of built-in artifact types, while also allowing clients to define their own (implicit) types. This section of the Guide describes these different models.

An artifact may have document (e.g file) content or it may be a purely logical artifact. In either case, clients typically add artifacts to the repository directly (e.g. via the S-RAMP Atom API, described later in this guide).

Additionally, some document style artifact types when added to the repository, will result in the creation of a set of "derived" artifacts. For example, if an XSD document is added to the repository, the server will automatically extract the element declarations from the content of the file resulting in a set of additional artifacts "related" to the original. This will be described in detail further in the XSD Data Model section.

Another key aspect of the S-RAMP specification is the query language it defines, which allows clients to find artifacts by various criteria. The S-RAMP query language is a subset of the XPath 2.0 language, designed specifically to find and select S-RAMP artifacts.

Tip

for detailed information about the S-RAMP Query Language, see Section 4 of the S-RAMP specification’s foundation document.

As you might imagine, the query language allows clients to find artifacts based on any of the already discussed artifact meta-data, including:

*Core Properties *Custom Properties *Classifiers *Relationships

The basic structure of a typical S-RAMP query looks like this:

/s-ramp/<artifactModel>/<artifactType>/[ <artifact-predicate> ]/relationship[ <target-artifact-predicate> ]

Of course, not all of the components of the above query are required. It is likely best to provide the following table of examples of a range of queries:

QueryWhat It Selects

/s-ramp

All artifacts.

/s-ramp/core

All Core Model artifacts.

/s-ramp/xsd/XsdDocument

All XsdDocument artifacts.

/s-ramp/xsd/XsdDocument[@name="core.xsd"]

XsdDocument artifacts named core.xsd.

/s-ramp/xsd/XsdDocument[@name="core.xsd" and @version="1.0"]

XsdDocument artifacts named core.xsd and versioned as 1.0.

/s-ramp/soa[@myCustomProperty="foo"]

SOA artifacts with a custom property named myCustomProperty that has value foo.

/s-ramp/core[classifiedByAnyOf(., Maine, Alaska)]

Core artifacts classified by either Maine or Alaska (presumably from the Regions ontology).

/s-ramp/wsdl/PortType[@name="OrderServicePT"/operation

Artifacts related to any PortType artifact named OrderServicePT via a relationship named operation. (This effectively returns all of the order service port type’s operations)

/s-ramp/ext/ServletFilter[relatedDocument[@uuid="12345"]]

All servlet filter artifacts derived from (i.e. contain a relatedDocument relationship to) an artifact with UUID 12345.

/s-ramp/wsdl/Message[xp2:matches(.,get.*)]/part[element]

Element style WSDL parts from WSDL messages with names starting with get.

The intent of the S-RAMP specification is to outline a data model and protocol designed to define how a repository should store and manipulate artifacts. The foundation document defines the former, while various protocol binding documents define the latter. Version 1 of the S-RAMP specification includes a single, Atom based protocol binding.

This section of the guide describes the highlights of the Atom API.

Tip

For more information on the S-RAMP Atom API, see the S-RAMP Atom Binding document.

Performing an S-RAMP query is a matter of issueing a GET or POST to the S-RAMP query endpoint. In addition, full feeds are available for all Artifact Models and Artifact Types. In both cases, the response is an Atom Feed where each Entry provides summary information about an artifact in the respository. To retrieve full details about a given entry in the feed (custom properties, classifiers, relationships), the client must issue an additional GET. Only a subset of the core properties, such as name and description, are mapped to the Atom Entry in a feed.

The S-RAMP Atom API protocol binding does not dictate the format of the API endpoints. Clients must request the /servicedocument and then inspect the workspaces found therein. However, the Overlord implementation’s endpoints conform to the notional syntax described in the S-RAMP specification’s foundation document. The following table lists the endpoints available in the Overlord implementation:

EndpointName

GET /s-ramp/servicedocument

Get Service Document

POST /s-ramp/{model}/{type}

Publish Artifact

PUT /s-ramp/{model}/{type}/{uuid}

Update Artifact

PUT /s-ramp/{model}/{type}/{uuid}/media

Update Artifact Content

GET /s-ramp/{model}/{type}/{uuid}

Get Artifact

GET /s-ramp/{model}/{type}/{uuid}/media

Get Artifact Content

DELETE /s-ramp/{model}/{type}/{uuid}

Delete Artifact

GET /s-ramp/{model}

Get Artifact Feed (by model)

GET /s-ramp/{model}/{type}

Get Artifact Feed (by type)

GET /s-ramp

Query

POST /s-ramp

Query

POST /s-ramp

Batch Processing

POST /s-ramp/ontology

Add Ontology

GET /s-ramp/ontology

List Ontologies

PUT /s-ramp/ontology/{uuid}

Update Ontology

GET /s-ramp/ontology/{uuid}

Get Ontology

DELETE /s-ramp/ontology/{uuid}

Delete Ontology

GET /s-ramp/audit/artifact/{artifactUuid}

Get Artifact Audit History

GET /s-ramp/audit/user/{username}

Get User Audit History

POST /s-ramp/audit/artifact/{artifactUuid}

Add Artifact Audit Entry

GET /s-ramp/audit/artifact/{artifactUuid}/{auditEntryUuid}

Get Artifact Audit Entry

  /s-ramp/servicedocument

Retrieves the service document.

HTTP MethodRequestResponse

GET

N/A

Atom Service Document

The service document contains a workspace for each of the S-RAMP data models supported by the server.

Example Response

HTTP/1.1 200 OK

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<app:service xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app">
    <app:workspace>
        <atom:title>Core Model</atom:title>
        <app:collection href="http://example.org/s-ramp/core">
            <atom:title>Core Model Objects</atom:title>
            <app:accept>application/zip</app:accept>
            <app:categories fixed="yes">
                <atom:category label="Document" scheme="urn:x-s-ramp:v1:type" term="Document"/>
                <atom:category label="XML Document" scheme="urn:x-s-ramp:v1:type" term="XmlDocument"/>
            </app:categories>
        </app:collection>
        <app:collection href="http://example.org/s-ramp/core/Document">
            <atom:title>Documents</atom:title>
            <app:accept>application/octet-stream</app:accept>
            <app:categories fixed="yes">
                <atom:category label="Document" scheme="urn:x-s-ramp:v1:type" term="Document"/>
            </app:categories>
        </app:collection>
        <app:collection href="http://example.org/s-ramp/core/XmlDocument">
            <atom:title>XML Documents</atom:title>
            <app:accept>application/xml</app:accept>
            <app:categories fixed="yes">
                <atom:category label="XML Document" scheme="urn:x-s-ramp:v1:type" term="XmlDocument"/>
            </app:categories>
        </app:collection>
    </app:workspace>
</app:service>

Tip

The above example only includes the Core data model and thus the service document has a single workspace. The full service document would have multiple workspaces - one for each data model supported by the server.

Publishes a new artifact into the repository.

There are three ways this endpoint can be invoked, depending on the type of artifact being published:

  • Document Style Artifact
  • Non-Document Style Artifact
  • Document Style Artifact with Meta Data
  /s-ramp/{model}/{type}
HTTP MethodRequestResponse

POST

Binary File

Atom Entry

Publishing a document style artifact is simply a matter of POSTing the binary content of the document to the appropriate endpoint.

Example Request

POST /s-ramp/core/Document HTTP/1.1

This is a simple text document, uploaded as an artifact
into S-RAMP.

Example Response

HTTP/1.1 200 OK

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom" xmlns:s-ramp="http://docs.oasis-open.org/s-ramp/ns/s-ramp-v1.0"
  xmlns:xlink="http://www.w3.org/1999/xlink" s-ramp:derived="false">
  <atom:title>test.txt</atom:title>
  <atom:link
    href="http://example.org/s-ramp/core/Document/05778de3-be85-4696-b5dc-d889a27f1f6e/media"
    rel="alternate" type="text/plain" />
  <atom:link href="http://example.org/s-ramp/core/Document/05778de3-be85-4696-b5dc-d889a27f1f6e"
    rel="self" type="application/atom+xml;type=&quot;entry&quot;" />
  <atom:link
    href="http://example.org/s-ramp/core/Document/05778de3-be85-4696-b5dc-d889a27f1f6e/media"
    rel="edit-media" type="application/atom+xml;type=&quot;entry&quot;" />
  <atom:link href="http://example.org/s-ramp/core/Document/05778de3-be85-4696-b5dc-d889a27f1f6e"
    rel="edit" type="application/atom+xml;type=&quot;entry&quot;" />
  <atom:category label="Document" scheme="x-s-ramp:2010:type" term="Document" />
  <atom:category label="Document" scheme="x-s-ramp:2010:model" term="core" />
  <atom:updated>2013-05-14T13:43:09.708-04:00</atom:updated>
  <atom:id>05778de3-be85-4696-b5dc-d889a27f1f6e</atom:id>
  <atom:published>2013-05-14T13:43:09.708-04:00</atom:published>
  <atom:author>
    <atom:name>ewittman</atom:name>
  </atom:author>
  <atom:content
    src="http://example.org/s-ramp/core/Document/05778de3-be85-4696-b5dc-d889a27f1f6e/media"
    type="text" />
  <s-ramp:artifact>
    <s-ramp:Document artifactType="Document" contentSize="69" contentType="text/plain"
      createdBy="&lt;anonymous&gt;" createdTimestamp="2013-05-14T13:43:09.708-04:00" lastModifiedBy="&lt;anonymous&gt;"
      lastModifiedTimestamp="2013-05-14T13:43:09.708-04:00" name="test.txt" uuid="05778de3-be85-4696-b5dc-d889a27f1f6e" />
  </s-ramp:artifact>
</atom:entry>
  /s-ramp/{model}/{type}
HTTP MethodRequestResponse

POST

Atom Entry

Atom Entry

Publishing a non-document style artifact requires an Atom Entry (which contains an s-ramp:artifact child element) to be POSTed to the appropriate endpoint. The appropriate endpoint is based on the desired artifact model and type.

Example Request

POST /s-ramp/ext/MyArtifact HTTP/1.1

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom" xmlns:s-ramp="http://docs.oasis-open.org/s-ramp/ns/s-ramp-v1.0"
  xmlns:xlink="http://www.w3.org/1999/xlink" s-ramp:derived="false">
  <atom:title>Example Artifact</atom:title>
  <s-ramp:artifact>
    <s-ramp:ExtendedArtifactType extendedType="MyArtifact"
      artifactType="ExtendedArtifactType" name="My Artifact One" />
  </s-ramp:artifact>
</atom:entry>

Example Response

HTTP/1.1 200 OK

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<atom:entry xmlns:s-ramp="http://docs.oasis-open.org/s-ramp/ns/s-ramp-v1.0" xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:atom="http://www.w3.org/2005/Atom" s-ramp:derived="false" s-ramp:extendedType="MavenPom">
  <atom:title>pom.xml</atom:title>
  <atom:link href="http://example.org/s-ramp/ext/MavenPom/5f4cbf1e-cafb-4479-8867-fc5df5f21867/media"
    rel="alternate" type="application/xml" />
  <atom:link href="http://example.org/s-ramp/ext/MavenPom/5f4cbf1e-cafb-4479-8867-fc5df5f21867" rel="self"
    type="application/atom+xml;type=&quot;entry&quot;" />
  <atom:link href="http://example.org/s-ramp/ext/MavenPom/5f4cbf1e-cafb-4479-8867-fc5df5f21867/media"
    rel="edit-media" type="application/atom+xml;type=&quot;entry&quot;" />
  <atom:link href="http://example.org/s-ramp/ext/MavenPom/5f4cbf1e-cafb-4479-8867-fc5df5f21867" rel="edit"
    type="application/atom+xml;type=&quot;entry&quot;" />
  <atom:category label="Extended Document" scheme="x-s-ramp:2010:type" term="MavenPom" />
  <atom:category label="Extended Document" scheme="x-s-ramp:2010:model" term="ext" />
  <atom:updated>2013-05-14T13:49:20.645-04:00</atom:updated>
  <atom:id>5f4cbf1e-cafb-4479-8867-fc5df5f21867</atom:id>
  <atom:published>2013-05-14T13:49:20.645-04:00</atom:published>
  <atom:author>
    <atom:name>ewittman</atom:name>
  </atom:author>
  <atom:content type="application/xml"
    src="http://example.org/s-ramp/ext/MavenPom/5f4cbf1e-cafb-4479-8867-fc5df5f21867/media" />
  <s-ramp:artifact>
    <s-ramp:ExtendedDocument extendedType="MavenPom" contentType="application/xml"
      contentSize="4748" artifactType="ExtendedDocument" name="pom.xml" createdBy="&lt;anonymous&gt;"
      uuid="5f4cbf1e-cafb-4479-8867-fc5df5f21867" createdTimestamp="2013-05-14T13:49:20.645-04:00"
      lastModifiedTimestamp="2013-05-14T13:49:20.645-04:00" lastModifiedBy="&lt;anonymous&gt;"
      s-ramp:contentType="application/xml" s-ramp:contentSize="4748" />
  </s-ramp:artifact>
</atom:entry>
  /s-ramp/{model}/{type}
HTTP MethodRequestResponse

POST

Multipart/Related

Atom Entry

Sometimes it is convenient to publish an artifact and update its meta-data in a single request. This can be done by POSTing a multipart/related request to the server at the appropriate endpoint. The first part in the request must be an Atom Entry (containing the meta-data being set), while the second part must be the binary content. The appropriate endpoint is based on the desired artifact model and type.

Example Request

POST /s-ramp/core/Document HTTP/1.1
Content-Type: multipart/related;boundary="===============1605871705==";
type="application/atom+xml"
MIME-Version: 1.0

--===============1605871705==
Content-Type: application/atom+xml; charset="utf-8"
MIME-Version: 1.0

<?xml version="1.0"?>
<entry xmlns="http://www.w3.org/2005/Atom"
       xmlns:s-ramp="http://docs.oasis-open.org/s-ramp/ns/s-ramp-v1.0">
  <title type="text">myfile.txt</title>
  <summary type="text">The description of my text file.</summary>
  <category term="Document" label="Document"
            scheme="urn:x-s-ramp:2013urn:x-s-ramp:2013:type" />
  <s-ramp:artifact xmlns:s-ramp="http://docs.oasis-open.org/s-ramp/ns/s-ramp-v1.0"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <s-ramp:Document name="myfile.txt" version="1.0"
                     description="The description of my text file." >
      <s-ramp:classifiedBy>
        http://example.org/ontologies/regions.owl/Maine
      </s-ramp:classifiedBy>
      <s-ramp:property>
        <propertyName>foo</propertyName>
        <propertyValue>pity him</propertyValue>
      </s-ramp:property>
    </s-ramp:Document>
  </s-ramp:artifact>
</entry>
--===============1605871705==
Content-Type: application/xml
MIME-Version: 1.0

This is a simple text document, uploaded as an artifact
into S-RAMP.
--===============1605871705==--

Example Response

HTTP/1.1 200 OK

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom" xmlns:s-ramp="http://docs.oasis-open.org/s-ramp/ns/s-ramp-v1.0"
  xmlns:xlink="http://www.w3.org/1999/xlink" s-ramp:derived="false">
  <atom:title>test.txt</atom:title>
  <atom:link
    href="http://example.org/s-ramp/core/Document/05778de3-be85-4696-b5dc-d889a27f1f6e/media"
    rel="alternate" type="text/plain" />
  <atom:link href="http://example.org/s-ramp/core/Document/05778de3-be85-4696-b5dc-d889a27f1f6e"
    rel="self" type="application/atom+xml;type=&quot;entry&quot;" />
  <atom:link
    href="http://example.org/s-ramp/core/Document/05778de3-be85-4696-b5dc-d889a27f1f6e/media"
    rel="edit-media" type="application/atom+xml;type=&quot;entry&quot;" />
  <atom:link href="http://example.org/s-ramp/core/Document/05778de3-be85-4696-b5dc-d889a27f1f6e"
    rel="edit" type="application/atom+xml;type=&quot;entry&quot;" />
  <atom:category label="Document" scheme="x-s-ramp:2010:type" term="Document" />
  <atom:category label="Document" scheme="x-s-ramp:2010:model" term="core" />
  <atom:updated>2013-05-14T13:43:09.708-04:00</atom:updated>
  <atom:id>05778de3-be85-4696-b5dc-d889a27f1f6e</atom:id>
  <atom:published>2013-05-14T13:43:09.708-04:00</atom:published>
  <atom:author>
    <atom:name>ewittman</atom:name>
  </atom:author>
  <atom:content
    src="http://example.org/s-ramp/core/Document/05778de3-be85-4696-b5dc-d889a27f1f6e/media"
    type="text" />
  <s-ramp:artifact>
    <s-ramp:Document artifactType="Document" contentSize="69" contentType="text/plain"
      name="myfile.txt" uuid="05778de3-be85-4696-b5dc-d889a27f1f6e">
      description="The description of my text file." version="1.0"
      createdBy="&lt;anonymous&gt;" createdTimestamp="2013-05-14T13:43:09.708-04:00"
      lastModifiedBy="&lt;anonymous&gt;" lastModifiedTimestamp="2013-05-14T13:43:09.708-04:00"
      <s-ramp:classifiedBy>
        http://example.org/ontologies/regions.owl/Maine
      </s-ramp:classifiedBy>
      <s-ramp:property>
        <propertyName>foo</propertyName>
        <propertyValue>pity him</propertyValue>
      </s-ramp:property>
    </s-ramp:Document>
  </s-ramp:artifact>
</atom:entry>
  /s-ramp/{model}/{type}/{uuid}

Updates an artifact’s meta data.

HTTP MethodRequestResponse

PUT

Atom Entry

N/A

This endpoint is used to update a single artifact’s meta data, including core properties, custom properties, classifiers, and relationships. Typically the client should first retrieve the artifact (e.g. by invoking the Get Artifact endpoint), make changes to the artifact, then issue a PUT request to the Update Artifact endpoint.

Example Request

PUT /s-ramp/core/Document/098da465-2eae-49b7-8857-eb447f03ac02 HTTP/1.1

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<atom:entry xmlns:s-ramp="http://docs.oasis-open.org/s-ramp/ns/s-ramp-v1.0" xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:atom="http://www.w3.org/2005/Atom">
  <atom:title>pom.xml</atom:title>
  <atom:updated>2013-05-15T08:12:01.985-04:00</atom:updated>
  <atom:id>098da465-2eae-49b7-8857-eb447f03ac02</atom:id>
  <atom:published>2013-05-15T08:12:01.985-04:00</atom:published>
  <atom:author>
    <atom:name>ewittman</atom:name>
  </atom:author>
  <atom:summary>Sample description of my document.</atom:summary>
  <s-ramp:artifact>
    <s-ramp:Document contentType="text/plain" contentSize="4748" artifactType="Document"
      name="myfile.txt" description="Sample description of my document." createdBy="ewittman"
      uuid="098da465-2eae-49b7-8857-eb447f03ac02" createdTimestamp="2013-05-15T08:12:01.985-04:00"
      lastModifiedTimestamp="2013-05-15T08:12:01.985-04:00" lastModifiedBy="ewittman">
      <s-ramp:property>
        <s-ramp:propertyName>foo</s-ramp:propertyName>
        <s-ramp:propertyValue>bar</s-ramp:propertyValue>
      </s-ramp:property>
    </s-ramp:Document>
  </s-ramp:artifact>
</atom:entry>

Using the S-RAMP cmdline tool s-ramp.sh

In the bin directory of the distribution you can find the s-ramp.sh. Run this command to fire up the shell

./s-ramp.sh
**********************************************************************
           _____       ______  ___ ___  ________
          /  ___|      | ___ \/ _ \|  \/  | ___ \
          \ `--. ______| |_/ / /_\ \ .  . | |_/ /
           `--. \______|    /|  _  | |\/| |  __/
          /\__/ /      | |\ \| | | | |  | | |
          \____/       \_| \_\_| |_|_|  |_|_|

  JBoss S-RAMP Kurt Stam and Eric Wittmann, Licensed under the
  Apache License, V2.0, Copyright 2012
**********************************************************************
s-ramp>

The shell supports auto-completion and keeps a command history for duration of the session.

TBD - reference to generic section on XPath2 query syntax

S-RAMP supports an XPath2 Syntax for querying. For example to obtain all WSDL models in the repository use

s-ramp> s-ramp:query /s-ramp/wsdl/WsdlDocument
Querying the S-RAMP repository:
    /s-ramp/wsdl/WsdlDocument
Atom Feed (1 entries)
  Idx                    Type Name
  ---                    ---- ----
    1            WsdlDocument OrderService.wsdl
s-ramp>

When this WSDL file was uploaded derived information was extracted from it and stored a WSDL model. TO see the various data structures it derived simply hit the tab on s-ramp:query /s-ramp/wsdl

s-ramp> s-ramp:query /s-ramp/wsdl/
Binding                  BindingOperation         BindingOperationFault    BindingOperationInput    BindingOperationOutput
Fault                    Message                  Operation                OperationInput           OperationOutput
Part                     Port                     PortType                 WsdlDocument             WsdlExtension
WsdlService
s-ramp>

Note that derived data is read only, and cannot be updated by the user.

To obtain all Operations in this WSDL use

s-ramp:query /s-ramp/wsdl/Operation
Querying the S-RAMP repository:
    /s-ramp/wsdl/Operation
Atom Feed (1 entries)
  Idx                    Type Name
  ---                    ---- ----
    1               Operation submitOrder
s-ramp>

You can narrow this query down even more by adding that the name needs to start with submit

s-ramp:query "/s-ramp/wsdl/Operation[xp2:matches(@name, 'submit.*')]"
Querying the S-RAMP repository:
    /s-ramp/wsdl/Operation[xp2:matches(@name, 'submit.*')]
Atom Feed (1 entries)
  Idx                    Type Name
  ---                    ---- ----
    1               Operation submitOrder
s-ramp>

don’t forget to use the surrounding quotes, and a . after submit as required by XPath2.

To obtain all the artifacts that were derived from an artifact you can use

/s-ramp[relatedDocument[@uuid = '<uuid>'

In this case we use the uuid of a wsdl and get all the artifacts derived from the wsdl

s-ramp:query "/s-ramp[relatedDocument[@uuid = '15a94308-a088-4a03-ad83-e60239af74e4']]"
Querying the S-RAMP repository:
	/s-ramp[relatedDocument[@uuid = '15a94308-a088-4a03-ad83-e60239af74e4']]
Atom Feed (16 entries)
  Idx                    Type Name
  ---                    ---- ----
    1          OperationInput submitOrder
    2             WsdlService OrderService
    3             SoapAddress soap:address
    4   BindingOperationInput wsdl:input
    5             SoapBinding soap:binding
    6                    Part parameters
    7                 Binding OrderServiceBinding
    8  BindingOperationOutput wsdl:output
    9                 Message submitOrderResponse
   10         OperationOutput submitOrderResponse
   11        BindingOperation submitOrder
   12                 Message submitOrder
   13               Operation submitOrder
   14                    Port OrderServicePort
   15                    Part parameters
   16                PortType OrderService

To get a list of all artifacts that were extracted from another archive use

s-ramp:query "/s-ramp[expandedFromDocument[@uuid = '<uuid>']

let’s say we uploaded a jar file containing switchyard artifacts, with uddi 67c6f2d3-0f10-4f0d-ada6-d85f92f02a33:

s-ramp:query "/s-ramp[expandedFromDocument[@uuid = '67c6f2d3-0f10-4f0d-ada6-d85f92f02a33']]"
Querying the S-RAMP repository:
	/s-ramp[expandedFromDocument[@uuid = '67c6f2d3-0f10-4f0d-ada6-d85f92f02a33']]
Atom Feed (3 entries)
  Idx                    Type Name
  ---                    ---- ----
    1             XmlDocument switchyard.xml
    2             XmlDocument beans.xml
    3             XmlDocument faces-config.xml

One or more optional appendixes go here at section level 1.

The bibliography list is a style of AsciiDoc bulleted list.

Glossaries are optional. Glossaries entries are an example of a style of AsciiDoc labeled lists.

A glossary term

The corresponding (indented) definition.

A second glossary term

The corresponding (indented) definition.

Example Colophon

Text at the end of a book describing facts about its production.