WebService not accepting my PDF

  • Thread starter Thread starter Stephen Russell
  • Start date Start date
S

Stephen Russell

I have my webservice and it's not receiving a PDF file from my ASP.NET
application.

Client found response content type of 'text/html; charset=utf-8', but
expected 'text/xml'.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Client found response
content type of 'text/html; charset=utf-8', but expected 'text/xml'.

Source Error:



Line 275:

[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.o

rg/ReceiveNewPDFs", RequestNamespace="http://tempuri.org/",

ResponseNamespace="http://tempuri.org/",

Use=System.Web.Services.Description.SoapBindingUse.Literal,

ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]

Line 276: public void

ReceiveNewPDFs([System.Xml.Serialization.XmlElementAttribute(DataType="base6

4Binary")] System.Byte[] pdf, string fileName, string filePath) {

Line 277: this.Invoke("ReceiveNewPDFs", new object[] {

Line 278: pdf,

Line 279: fileName,


References\ParkerWS\Reference.cs Line: 277
 
Stephen,

This has more to do with the server function, not the client-side proxy
(which is what you showed the code from).

The webservice is invalid. You should bring it up with the provider, or
if it is yours, fix it, since it is returning an invalid response header
(not text/html).

Hope this helps.
 
I have both on my laptop at this point. The WS will be posted on a
hosted site, but for now it's in a dev stage.

I don't understand "The webservice is invalid. You should bring it up
with the provider, or
if it is yours, fix it, since it is returning an invalid response header
(not text/html)."
 
Stephen,

Web services do not return a content type of "text/html", they return a
content type of "text/xml". This is the error, and it is coming from the
web service.

Did you write the code yourself from an ASPX page, or did you actually
create a web service project?
 
Back
Top