多项选择题
A Windows Communication Foundation (WCF) solution uses two services to manage a shopping cart. Service A processes messages containing line items that total between $0 and $500. Service B processes messages containing line items that total more than $500. All messages are of equal importance to the business logic. You need to route incoming messages to the appropriate services by using WCF routing. Which two message filters should you add to the router? (Each correct answer presents part of the solution. Choose two.)()
A.a message filter with a priority of 100 that will forward messages that total between $0 and $500 to Service A
B.a message filter with a priority of 0 that will forward messages that total between $0 and $500 to Service A
C.a message filter with a priority of 0 that will forward all messages to Service B
D.a message filter with a priority of 100 that will forward all messages to Service B
相关考题
-
单项选择题
You are creating a Windows Communication Foundation (WCF) service that responds using plain-old XML (POX).You have the following requirements: You must enable the /catalog.svc IItems operation to respond using the POX, JSON, or ATOM formats. You also must ensure that the same URL is used regardless of the result type. You must determine the response format by using the Accepts HTTP header.What should you do?()
A. Implement the IChannelInitializer interface in the service class.
B. Implement the System.Runtime.Serialization.IFormatterConverter interface in the service class.
C. Set the BodyStyle parameter of the WebGet attribute on the operation to WebMessageBodyStyle.WrappedResponse.
D. Set the retum type of the operation to System.ServiceModel.Channels.Message. Use the current WebOperationContext methods to return the data in the required format. -
多项选择题
You are developing a Windows Communication Foundation (WCF) service. You write a method named Submit that accepts messages of the type System.ServiceModel.Channels.Message. You need to process the body of the incoming messages multiple times in the method. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)()
A. Use the GetBody method of the Message class to read the content of the messages.
B. Use the CreateBufferedCopy method of the Message class to load the messages into memory.
C. Use the WriteBodyContents method of the BodyWriter class to make a copy of the messages.
D. Use the CreateMessage method of the MessageBuffer class to make a copy of the messages. -
单项选择题
A Windows Communication Foundation (WCF) service is generating a separate namespace declaration for each body member of a message contract,even though all body members share the same namespace. You need to simplify the XML representation of your message contract so that the namespace is only declared once. What should you do?()
A. Declare a wrapper namespace for the message contract by using the WrapperNamespace property of the MessageContract attribute
B. Explicitly set the Namespace property of all the MessageBodyMember attrbutes to the same namespace.
C. Declare all of the body members as properties of a DataContract class and use the class as the only body member of the message contract.
D. Declare all of the body members as properties of a separate MessageContract class and use the class as the only body member of the message contract.
