Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOAP Service Need To Accept Content-Type Of "application/x-www-form-urlencoded". #108989

Open
vsfeedback opened this issue Oct 17, 2024 · 2 comments
Labels
area-System.Net.Http question Answer questions and provide assistance, not an issue with source code or documentation. untriaged New issue has not been triaged by the area owner

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:Other]
I used Visual Studio 2022 (64-bit) Version 17.10.5 to create a C# SOAP web service using the .NET Framework 4.8 to process SOAP responses sent by a 3rd party SOAP service, but now I need to know how to allow my SOAP service to accept the Content-Type of "application/x-www-form-urlencoded" which is the Content-Type being returned by the 3rd party. The 3rd party states that the Content-Type of "application/x-www-form-urlencoded" is a requirement that my SOAP service should accept it. I have searched extensively over the past 2 days and cannot find a solution on how to configure my SOAP service. The SOAP service is published to a Windows Server 2022 (Version 21H2 - OS Build 20348.2582) IIS Web Server (Version 10.0.20348.)

I also created a separate SOAP service using the .NET Framework 4.8 using the example "HelloWorld" so I could try change the Content-Type within that SOAP service but could not figure how to accomplish that. Is there a way to change the default Content-Type from "application/soap+xml" to "application/x-www-form-urlencoded"?

Screenshot 2024-08-01 140928.png

Below is the code for the HelloWorld SOAP

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Description;
using System.Web.Services.Protocols;

namespace WebServiceProject
{
    /// <summary>
    /// Summary description for WebService
    /// </summary>
    //[WebService(Namespace = "http://tempuri.org/")]
    [WebService(Namespace = "http://localhost:8082/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]

    public class WebService : System.Web.Services.WebService
    {
        [WebMethod]

        public string HelloWorld()
        {
            return "Hello World";
        }

        [WebMethod]
        public int Add(List<int> listInt)
        {
            int result = 0;
            for (int i = 0; i < listInt.Count; i++)
            {
                result = result + listInt[i];
            }
            return result;
        }
        
    }
}

Original Comments

Feedback Bot on 8/1/2024, 08:54 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 17, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Oct 17, 2024
@steveharter steveharter added area-System.Net.Http question Answer questions and provide assistance, not an issue with source code or documentation. untriaged New issue has not been triaged by the area owner and removed untriaged New issue has not been triaged by the area owner needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 17, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@antonfirsov
Copy link
Member

This ticket was routed to the wrong team. I'm not sure what is the right discussion board for classic ASP.NET SOAP WebServices today, but given that the original question was asked on 8/1, and the comments have been made readonly there, IMO it's fine to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Net.Http question Answer questions and provide assistance, not an issue with source code or documentation. untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

3 participants