.Net 1.1 app calling WCF http web service: The request failed with HTTP status 415  
Author Message
Bill Wendel





PostPosted: ASMX Web Services and XML Serialization, .Net 1.1 app calling WCF http web service: The request failed with HTTP status 415 Top

Trying to create a new WCF self-hosted web service to replace (and extend) an existing ASP.Net asmx web service.  My expectation is that existing clients can change the URL they were using to call the old ASP.Net web service to point to the new WCF web service.  When I do this, the new service works fine with new .Net 3.0 clients, but old clients get the follwing error:

 The request failed with HTTP status 415: Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8'

How do I fix this   Goal is no code changes for the client app.

 

Here's the config info for the WCF service running on the server:

<configuration>

<system.serviceModel>

<services>

<service name="MyNamespace.ValidationService" behaviorConfiguration="DefaultServiceBehaviors">

<endpoint contract="MyNamespace.IValidationService" binding="wsHttpBinding"/>

<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />

</service>

</services>

<behaviors>

<serviceBehaviors>

<behavior name="DefaultServiceBehaviors" >

<serviceMetadata httpGetEnabled="true" />

</behavior>

</serviceBehaviors>

</behaviors>

</system.serviceModel>

</configuration>



.NET Development5  
 
 
Elena Kharitidi





PostPosted: ASMX Web Services and XML Serialization, .Net 1.1 app calling WCF http web service: The request failed with HTTP status 415 Top

Your old clients send Soap 1.1 (default ASMX protocol), and the Net 3.0 service implementation is configured to use Soap 1.2, you need to change the server-side to use different binding; try pre-defined BasicHttpBinding.

Thanks,

Elena


 
 
Alex DeJarnatt - MSFT





PostPosted: ASMX Web Services and XML Serialization, .Net 1.1 app calling WCF http web service: The request failed with HTTP status 415 Top

Bill, did Elena answer your question Were you able to get this working

thanks

Alex



 
 
Stacy Prigmore





PostPosted: ASMX Web Services and XML Serialization, .Net 1.1 app calling WCF http web service: The request failed with HTTP status 415 Top

I'm having this same issue... Is there any documentation out there detailing how to get an ASP.NET 1.1 app to successfully talk to a WCF 3.0 web service
 
 
Kirill Gavrylyuk





PostPosted: ASMX Web Services and XML Serialization, .Net 1.1 app calling WCF http web service: The request failed with HTTP status 415 Top

http://msdn2.microsoft.com/en-us/library/ms731779.aspx
 
 
Stacy Prigmore





PostPosted: ASMX Web Services and XML Serialization, .Net 1.1 app calling WCF http web service: The request failed with HTTP status 415 Top

Thanks Kirill!! I'll give that a try and let you know how it goes!! I really appreciate the help!! Stacy
 
 
Stacy Prigmore





PostPosted: ASMX Web Services and XML Serialization, .Net 1.1 app calling WCF http web service: The request failed with HTTP status 415 Top

Ok... I have followed through and setup the basic binding for my WCF service. Thanks so much for that hint!! But now I am having issues when the Request or Response Service Contracts contain complex types. The disco code generator in the 1.1 App comes back with the following Error/Task:

Custom tool error: Unable to import WebService/Schema. Unable to import binding 'BasicHttpBinding_IWebserviceVersion' from namespace 'http://Snc.Ls.Claims.ServiceContracts/2007/07'. Unable to import operation 'GetWebserviceVersion'. The element 'http://Snc.Ls.Claims.ServiceContracts/2007/07:GetWebserviceVersionResponse' is missing.

Have any of you guys run into this

Again... Thanks so very much for the help!!

Stacy


 
 
Stacy Prigmore





PostPosted: ASMX Web Services and XML Serialization, .Net 1.1 app calling WCF http web service: The request failed with HTTP status 415 Top

I found a gentleman that wrote a blog on this error. It has really helped me out... I hope that it helps someone else!!

http://blogs.thinktecture.com/cweyer/archive/2007/05/10/414840.aspx


 
 
shanmugal





PostPosted: ASMX Web Services and XML Serialization, .Net 1.1 app calling WCF http web service: The request failed with HTTP status 415 Top

Hi,

I have created a WCF service using .net framework 3.0.

How to consume the WCF service in visual basic, vbscript and ASP.

I appreciate your help.

thanks