Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to call the CreateWorkspace method of the Meetings web service to create a subsite but I find no simple information on how to create the timeZoneInformation parameter in javascript which according to the WSDL is not optional.

there are examples showing how to do it in Visual Basic:

Dim tz As New mywss001.TimeZoneInf()
..
CreateWorkspaceResponse = 
    ws.CreateWorkspace(MeetingSubjectTextBox.Text, "MPS#0",
        System.UInt32.Parse("1033"), tz) 

but no examples of how to generate it in javascript.

According to microsoft the relevant SOAP request XML is:

  <timeZoneInformation>
    <bias>int</bias>
    <standardDate>
      <year>unsignedShort</year>
      <month>unsignedShort</month>
      <dayOfWeek>unsignedShort</dayOfWeek>
      <day>unsignedShort</day>
      <hour>unsignedShort</hour>
      <minute>unsignedShort</minute>
      <second>unsignedShort</second>
      <milliseconds>unsignedShort</milliseconds>
    </standardDate>
    <standardBias>int</standardBias>
    <daylightDate>
      <year>unsignedShort</year>
      <month>unsignedShort</month>
      <dayOfWeek>unsignedShort</dayOfWeek>
      <day>unsignedShort</day>
      <hour>unsignedShort</hour>
      <minute>unsignedShort</minute>
      <second>unsignedShort</second>
      <milliseconds>unsignedShort</milliseconds>
    </daylightDate>
    <daylightBias>int</daylightBias>
  </timeZoneInformation>

Does anyone know how to do this in javascript or have an example of a real SOAP request which I could work back from?

share|improve this question

1 Answer 1

I don't know if this helps, but the parameter is required to be present, but can be blank. I use this web service with InfoPath forms to create workspaces and sites all the time. However, I only have to have a field connected to the parameter and can leave it completely blank and the site will create. The only parameters that actually contain information are Title, Template, and LCID.

Good luck!

Lori

share|improve this answer
    
Thanks - My main problem is that I can't seem to create anything except a meeting site using this method, irregardless of what I select as the site template to use - I've tried inbuilt ones like "STS#0" and custome templates like "testsite.stp". I had thought it was because I was sending this parameter incorrectly but looks like it's OK. Any ideas why calling this method from javascript might be ignoring the site template parameter?? –  Anonymous Mar 8 '10 at 12:34
    
Never tried it from a javascript. I've only been able to successfully use it on the OOTB site definitions. I've used it on all of them successfully. Check here: pointgowin.com/SeeThePoint/Lists/Posts/Post.aspx?ID=27 There's a short video I made showing how I use it. Might help? –  Lori Mar 8 '10 at 14:25
1  
Thanks for the help. I was convinced this worked and I finally got it going... time to fess up I suppose - Even after all these years it appears I still can't remember to double-check the case-sensetivity of my javascript parameters - I had the template name parameter wrong so the web service was defaulting to the meeting template - makes sense now. just to confirm - you CAN create subsites with the CreateWorkspace method of the Meetings webservice with any standard (STS#0) or custom site template (testtemplate.stp) - the timeZoneInformation is only important in meeting sites –  Anonymous Mar 9 '10 at 8:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.