How to use display message in a web service

I have a web service that I call to write out a pdf file.  I am trying to check the value of the file name and path I am passing.  I am using response.write, but do not see anything being displayed in the browser.  I know it is hitting it, because the next line of code after this is executed.  See my code snippet below.
HttpContext.Current.Response.Write("File Name:" + " " +psFileName)

Open in new window

66chawgerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ShazbotOKCommented:
WebServices do not use the Response object...
I would either set a return value or have the webservice take a out string parameter that you can set that debug check to...
0
66chawgerAuthor Commented:
ok, look at my code below.  How would I code the return of the value in my user control.  

I have examples of the code calling the web service and the code executed in the web service...see below.  I need to see show or pass back what psFileName looks like in the webservice.  Thanks

User Control calls webservice method as follows:
 
SafecoService.CreatePDFApplication(@"D:\inetpub\wwwroot\data\SafecoPersonalAuto\"+psQuoteID+".pdf",bytes);
 
This is what the method looks like in the web service:
public static void CreatePDFFile(string psFileName,byte[] byteData)
{
FileStream Fs=File.Create(psFileName);
BinaryWriter BW=new BinaryWriter(Fs);
BW.Write(byteData);
BW.Close();
Fs.Close();
}

Open in new window

0
bmcvicarCommented:
66chawger,

Give this a shot- it will return a string containing the text "File Name:" and the filename you supplied.
public string CreatePDFFile(string psFileName,byte[] byteData)
{
FileStream Fs=File.Create(psFileName);
BinaryWriter BW=new BinaryWriter(Fs);
BW.Write(byteData);
BW.Close();
Fs.Close();
return "File Name:" + " " +psFileName
}

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
66chawgerAuthor Commented:
This was probably another item any debugging web services has encountered.  The solution given was so obvious and fits right in with how you call methods in a web service and return values.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.