How do I get started with ExtJS and WebSharper? - extjs

I'm struggling to use ExtJs with WebSharper. I'd like to run the code sample (pasted at end) here as a starting point:
https://try.websharper.com/snippet/0000XW
I used the Nuget package WebSharper.ExtJs 2.4.48.145 in VS 2019 in a Suave F# project. The project worked fine for a simple 'hello world' web page; now I want to continue my learning journey with some third party UI widgets.
I had a hell of a time getting the ExtJs packages from Sencha. Eventually I downloaded everything in 'community' from sencha.myget.org as a zip, created a package.json in my project, and used npm to install ext-all, ext-core, ext-font-awesome, ext-font-ext, ext-modern-theme-base, and ext-modern-theme-neptune one at a time
From the code snippet linked:
The line open WebSharper.ExtJS fails: the namespace 'ExtJS' is not defined. However IntelliFactory.WebSharper.ExtJs does exist. But this doesn't seem to do the job.
The lines [<Require(typeof<Resources.ExtAll>)>] and similar fail with ExtAll is not defined in IntelliFactory.WebSharper.ExtJs.Resources
The line let store=ExtCfg.data.JsonStore(... fails with ExtCfg not defined.
Clearly something is badly wrong here. Is there a detailed, specific, step-by-step guide to working with ExtJs, a fully functioning demo project I can download, or can someone help me?
I couldn't find any source for the ExtJs extension on the WebSharper github either.
Many thanks
packages.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FSharp.Control.Reactive" version="5.0.2" targetFramework="net472" />
<package id="FSharp.Core" version="4.7.2" targetFramework="net472" />
<package id="Microsoft.Owin" version="4.2.0" targetFramework="net472" />
<package id="Owin" version="1.0" targetFramework="net472" />
<package id="Suave" version="2.5.6" targetFramework="net472" />
<package id="System.Reactive" version="5.0.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
<package id="System.ValueTuple" version="4.4.0" targetFramework="net472" />
<package id="WebSharper" version="4.7.3.446" targetFramework="net472" />
<package id="WebSharper.Core" version="4.7.3.446" targetFramework="net472" />
<package id="WebSharper.ExtJs" version="2.4.48.145" targetFramework="net472" />
<package id="WebSharper.FSharp" version="4.7.3.446" targetFramework="net472" />
<package id="WebSharper.Owin" version="4.7.2.219" targetFramework="net472" />
<package id="WebSharper.Suave" version="4.7.1.280" targetFramework="net472" />
<package id="WebSharper.UI" version="4.7.2.243" targetFramework="net472" />
</packages>
package.json
{
"name": "Suave1",
"version": "0.0.0",
"description": "Suave1",
"main": "main.fs",
"author": {
"name": ""
},
"dependencies": {
"#sencha/ext-all": "file:C:/Users/Paul/Downloads/community-637654232954560680/npm/node_modules/#sencha/ext-all-7.0.0.tgz",
"#sencha/ext-core": "file:C:/Users/Paul/Downloads/community-637654232954560680/npm/node_modules/#sencha/ext-core-7.0.0.tgz",
"#sencha/ext-font-awesome": "file:C:/Users/Paul/Downloads/community-637654232954560680/npm/node_modules/#sencha/ext-font-awesome-7.0.0.tgz",
"#sencha/ext-font-ext": "file:C:/Users/Paul/Downloads/community-637654232954560680/npm/node_modules/#sencha/ext-font-ext-7.0.0.tgz",
"#sencha/ext-modern-theme-base": "file:C:/Users/Paul/Downloads/community-637654232954560680/npm/node_modules/#sencha/ext-modern-theme-base-7.0.0.tgz",
"#sencha/ext-modern-theme-neptune": "file:C:/Users/Paul/Downloads/community-637654232954560680/npm/node_modules/#sencha/ext-modern-theme-neptune-7.0.0.tgz"
}
}
namespace Samples
open WebSharper
open WebSharper.JavaScript
open WebSharper.ExtJS
open WebSharper.UI.Html
open WebSharper.UI.Client
[<JavaScript>]
module ExtJSSample =
type DataRow =
{
name : string
data1 : int
data2 : int
data3 : int
}
[<Require(typeof<Resources.ExtAll>)>]
[<Require(typeof<Resources.ExtThemeNeptune>)>]
[<Require(typeof<Resources.ExtAllNeptuneCss>)>]
let ChartDemo() =
let generateData() =
let rand() = max (Math.Random() * 100. |> int) 20
[|
for i in 0 .. 7 ->
{
name = Ext.Date.MonthNames.[i]
data1 = rand()
data2 = rand()
data3 = rand()
}
|]
let store =
ExtCfg.data.JsonStore(
Fields = [| "name"; "data1"; "data2"; "data3" |],
Data = generateData()
).Create()
let chart =
ExtCfg.chart.Chart(
Style = "background =#fff",
Animate = true,
Store = store,
Shadow = Union1Of2 true,
Theme = "Category1",
Legend = ExtCfg.chart.Legend(Position = "right"),
Axes =
[|
ExtCfg.chart.axis.Numeric(
Minimum = 0,
Position = "left",
Fields = [| "data1"; "data2"; "data3" |],
Title = "Number of Hits",
MinorTickSteps = 1,
Grid =
New [
"odd", box <| ExtCfg.draw.Sprite(
Opacity = 1,
Fill = "#ddd",
Stroke = "#bbb",
Stroke_width = As 0.5
)
]
) |> As
ExtCfg.chart.axis.Category(
Position = "bottom",
Fields = [| "name" |],
Title = "Month of the Year"
) |> As
|],
Series =
[|
ExtCfg.chart.series.Line(
Highlight = ExtCfg.draw.Sprite(Radius = 7),
Axis = Union1Of2 "left",
XField = "name",
YField = Union1Of2 "data1",
MarkerConfig = ExtCfg.draw.Sprite(
Type = "cross",
Radius = 4,
Stroke_width = 0
)
) |> As
ExtCfg.chart.series.Line(
Highlight = ExtCfg.draw.Sprite(Radius = 7),
Axis = Union1Of2 "left",
Smooth = Union1Of2 true,
XField = "name",
YField = Union1Of2 "data2",
MarkerConfig = ExtCfg.draw.Sprite(
Type = "circle",
Radius = 4,
Stroke_width = 0
)
) |> As
ExtCfg.chart.series.Line(
Highlight = ExtCfg.draw.Sprite(Radius = 7),
Axis = Union1Of2 "left",
Smooth = Union1Of2 true,
Fill = true,
XField = "name",
YField = Union1Of2 "data3",
MarkerConfig = ExtCfg.draw.Sprite(
Type = "circle",
Radius = 4,
Stroke_width = 0
)
) |> As
|]
).Create()
ExtCfg.window.Window(
Width = 800,
Height = 600,
MinHeight = 400,
MinWidth = 550,
Hidden = false,
Maximizable = true,
Title = "Line Chart",
RenderTo = Union1Of2 (Ext.GetBody()),
Layout = "fit",
Tbar =
[|
ExtCfg.button.Button(
Text = "Save Chart",
Handler = As (fun () ->
Ext.MessageBox.Confirm(
"Confirm Download",
"Would you like to download the chart as an image?",
As (function
| "yes" -> chart.Save(New [ "type", box "image/png" ]) |> ignore
| _ -> ())
)
)
)
ExtCfg.button.Button(
Text = "Reload Data",
Handler = As (fun () -> generateData() |> As<obj[]> |> store.LoadData)
)
|],
Items = chart
).Create() |> ignore
div [
on.afterRender (fun el ->
Ext.OnReady(As ChartDemo, null, null)
)
] []
|> Doc.RunById "main"

The short answer is that the WebSharper.ExtJs NuGet package is not compatible with the latest WebSharper. See more at https://forums.websharper.com/topic/91000

Related

SCNPhysicsVehicle, wheel are rotate 90 deg

I'm try to study Scenekit and SCNPhysicsVehicle, I created a simple car as per picture below:
i wrote the following code that should load the physics to the model and place it to the scene.
func setupVeicles(nodePos: SCNVector3){
// load file usdz
let truck = loadAssetWithName(nameFile: "car", nameNode: "car", type: "usdz", scale: SCNVector3(1, 1, 1))
let chassie = truck.childNode(withName: "Chassie", recursively: true)!
// add chassie at position touch
chassie.position = SCNVector3(nodePos.x, nodePos.y+0.1, nodePos.z)
//Set the physic body
let body = SCNPhysicsBody.dynamic()
body.physicsShape = SCNPhysicsShape(node: chassie)
body.categoryBitMask = BodyType.car.rawValue //2 int, assegnato solo a quel oggetto
body.collisionBitMask = BodyType.floor.rawValue //1 con cosa puo collidere
body.contactTestBitMask = BodyType.floor.rawValue //1 attiva il delegato
body.allowsResting = false
body.mass = 5
body.restitution = 0.1
body.friction = 0.5
body.rollingFriction = 0
chassie.physicsBody = body
// Load the wheel
let wheelFL = chassie.childNode(withName: "WheelFL", recursively: true)!
let wheelFR = chassie.childNode(withName: "WheelFR", recursively: true)!
let wheelBL = chassie.childNode(withName: "WheelBL", recursively: true)!
let wheelBR = chassie.childNode(withName: "WheelBR", recursively: true)!
// test rotate , but not work
// wheelFL.eulerAngles = SCNVector3(deg2rad(90), 0, 0)
// wheelPhysic
let phywheelFL = createPhysicsVehicleWheel(wheelNode: wheelFL, position: SCNVector3(-0.212, -0.085, 0.146))
let phywheelFR = createPhysicsVehicleWheel(wheelNode: wheelFR, position: SCNVector3(-0.212, -0.085, -0.15))
let phywheelBL = createPhysicsVehicleWheel(wheelNode: wheelBL, position: SCNVector3(0.182, -0.085, 0.15))
let phywheelBR = createPhysicsVehicleWheel(wheelNode: wheelBR, position: SCNVector3(0.182, -0.085, -0.15))
let physicsVehicle = SCNPhysicsVehicle(chassisBody: chassie.physicsBody!, wheels: [phywheelFL,phywheelFR,phywheelBL,phywheelBR])
self.arView.scene.physicsWorld.addBehavior(physicsVehicle)
self.arView.scene.rootNode.addChildNode(chassie)
}
func createPhysicsVehicleWheel(wheelNode: SCNNode, position: SCNVector3) -> SCNPhysicsVehicleWheel {
let wheel = SCNPhysicsVehicleWheel(node: wheelNode)
wheel.connectionPosition = position
wheel.axle = SCNVector3(x: -1.0, y: 0, z: 0)
wheel.maximumSuspensionTravel = 4.0
wheel.maximumSuspensionForce = 100
wheel.suspensionRestLength = 0.08
wheel.suspensionDamping = 2.0
wheel.suspensionStiffness = 2.0
wheel.suspensionCompression = 4.0
wheel.radius = 0.04
wheel.frictionSlip = 0.9
return wheel
}
Can't understand why my wheel are rotate 90 deg as you cans se on the picture:
Why this wheel are like this? how to rotate them.. I tried to rotate the node but nothing happen..
Download the file rc_car.dae from the Scenekit Demo App that Apple provided in the past.
https://github.com/NXAristotle/appleSample/tree/master/SceneKitVehicleDemo/SceneKitVehicle/resources
You will see, that the geometry is a bit more complex, containing subnodes on the wheels. I ran into a similar issue. Then I used Blender to adapt the geometry the same way as it is in rc_car.dae to my own model. It was quite a bit of work.
Export it to DAE and use it in SceneKit.
If you need code examples, I can provide, but what you made looks quite good to me.

How can I import all (mp3) files from a particular folder into an array in react.js?

I'm building an mp3 player with react.js and the HTML5 web audio API. I'm new to react (circa 2 weeks) but have 3 years experience with JavaScript.
It seems that in order for the mp3 files to play/load into the audio tag (within a react environment using the cmd line and localhost) I need to import them to the application(rather than just pointing to their URL in the src of the audio tag). See my question here
So at the moment I am importing the sounds in a hard-coded fashion as follows:
import React, { Component } from 'react';
import './music-player.css';
import mp3_file0 from './sounds/0010_beat_egyptian.mp3';
import mp3_file1 from './sounds/0011_beat_euphoric.mp3';
import mp3_file2 from './sounds/0014_beat_latin.mp3';
import mp3_file3 from './sounds/0015_beat_pop.mp3';
import mp3_file4 from './sounds/0027_falling_cute.mp3';
import mp3_file5 from './sounds/0028_feather.mp3';
import mp3_file6 from './sounds/0036_lose_cute.mp3';
import mp3_file7 from './sounds/0039_pium.mp3';
var mp3s = [];
mp3s[0] = mp3_file0;
mp3s[1] = mp3_file1;
mp3s[2] = mp3_file2;
mp3s[3] = mp3_file3;
mp3s[4] = mp3_file4;
mp3s[5] = mp3_file5;
mp3s[6] = mp3_file6;
mp3s[7] = mp3_file7;
const AudioPlayer = function(props) {
var mp3Src = mp3s[props.currentSoundIndex];
console.log(mp3Src);
return (<audio id="audio_player">
<source id="src_mp3" type="audio/mp3" src={mp3Src}/>
<source id="src_ogg" type="audio/ogg" src=""/>
<object id="audio_object" type="audio/x-mpeg" width="200px" height="45px" data={mp3Src}>
<param id="param_src" name="src" value={mp3Src} />
<param id="param_src" name="src" value={mp3Src} />
<param name="autoplay" value="false" />
<param name="autostart" value="false" />
</object>
</audio>
);
}
export default AudioPlayer;
That works perfect, however ideally I would like to either:
1 import the mp3 files straight into an array (instead of creating the array afterwards). I tried the following, however I am receiving an error of "unexpected token" at the [ bracket (when importing)
var mp3s = [];
import mp3s[0] from './sounds/0010_beat_egyptian.mp3';
import mp3s[1] from './sounds/0011_beat_euphoric.mp3';
2 Or even better import all files from the sounds folder without knowing their names into a zero indexed array.
Any help greatly appreciated. thanks.
I discovered that If you have multiple files (e.g images or mp3 files etc) that you want to include dynamically to your app then it is better to store them in the public folder (see the docs https://create-react-app.dev/docs/using-the-public-folder/).
Note: When storing your files in the public folder you don't need to "import" them but you must use the public environment variable (process.env.PUBLIC_URL) so that the correct path (to your public folder) will be referenced.
So my solution to this was:
I created a folder in the public folder called sounds (where I stored all of my mp3s for this project).
I then changed my the Audio component (in the original post) to the following:
.
import React, { Component } from 'react';
import './music-player.css';
const AudioPlayer = function(props) {
let mp3Src = process.env.PUBLIC_URL + props.sounds[props.currentSoundIndex].mp3;
return (<audio id="audio_player">
<source id="src_mp3" type="audio/mp3" src={mp3Src}/>
<source id="src_ogg" type="audio/ogg" src=""/>
<object id="audio_object" type="audio/x-mpeg" width="200px" height="45px" data={mp3Src}>
<param id="param_src" name="src" value={mp3Src} />
<param id="param_src" name="src" value={mp3Src} />
<param name="autoplay" value="false" />
<param name="autostart" value="false" />
</object>
</audio>
);
}
export default AudioPlayer;
Note: props.sounds in the above code refers to the following JavaScript array which I have in my src folder:
let sounds = [{"title" : "Egyptian Beat", "artist" : "Sarah Monks", "length": 16, "mp3" : "sounds/0010_beat_egyptian.mp3"},
{"title" : "Euphoric Beat", "artist" : "Sarah Monks", "length": 31, "mp3" : "sounds/0011_beat_euphoric.mp3"},
{"title" : "Latin Beat", "artist" : "Sarah Monks", "length": 59, "mp3" : "sounds/0014_beat_latin.mp3"},
{"title" : "Pop Beat", "artist" : "Sarah Monks", "length": 24, "mp3" : "sounds/0015_beat_pop.mp3"},
{"title" : "Falling Cute", "artist" : "Sarah Monks", "length": 3, "mp3" : "sounds/0027_falling_cute.mp3"},
{"title" : "Feather", "artist" : "Sarah Monks", "length": 6, "mp3" : "sounds/0028_feather.mp3"},
{"title" : "Lose Cute", "artist" : "Sarah Monks", "length": 3, "mp3" : "sounds/0036_lose_cute.mp3"},
{"title" : "Pium", "artist" : "Sarah Monks", "length": 3, "mp3" : "sounds/0039_pium.mp3"}];
Check this copeden here
var mp3_file = []
mp3_file[0] = 'file1',
mp3_file[1] = 'file2',
mp3_file[2] = 'file3',
mp3_file[3] = 'file4',
mp3_file[4] = 'file5',
mp3_file[5] = 'file6',
mp3_file[6] = 'file7',
mp3s = [];
for (let i=0; i<6; i++) {
mp3s[i] = mp3_file[i]
console.log(mp3s[i])
}
RESULT >
"file1"
"file2" and so on.
And also this could be interesting
var mp3_file = [];
var mp3s = [];
for (let i=0; i<6; i++) {
mp3_file[i = 'file' + i,
}
for (let i=0; i<mp3_file.length; i++) {
mp3s[i] = mp3_file[i]
console.log(mp3s[i])
}
Have "pros" and "contras" but I think you'll get the point.
If music in file are like ( songName_01.mp3 songName_02.mp3 songName_03.mp3 ...)
you can import all of them in your react project
Instead of using
var songCollection = [];
import song01 from '../some file/songName01.mp3'
import song02 from '../some file/songName02.mp3'
import song03 from '../some file/songName0.mp3'
import song04 from '../some file/songName04.mp3'
and then add them in array
Use this code transformation
var songCollection = []
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
for(let i = 0; i< fileSize; i++ ) {
songCollection[i] = _interopRequireDefault(require(`../some file/songName_0${i+1}.mp3`));
}
And src value would be <audio src = {songName[2].default} ></audio>
Los-Track ( you can look at my repo how it works ) - https://github.com/sosumit001/los-track

div align right checkboxInput in shiny dashboard not working

My shiny dashboard has checkboxInput and I am trying to align it to right within the title of the box item. For smaller boxes (width of 6) the alignment is proper, however for boxes with width of 12, which ever way I realign the column values, the checkbox input remains at the middle of the box. The code is as follows:
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
skin = "green",
dashboardHeader(
title = "TEST", titleWidth = 225
),
dashboardSidebar(
menuItem("TRENDS", tabName = "vactr", icon = shiny::icon("line-chart"))
),
dashboardBody(
tabItems(
tabItem(
tabName = "vactr",
fluidRow(
box(
width = 12, status = "info", title =
fluidRow(
column(6, "Trend - Usage of space",br(),
div(downloadLink("downloadspacetrend", "Download this chart"), style = "font-size:70%", align = "left")),
column(6,
div(checkboxInput(inputId = "spacetrendcheck", "Add to reports", value = FALSE),style = "font-size:70%",float = "right", align = "right", direction = "rtl"))
),
div(plotOutput("spacetrend"), width = "100%", height = "400px", style = "font-size:90%;"),
uiOutput("spacetrendcomment")
)
)
)
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui = ui, server = server)
I want the "Add to reports" check box to the right end of the box. I tried using float, direction arguments with and without, but not getting the desired output.
There is the following reason for you problem: The header title's width is not set to the whole width of the box. Instead, its width is calculated from the elements it contains. This makes the columns (which are 50% title width) also depend on the elements. Your elements however are not that big, so the resulting div is in itself well divided in two equally large columns, but they together don't span the whole box width.
You can just fix the title width to 100% (box header width), which as a result tells the columns to be that large, whatever their content might be.
This is a one line addition.
Note that the style addition in the code below affects all box titles. But I believe that this is never really a problem.
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
skin = "green",
dashboardHeader(
title = "TEST", titleWidth = 225
),
dashboardSidebar(
menuItem("TRENDS", tabName = "vactr", icon = shiny::icon("line-chart"))
),
dashboardBody(
tabItems(
tabItem(tabName = "vactr",
fluidRow(
box(width = 12, status = "info", title =
fluidRow(
tags$style(".box-title {width: 100%;}"),
column(6, "Trend - Usage of space",br(),
div(downloadLink("downloadspacetrend", "Download this chart"), style = "font-size:70%", align = "left")),
column(6,
div(checkboxInput(inputId = "spacetrendcheck", "Add to reports", value = FALSE),style = "font-size:70%",float = "right", align = "right", direction = "rtl"))
),
div(plotOutput("spacetrend"), width = "100%", height = "400px", style = "font-size:90%;"),
uiOutput("spacetrendcomment")
)
)
)
)
)
)
server <- function(input, output, session) {}
shinyApp(ui = ui, server = server)

Yandex Maps: how change styles placemark from api 1.0 to 2.0

I have this styles in api 1.0
var s = new YMaps.Style();
s.iconStyle = new YMaps.IconStyle();
s.iconStyle.offset = new YMaps.Point(-1, -30);
s.iconStyle.href = "http:www.example.com/images/1.png";
s.iconStyle.size = new YMaps.Point(29, 28);
s.iconStyle.shadow = new YMaps.IconShadowStyle();
s.iconStyle.shadow.offset = new YMaps.Point(2, -12);
s.iconStyle.shadow.href = "http:www.example.com/images/2.png";
s.iconStyle.shadow.size = new YMaps.Point(29, 7);
here I add this styles to placemark
var placemark = new YMaps.Placemark(new YMaps.GeoPoint(lat, long),
{hasBalloon: false,
style: s
});
placemark.setHintContent(mystring);
placemark.enableHint();
map.addOverlay(placemark);
how create this styles in api 2.0 ?
I solve like this :
placemark.options.set('iconImageHref', 'http:www.example.com/images/1.png');
placemark.options.set('iconImageOffset', [-1, -30]);
placemark.options.set('iconImageSize', [28,29]);
placemark.options.set('iconShadowImageHref', 'http:www.example.com/images/2.png');
placemark.options.set('iconShadowImageOffset', [2, -12]);
placemark.options.set('iconShadowImageSize', [29, 7]);

Exchange Web Services Create Meeting Request Working Example

Is there a working example anywhere of how to create a meeting request using EWS for Exchange 2007 using C#? Which properties are required? I have added a web service reference and can connect to create and send various items but keep getting the error "Set action is invalid for property." on the response messages. It never says what property is invalid
var ews = new ExchangeServiceBinding {
Credentials = new NetworkCredential("user", "pass"),
Url = "https://servername/ews/exchange.asmx",
RequestServerVersionValue = new RequestServerVersion {
Version = ExchangeVersionType.Exchange2007}
};
var startDate = new DateTime(2010, 9, 18, 16, 00, 00);
var meeting = new CalendarItemType {
IsMeeting = true,
IsMeetingSpecified = true,
Subject = "test EWS",
Body = new BodyType {Value = "test body", BodyType1 = BodyTypeType.HTML},
Start = startDate,
StartSpecified = true,
End = startDate.AddHours(1),
EndSpecified = true,
MeetingTimeZone = new TimeZoneType{
TimeZoneName = TimeZone.CurrentTimeZone.StandardName, BaseOffset = "PT0H"},
Location = "Meeting",
RequiredAttendees = new [] {
new AttendeeType{Mailbox =new EmailAddressType{
EmailAddress ="test1#domain.com",RoutingType = "SMTP"}},
new AttendeeType{Mailbox =new EmailAddressType{
EmailAddress ="test2#domain.com",RoutingType = "SMTP"}}
}
};
var request = new CreateItemType {
SendMeetingInvitations =
CalendarItemCreateOrDeleteOperationType.SendToAllAndSaveCopy,
SendMeetingInvitationsSpecified = true,
SavedItemFolderId = new TargetFolderIdType{Item = new DistinguishedFolderIdType{
Id=DistinguishedFolderIdNameType.calendar}},
Items = new NonEmptyArrayOfAllItemsType {Items = new ItemType[] {meeting}}
};
CreateItemResponseType response = ews.CreateItem(request);
var responseMessage = response.ResponseMessages.Items[0];
Microsoft provides an XML example at http://msdn.microsoft.com/en-us/library/aa494190(EXCHG.140).aspx of what the message item should look like. Just setting these properties does not seem to be enough. Can someone tell me what I'm missing or point me to some better examples or documentation?
<CreateItem
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
SendMeetingInvitations="SendToAllAndSaveCopy" >
<SavedItemFolderId>
<t:DistinguishedFolderId Id="calendar"/>
</SavedItemFolderId>
<Items>
<t:CalendarItem>
<t:Subject>Meeting with attendee0, attendee1, attendee2</t:Subject>
<t:Body BodyType="Text">CalendarItem:TextBody</t:Body>
<t:Start>2006-06-25T10:00:00Z</t:Start>
<t:End>2006-06-25T11:00:00Z</t:End>
<t:Location>CalendarItem:Location</t:Location>
<t:RequiredAttendees>
<t:Attendee>
<t:Mailbox>
<t:EmailAddress>attendee0#example.com</t:EmailAddress>
</t:Mailbox>
</t:Attendee>
<t:Attendee>
<t:Mailbox>
<t:EmailAddress>attendee1#example.com</t:EmailAddress>
</t:Mailbox>
</t:Attendee>
</t:RequiredAttendees>
<t:OptionalAttendees>
<t:Attendee>
<t:Mailbox>
<t:EmailAddress>attendee2#example.com</t:EmailAddress>
</t:Mailbox>
</t:Attendee>
</t:OptionalAttendees>
<t:Resources>
<t:Attendee>
<t:Mailbox>
<t:EmailAddress>room0#example.com</t:EmailAddress>
</t:Mailbox>
</t:Attendee>
</t:Resources>
</t:CalendarItem>
</Items>
</CreateItem>
This is probably too late for you, but this for anyone else trying this.
The issue seems to be with providing the Is-Specified params. I deleted the IsMeetingSpecified and the request worked. Here's the revised CalendarItemType.
var meeting = new CalendarItemType
{
IsMeeting = true,
Subject = "test EWS",
Body = new BodyType { Value = "test body", BodyType1 = BodyTypeType.HTML },
Start = startDate,
StartSpecified = true,
End = startDate.AddHours(1),
EndSpecified = true,
MeetingTimeZone = new TimeZoneType
{
TimeZoneName = TimeZone.CurrentTimeZone.StandardName,
BaseOffset = "PT0H"
},
Location = "Room 1",
RequiredAttendees = new[] {
new AttendeeType
{
Mailbox =new EmailAddressType
{
EmailAddress ="test#test.com"
}
},
}
};

Resources