Middleware
Beehive
|
Note: The samples featured on this page work only for Oracle Beehive Release 2 (2.0.1.0) |
The following topics are covered:
The following steps describe how to generate the Oracle Beehive RESTful Web services value objects using Microsoft XML Schema Definition Tool,
Xsd.exe:
Obtain
Xsd.exe from .NET Framework SDK. Refer to
"Microsoft Developer Network, MSDN" for more information.
Download the following XSD files:
<Host name and port of your Oracle Beehive HTTP server>
/comb/v1/schema-obh.xsd
<Host name and port of your Oracle Beehive HTTP server>
/comb/v1/schema-obr.xsd
Generate a
.cs source code file from the file
schema-obh.xsd:
xsd schema-obh.xsd /classes
Generate a
.cs source code file from the file
schema-obr.xsd:
xsd schema-obr.xsd /classes
Edit the generated source code file,
schema-obr.cs. Search for the class definition
public partial class list. Before this class definition, add the highlighted line as follows:
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://www.oracle.com/beehive", IsNullable = false)]
public partial class list
{
private object[] elementsField;
This section covers the following topics:
The file
Program.cs contains the main logic of the sample. It performs the following tasks:
Authentication
Retrieves the logged in user's information
Retrieves the logged in user's personal workspace information
Listing artifact identifiers
Retrieves the folders of type
HeterogeneousFolder of the logged in user
Using projections
Retrieves the logged in user's information with an EMPTY projection, then with a BASIC projection.
Creating simple objects
Creates a team workspace
Creating objects with simple content
Creates a Document artifact that contains a text document
Creating artifacts with uploaded content
Creates a Document artifact that contains a text document, then creates a Topic with a reference to the Document
The CSExampleCon C# sample,
csharp_bdk_sample.zip
, consists of the following files:
Properties\AssemblyInfo.cs
CSExampleCon.csproj
Method.cs
Program.cs
schema-obh.cs and
schema-obr.cs: Refer to
"Setup with Standard APIs" to generate these files.
Session.cs
Tests.cs