Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3335462
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:01:16+00:00 2026-05-18T00:01:16+00:00

I have a .NET 4.0 web service which has an targetNamespace of http://tempuri.org when

  • 0

I have a .NET 4.0 web service which has an targetNamespace of “http://tempuri.org” when the WSDL is generated. A client is sending me a SOAP envelope with the xmlns set to “uri:company:agent” (see sample below) My service rejects the SOAP envelope since the namespaces are not the same.

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:company:agent">
<SOAP-ENV:Body>
   <ns1:send_message xmlns="urn:company:agent">
       <item1>abc</item1>

I receive the following error:

 <faultstring xml:lang="en-US">Error in deserializing body of request message for operation 'send_message'. OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name 'send_message' and namespace 'http://tempuri.org/'. Found node type 'Element' with name 'ns1:send_message' and namespace 'urn:company:agent'</faultstring>

My Question is as follows: I can’t find where to change the namespace of my project within Visual Studio 2010 to reflect “uri:company:agent” instead of “http://tempuri.org/&#8221;. I’ve looked extensively but any changes I make do not reflect in the WSDL.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:01:16+00:00Added an answer on May 18, 2026 at 12:01 am

    If you lookt at your .asmx code file it should begin something like this:

    [WebService(Namespace = "http://tempuri.org")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    public class YourServiceName: WebService
    {
    

    Just change the tempuri.org url in there. If yours has no Namespace declared there you can declare it, I think tempuri might be the default.

    If you’re using WCF it will be slightly different. You’ll want to look at the top of your .svc file and likely need to add the ServiceBehavior declaration like this:

    [ServiceBehavior(Name = "MyService", Namespace = "http://myservice.com/")]
    public class Service1 : IService1
    {  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a generated stub for a .net web service which has several string
I have a .net web application which has a reference to a web service.
I have an ASP.NET web service running that accepts both HTTP POST and SOAP
I have a .Net 4 project that has to consume a SOAP Web Service.
I have an ASP.net web service that I'm using for a web application which
I have a .NET Web Service running in VS2005 and a client that consumes
We have a simple ASP.Net WCF Ajax enabled web service which is called via
We have an ASMX web service which we invoke from our ASP.NET application using
i have the WCF web service within my solution. service has interface which implemeted
I have a Web Service for my ASP.NET MVC 3 app which creates a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.