I have wcf service in which I want to identify a wcf call by some identifier. OperationContext.Current.Incoming. MessageId is the option in case of wshttpbinding. But I am using basic http binding. Suggest me other field as identifier. How can I get such unique identifier per wcf call using basic http binding?
Related
My Application in .net framework calls one WCF service though service reference.
Want to pass correlation Id(unique id) to the outbound wcf service.
I'm trying to add behavior for the correlationid. With that if it'll solve the purpose.
What is the way to achieve this
How can I get the information about WCF REST service method details on client side
For Ex: I have a method
string GetDetails(string fname)
then my client application will show what is the return type of the function(string in this case), parameters required (fname) along with the name of the function(GetDetails).
You can say I want to create a WCF Test Client application for WCF REST service.
Thanks in advance!
I was testing below SOAP web service security example.
http://www.mulesoft.org/documentation/display/current/SOAP+Web+Service+Security+Example
Here in the soap component configuration, key value pair is action and UsernameToken TimeStamp. In Enabling WS-Security it is mentioned that key value are constant of WSHandlerContant class. But if instead of UsernameToken i use the constant variable USERNAME_TOKEN of WSHandlerContant class i am getting errors.
Can anyone tell me where i can find possible value of key value for SOAP security.
http://www.mulesoft.org/documentation/display/current/Enabling+WS-Security
http://people.apache.org/~coheigea/stage/wss4j/1.5.5/site/apidocs/org/apache/ws/security/handler/WSHandlerConstants.html#PW_CALLBACK_CLASS
Below are the contant field values that we can use in SOAP Security configuration.
http://people.apache.org/~coheigea/stage/wss4j/1.5.5/site/apidocs/constant-values.html#org.apache.ws.security.handler.WSHandlerConstants.RECEIVE
I have a WCF web-service with four different clients , one of our clients wants more functionality , so we are adding , new OperationContract , which will use new DataContracts and some existing one
Existing Operation Contracts or DataContracts are not being modified
We will just be adding new OperationContracts and few new DataContracts
Would all of our clients have to update their service reference ? ( or clients who don't want the additional functionality of new methods, can go on using the service as they were)
if all of the clients would have to update their service reference , is there a way around it ? ( I want that only the clients who want to use the new operationContract , should update the service reference )
We have netTcp and basichttp bindings
WCF is very flexible when in comes to versioning as shown in this good MSDN article. If you change a service contract exposed automatically through a MEX endpoint, then all clients will have access to the new changes.
If you want to tightly control the contract exposed by a service then you could turn off the MEX endpoint and distribute the edited WSDL (and appropriate XSDs if not using singlefile) files to specific clients. Do not consider this a security measure since all you're doing is "obscuring" the fact that the service supports more operations that you are revealing.
If you do need to secure the different contracts then you will need to create separate services to expose the appropriate contracts to authorized clients.
Existing clients do not need to change. Under the hood the contract between clients and the server are soap messages according to the schema of specific operations. Since these operations have not changed the soap is the same so clients will work.
I'm building a WCF SOAP application. The WSDL file has numerous operations of which many have the same argument type. The WSDL file defines all soapAction attributes as "''". When I try to start such a service WCF throw an exception saying that soapActions have to be unique.
After some googling I'm even more puzzled than before. I used SOAPUI to create a mock service with two operations which take the same input type and without the soapActions defined it always chooses the same operation. When the actions are defined it works fine.
My questions are:
Can you make a WCF SOAP service without unique soapActions (actually leaving the soapActions "''" as defined in the original WSDL)?
How can a service choose the right operation without the soapAction defined?
Edited:
I'm not in control of the WSDL. I'm using the WSCF.Blue tool to create a service stub from the WSDL file. I might be able to modify the WSDL, but I want to see if there is some possibility to leave it as it is.
It is not very clear from your question but I suggest you are building service based on some defined WSDL, aren't you? WCF by default uses SOAP action because it is required part of WS-I Basic Profile 1.1 offered by WCF services with BasicHttpBinding. WSDLs with empty SOAP actions are used when the action is defined by root body element.
WCF samples provides example of custom DispatchOperationSelector which is able to route messages to operations by their root body element. This is probably what you need to add to your service so that clients based on provided WSDL can call it.