Skip to content

Commit

Permalink
added some examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dslmeinte committed Aug 1, 2012
1 parent 3409562 commit 90bf547
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 0 deletions.
1 change: 1 addition & 0 deletions nl.dslmeinte.xtext.xsd-wsdl.examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src-gen/
17 changes: 17 additions & 0 deletions nl.dslmeinte.xtext.xsd-wsdl.examples/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>nl.dslmeinte.xtext.xsd-wsdl.examples</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
10 changes: 10 additions & 0 deletions nl.dslmeinte.xtext.xsd-wsdl.examples/common.xsdr
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
schema
common
namespace "http://marc.grol.nl/family/common"

simple-type ShortString [string] : maxLength=32

abstract complex-type UeberType {

}

52 changes: 52 additions & 0 deletions nl.dslmeinte.xtext.xsd-wsdl.examples/family.xsdr
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
schema family
namespace "http://marc.grol.nl/family"

import "common.xsdr" as common

element family -> Family

complex-type Family {
father -> GrownUp
mother -> GrownUp
children -> Child[0..*]
}

abstract complex-type Person {
name -> common:ShortString
birthDate -> date
gender -> Gender
}

simple-type Gender [string]:
enumeration { "M" "F" }

complex-type GrownUp extends Person {
employment -> Employment[0..1]
required @identificationNumber -> positiveInteger
}

complex-type Employment {
employerName -> common:ShortString
}

complex-type Child extends Person {
education -> Education[0..1]
}

complex-type Education {
schoolName -> string
educationType -> EducationType
grade -> SchoolGrade
}

simple-type SchoolGrade [nonNegativeInteger] : range=1..8

simple-type EducationType [string] : enumeration { "KinderGarden" "ElementarySchool" "HighSchool" "University" }

simple-type N11_3Type [decimal] : pattern=/-?\d{1,11}.\d{3}/


complex-type UnterType extends common:UeberType {
name -> string
}

27 changes: 27 additions & 0 deletions nl.dslmeinte.xtext.xsd-wsdl.examples/stockQuote.wsdlr
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
wsdl StockQuote
namespace: "http://example.com/stockquote/definitions"

xsd-import "stockQuote.xsdr" as xsd1

messages:
GetLastTradePriceInput {
body -> TradePriceRequest
}
GetLastTradePriceOutput {
body -> TradePrice
}

portTypes:
StockQuotePortType {
operation GetLastTradePrice : GetLastTradePriceInput -> GetLastTradePriceOutput
}

bindings:
StockQuoteSoapBinding binds StockQuotePortType using soap (document)

services:
StockQuoteService {
documentation "My first service"
port StockQuotePort binds StockQuoteSoapBinding on "http://example.com/stockquote"
}

11 changes: 11 additions & 0 deletions nl.dslmeinte.xtext.xsd-wsdl.examples/stockQuote.xsdr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
schema stockQuotes
namespace "http://example.com/stockquote/schemas"

complex-type TradePriceRequest {
tickerSymbol -> string
}

complex-type TradePrice {
price -> decimal
}

0 comments on commit 90bf547

Please sign in to comment.