WCF and WSDL is two different things that sometimes brings in troubles.
I today struggled a bit with being allowed to set the targetNamespace of the WSDL being generated from WCF. Even you set the [namespace]-property in your contracts, the WSDL being generated does not listen to this.
If you click the second image, you see where the problem lies. Even I have attributed the ServiceContract like this:
it still presents this WSDL:
The solution is found in ServiceBehavior configuration! To control what is emitted as targetNamespace, you need to specify this in the ServiceBehaviour-configuration like this:
The final result (WSDL-wise) is this:
All is fine and dandy!
8 comments:
Thanks. This is just what I needed
Thanks.
great, just what i am finding.
great, just what i am finding.
But you still have:
<wsdl:import namespace="http://tempuri.org/"...
in the 8th line of the wsdl.
Do you know how it can be solved?
Good point!
I do not know from the top of my head; but I would expect it to find it somewhere in the same area (ServiceBehavior).
This space has been bought for the competition at the international market among all individuals and citizens. The organization of the competition is done for the further successive move and feelings of the person for the future times.
The solution is found in ServiceBehavior configuration! To control what is emitted as targetNamespace, you need to specify this in the ServiceBehaviour-configuration like this. 1z0-1031 exam dumps
Post a comment