Quantcast
Channel: SharePoint 2010 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 17574

The type or namespace web_reference_name could not be found

$
0
0

Dear All,

I am trying to use copy into items webservice mentioned in MSDN in my program and getting the error mentioned in subject line. I am definitelly missing declaring something, but not sure what? This is the first time i am using a web service. Please help

Here is the webservice I am trying to use:

            

 [SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/CopyIntoItems", RequestNamespace = "http://schemas.microsoft.com/sharepoint/soap/",
      ResponseNamespace = "http://schemas.microsoft.com/sharepoint/soap/",
      Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]

        public uint CopyIntoItems(string SourceUrl, string[] DestinationUrls, FieldInformation[] Fields,
    byte[] Stream, out CopyResult[] Results)
        {

            Web_Reference_Name.Copy myCopyService = new Web_Reference_Name.Copy();
            myCopyService.Credentials =
                System.Net.CredentialCache.DefaultCredentials;

            string copySource = "http://Server1/Site1/Shared Documents/test.txt";
            string[] copyDest = { "http://Server2/Site1/Shared Documents/test.txt", 
    "http://Server2/Site2/Shared Documents/test.txt" };

            Web_Reference_Name.FieldInformation myFieldInfo = new
                Web_Reference_Name.FieldInformation();
            Web_Reference_Name.FieldInformation[] myFieldInfoArray = { myFieldInfo };
            byte[] myByteArray;

            uint myGetUint = myCopyService.GetItem(copySource,
                out myFieldInfoArray, out myByteArray);

            Web_Reference_Name.CopyResult myCopyResult1 = new Web_Reference_Name.CopyResult();
            Web_Reference_Name.CopyResult myCopyResult2 = new Web_Reference_Name.CopyResult();
            Web_Reference_Name.CopyResult[] myCopyResultArray = { myCopyResult1, 
    myCopyResult2 };


Viewing all articles
Browse latest Browse all 17574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>