Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
701 views
in Programming by
retagged by
I created one WCF. It shws

targetNamespace="http://tempuri.org/Imports" in schema.

 

How do I remove it?

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)

Usually http://tempuri.org/Imports is default in namespace. You can eleminate it by declaring the namespance.

First, declare it into service contract,

[ServiceContract(Namespace = Constants.Namespace)]
public interface IService1
{
[OperationContract]
void DoWork();
}
 
Now decoare namespace into service.
 
[ServiceBehavior(Namespace = Constants.Namespace)]
public class Service1 : IService1
{
public void DoWork()
{
}
}
 

Now you can set the binding namespace.

<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
 
That's all.
 
Hope that helps!


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...