By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,817 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

discocodegenerator unable to initialize my method is public

P: n/a
I am using this link to create a web service to WSS Library

The web service is register and can be found by a test web application. I
use the wsdl and get

No Ports or Methods were found on this page.

If this is an ASP.NET Web service, make sure that all WebMethods are public
and have a <WebMethod> attribute.

But the method see below is public

public string UploadDocument(string fileName, byte[] fileContents, string
if ( fileContents == null)
return "Null Attachment";
SPWeb site = SPControl.GetContextWeb(Context);
SPFolder folder = site.GetFolder(pathFolder);
string fileUrl = fileName;
SPFile file = folder.Files.Add(fileUrl, fileContents);
return file.TimeCreated.ToLongDateString()+ "::" + file.Title;
catch (System.Exception ee)
return ee.Message + "::" + ee.Source;

The project has 2 text and button to do upload

I get build error

Custom Tool Warning DiscCodeGenerator unable to initialize code generator

the service runs on port 8081 with permission of windows integration, no ssl
It is a wss server but running on 8081 i should not have to define as
excluded correct? What is wrong where is example that works?

Mar 14 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Hi Cindy,

Welcome to the MSDN newsgroup.

As for the msdn article you mentioned, I did have heard from some other
guys who use the approach mentioned in it to provide webservice access for
their sharepoint server. Though I'm not quite familiar with WSS, I think
you can first check the WSDL document url of your deployed webservice to
see whether it can be visited correctly and whether it has expose the
correct endpoint information of the webservice.

When you use webbrowser to visit the webservice's WSDL document, does it
display correctly?(shows the XML document which contains the WSDL
description of the webservice). If it can display correctly, you can look
at the service's endpoint (address) to see whehter it display the correct
address (url and port) which is accessible.


Steven Cheng
Microsoft Online Support

Get Secure!
(This posting is provided "AS IS", with no warranties, and confers no

Mar 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.