How should the client channed be implemented?
DRAG DROP
Exhibit:
<ServiceContract(CallbackContract =GetType(INameService))>
Public Interface IGreetingService
<OperationContract>
Function PassGuideMessage() As String
End Interface
<ServiceContract>
Public Interface INameService
<OperationContract>
Function PassGuideName() As String
End Interface
There is a WCF (Windows Communication Foundation) solution PassGuideSol, which is using
some contracts being displayed in the exhibit.
Whenever the client uses PassGuideMessage on the service interface, the service uses the client
callback to call PassGuideName. Within the client the callback contract is implemented by the
NameService class.
The service callback must processed by an instance of NameService.
How should the client channed be implemented?
How can this be achieved?
DRAG DROP
PassGuideService Exhibit:
<ServiceContract>
Public Interface PassGuideService
<OperationContract>
Function GetPassGuideServiceTime() As DateTime
End Interface
There is a class PassGuideService.
PassGuideService is hosted within an ASP.NET application PassGuideApp.
PassGuideService implements the interface being displayed in the exhibit.
PassGuideApp must be tweaked so that the GetPassGuideServiceTime method returns the result
formatted as JSON when request url ends in /PassGuide.
How can this be achieved?
Which code should you use?
DRAG DROP
PassGuideService exhibit:
< OperationContract >
Sub OperationContract (Byval data As Order)
There is a client PassGuideClient.
PassGuideClient sends multiple SOAP message to a WCF (Windows Communication Foundation)
service method PassGuideService.
PassGuideService must be tweaked so that any SOAP message can be received.
Which code should you use?
How should this be achieved?
DRAG DROP
Soap envelope exhibit:
<s:Envelope xmlns:se’http://schemas.xmlsoporg/soap/enveloper’>
<s: Header>
<h:PassGuideID xmlns = “http:/www.PassGuide.com”>
9283
</h: PassGuideID>
</s:Header>
<s:Body>
<PassGuideStock xmlns=http://www.PassGuide.com”>
<ParticularID>1234 </ ParticularID >
</PassGuideStock>
</s: Body>
</s: Envelope>
The SOAP envelope in the exhibit must be generated.
How should this be achieved?
How can this be achieved?
DRAG DROP
Data contract Exhibit:
<DataContract>
Public Class Employee
<DataMember>
Public Name As String
<DataMember>
Public City As String
<DataMember>
Public Wage As Integer
<DataMember>
Public EMPLOYEEID As Integer
End Class
XML exhibit:
<Employee>
<Name xsi:nil”true”/>
<City xsi:nil “true”/>
< EMPLOYEEID >123456789 </ EMPLOYEEID >
</Employee>
There is WCF (Windows Communication Foundation) application PassGuideApp.
PassGuideApp uses the data contract being displayed data contract exhibit.
The XML code in the XML exhibit must be produces with the data contract is serialized.
How can this be achieved?
How can this be achieved?
DRAG DROP
There is a WCF (Windows Communication Foundation) service IPassGuideService in class
PassGuideService.
PassGuideService intermittently throws an exception and then fails.
Now you need to handle the unhandled exceptions to clients by sending the stack trace of these to
the clients as a fault message.
How can this be achieved?
How should this be achieved?
Contract exhibit:
<ServiceContract(Namespaces”http://PassGuide.com”)>
Public Interface IShipping
<OperationContract>
Function PassGuideWork(ByVal id As Integer) As String
End Interface
There is a WCF (Windows Communication Foundation) application PassGuideApp.
There is a WCF (Windows Communication Foundation) service PassGuideService.
The contract of PassGuideService is being displayed in the exhibit.
PassGuideApp is also hosting other services.
PassGuideApp endpoints use SOAP 1.2 bindings with WS-Addressing 1.0.
There is one single lister configured in System.ServiceModel.MessageLogging trace source of the
system.diagnostics configuration section.
Only the messeages that the PassGuideWork operation returns should be logged.
How should this be achieved? Select four.
How should the ServiceContract be tweaked to achieve is?
ServiceContract Exhibit:
<ServiceContract>
Public Class PassGuideService
<OperationContract>
Public Function PassGuideConfirm(ByVal PhoneNumber As String,ByVal wage As Double,ByVal
EmployeeNumber Integer) As Boolean ‘…
End Function
There is a WCF (Windows Communication Foundation) service PassGuideService.
PassGuideService exists within SOA (Service Oriented Architecture) within an enterprise.
The serviceContact of PassGuideService is displayed in the exhibit.
Method PassGuideConfirm, when executed, must be participate transperentally in existing
transactions.Furthermore, when there is no existing transaction, a new transaction must be
created.
How should the ServiceContract be tweaked to achieve is?
Which contract should PassGuideService have?
DRAG DROP
There is a WCF (Windows Communication Foundation) service PassGuideService.
The clients and the service that uses PassGuideService use NetTcpBinding (transaction flow
enabled).
Assuming that the operations PassGuideOP1 and PassGuideOP2 are called within the same
client session, you need to enforce that they are executed within the same transaction context.
Which contract should PassGuideService have?
You need to tweak the code in order to make it work
Contract exhibit:
[ServiceContract(CallbackContract typeof(INameService))]
public interface IGreetingSennce
{
[OperationContract]
string GetMessage0,
}
[ServiceContract]
public interface INameService
{
[OperationContract]
string GetName();
}
IGreetingService interface exhibit:
<ServiceContract(CallbackContract typeof(INameService))>
Public Interface IGreetingService
<OperationContract>
Function GetMessage() As String
End Interface
<ServiceContract>
Public Interface INameService
<OperationContract>
Function GetNamne() As String
End Interface
Hosting code exhibit:
Dim host As ServiceHost =
New ServiceHost(GetType(GreetingService))
Dim binding As NetTcpBinding =
New NetTc pBindng(SecurityMode.None)
Host.AddServiceEndpoint(“PassGuideAppIGreetingService”,
binding, net.tcp:localhost = “96374″)
Host Open()
INameService interface exhibit:
class NameService INameService
{
string name;
public NameService(string name)
{
this.name = name;
}
public string GetName()
{
return name;
}}
Class NameService
Implements INameService
Dim name As String
Public Sub NameService(ByV name As String)
Me.reme = name
End Sub
Public Function GetName() As String -Impements INameService. GeNamee
Return name
End Function
End Class
There is a WCF (Windows Communication Foundation) service PassGuideService.
PassGuideService is self-hosted.
The implementations of contracts, the IGreetingService interface, the hosting code, and the
INameService interface are all being displayed in the exhibits.
At the moment the above code fails at line “return String.Format(“Hi there {0}, clientName);”.
You need to tweak the code in order to make it work.
What should you do? (select three)
Use code…