How to deploy webservices to a compiled website?

Last post 07-08-2008 1:47 PM by peterban. 2 replies.

Sort Posts:

  • How to deploy webservices to a compiled website?

    07-03-2008, 8:53 AM
    • Member
      22 point Member
    • peterban
    • Member since 05-26-2006, 5:13 AM
    • Posts 11

    Hi,

    I have a web application which I have just compiled to get things working faster - which works great!

    However I have a webservice as part of the application which I dont seem to be able to access any more (from SSIS) - works fine in the uncompiled version.

    Is there anything special I need to do to deploy the webservice part?

    I have tried adding it manually in the compiled version and I get the "cannot add reference to a compiled website...." type message.

     Any help is appreciated!

    Filed under: , ,
  • Re: How to deploy webservices to a compiled website?

    07-03-2008, 10:03 AM
    • Participant
      1,353 point Participant
    • Swati Jain
    • Member since 05-24-2006, 12:29 PM
    • Pune
    • Posts 731

     

    -- Get the uncompiled version of the  webapplication

    -- add the required references

      then compile it again

    create template

    create site column

    create content type

    Add template and site columns to content type

    Add content type to document library



    ---------------------------------------
    public class Block : System.Web.UI.WebControls.WebParts.WebPart
    {
    string m_scriptBlock = "";
    string m_scriptKey = "scriptKey";

    //Key Property
    [Personalizable(PersonalizationScope.Shared), WebBrowsable(true),
    WebDisplayName("Script Key"),
    WebDescription("A unique key for the script.")]
    public string ScriptKey
    {
    get { return m_scriptKey; }
    set { m_scriptKey = value; }
    }

    //Script Property
    [Personalizable(PersonalizationScope.Shared), WebBrowsable(true),
    WebDisplayName("Script"),
    WebDescription("The JavaScript to insert in the page.")]
    public string Script
    {
    get { return m_scriptBlock; }
    set { m_scriptBlock = value; }
    }

    protected override void OnPreRender(EventArgs e)
    {
    base.OnPreRender(e);

    if (m_scriptBlock != "" &&
    !Page.ClientScript.IsClientScriptBlockRegistered(m_scriptKey))
    Page.ClientScript.RegisterClientScriptBlock(
    typeof(string), m_scriptKey, m_scriptBlock, true);

    }
    }

    -----------------------------------------






    protected override void CreateChildControls()
    {
    base.CreateChildControls();

    try
    {
    if (_userControl != defaultText)
    {
    _control = this.Page.LoadControl(_userControl);
    }
    else
    {
    _control = new LiteralControl(string.Format("To link to content, open the tool pane and then type a URL in the Link text box.", 1, 129, this.ID));
    }
    }
    catch (System.Exception ex)
    {
    _control = new LiteralControl(string.Format("Error: unable to load {0}
    Details: {1}", _userControl, ex.Message));
    }

    if (_control != null)
    {
    // Add to the Controls collection to support postback
    this.Controls.Add(_control);
    }
    }









    -------------------------------------------------------------------------
    opening the template inline in list view?

    Redirecting different content type to different folder



    C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES --for multiple sharepont apps


    ------------------------------------------------------
    For creating webPart automatic

    create blank project --> add new component --> webpart
    --------------------------------------------------------


    custom event Handler
    In class library

    orders.EventReceivers.Add
  • Re: How to deploy webservices to a compiled website?

    07-08-2008, 1:47 PM
    • Member
      22 point Member
    • peterban
    • Member since 05-26-2006, 5:13 AM
    • Posts 11

    Hmm,

    I didnt explain myself very well...

    1) In an uncompiled website we have some code that consumes the webservice

    2) this code is called from SSIS using the webservices task - this was dont by finding the wsdl etc

    So far so good - works well..

    However when I compile the website the wsdl goes so the SSIS task doesnt seem to find any of the services.

    So I guess the question is - do I have to wrap the webservice call inside a scripting task ??

    Any help is much appreciated !!!

    Filed under: , , ,
Page 1 of 1 (3 items)