Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
ActiveSOAP
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<p><a href="https://jaxb.dev.java.net/">JAXB 2.0</a> now supports StAX natively and integrates easily into ActiveSOAP.</p> <p>Here is an <a href="http://cvs.activesoap.codehaus.org/viewrep/activesoap/activesoap/modules/jaxb/src/test/org/codehaus/activesoap/examples/jaxb/">example application</a> which demonstrates writing a simple POJO based services using purely JAXB and letting ActiveSOAP be the REST or SOAP stack and handling the HTTP or JMS transports for you.</p> <p>First you need some kinda service to expose. So we wrote a little interface.</p> <table class="wysiwyg-macro" data-macro-name="unmigrated-inline-wiki-markup" data-macro-parameters="atlassian-macro-output-type=BLOCK" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e3VubWlncmF0ZWQtaW5saW5lLXdpa2ktbWFya3VwOmF0bGFzc2lhbi1tYWNyby1vdXRwdXQtdHlwZT1CTE9DS30&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>{snippet:id=example|lang=java|url=http://cvs.activesoap.codehaus.org/viewrep/~raw,r=HEAD/activesoap/activesoap/modules/jaxb/src/test/org/codehaus/activesoap/examples/jaxb/SnowboardService.java}</pre></td></tr></table> <p>There's a method on this interface which accepts a regular Java POJO marshalled via JAXB. We can have as many methods as we like all auto-published, the only requirement is that the parameter must be a type marshalled by JAXB, so that when we register it with JAXBRegistry it can handle the XML marshalling.</p> <p>Then if we register an implementation of this interface with the JAXBRegistry we can automatically publish the service as both REST and SOAP endpoints...</p> <p>Here's the SOAP server side</p> <table class="wysiwyg-macro" data-macro-name="unmigrated-inline-wiki-markup" data-macro-parameters="atlassian-macro-output-type=BLOCK" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e3VubWlncmF0ZWQtaW5saW5lLXdpa2ktbWFya3VwOmF0bGFzc2lhbi1tYWNyby1vdXRwdXQtdHlwZT1CTE9DS30&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>{snippet:id=soapServer|lang=java|url=http://cvs.activesoap.codehaus.org/viewrep/~raw,r=HEAD/activesoap/activesoap/modules/jaxb/src/test/org/codehaus/activesoap/examples/jaxb/SnowboardTest.java}</pre></td></tr></table> <p>And here's the SOAP client side</p> <table class="wysiwyg-macro" data-macro-name="unmigrated-inline-wiki-markup" data-macro-parameters="atlassian-macro-output-type=BLOCK" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e3VubWlncmF0ZWQtaW5saW5lLXdpa2ktbWFya3VwOmF0bGFzc2lhbi1tYWNyby1vdXRwdXQtdHlwZT1CTE9DS30&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>{snippet:id=soapClient|lang=java|url=http://cvs.activesoap.codehaus.org/viewrep/~raw,r=HEAD/activesoap/activesoap/modules/jaxb/src/test/org/codehaus/activesoap/examples/jaxb/SnowboardTest.java}</pre></td></tr></table> <p>Or the REST client side...</p> <table class="wysiwyg-macro" data-macro-name="unmigrated-inline-wiki-markup" data-macro-parameters="atlassian-macro-output-type=BLOCK" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e3VubWlncmF0ZWQtaW5saW5lLXdpa2ktbWFya3VwOmF0bGFzc2lhbi1tYWNyby1vdXRwdXQtdHlwZT1CTE9DS30&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>{snippet:id=restClient|lang=java|url=http://cvs.activesoap.codehaus.org/viewrep/~raw,r=HEAD/activesoap/activesoap/modules/jaxb/src/test/org/codehaus/activesoap/examples/jaxb/SnowboardTest.java}</pre></td></tr></table>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced