Nov 13, 2011

WSDL Elements

Types
 Container for the WSDL XML Schema type definitions. The

types elements can have zero more schema elements.
Messages
 Defines abstract message that can serve as the input or

output of an operation.

 Message Exchange Pattern
 1. One-way
 2. Request-response
 3. Solicit-response
 4. Notification

Bindings
 Defines the message format and protocal details for a

web service.
Service
 Defines collection of ports, or endpoints.

Nov 12, 2011

WCF / Windows Communication Foundation (Quick View)


 WCF is a runtime that enables to create the services to communicate with the client through standard transport mechanism. WCF supports request-reply, one-way, and duplex communication.
WCF architecture divided into three models namely Programming Model, Service Model, and Channel Model.
Service Contract
                Exposes endpoints and operations to be called from the client.
Operation Contract
                Defines parameter and return type of service contracts.
Data Contract
                Metadata of the data types. This enables to interoperate with the service. This can be used in any part of the message.
Message Contract
                Describes format of the message structured.
Fault Contract
                Used to send the error messages back to the client.

AppDomain


What is AppDomain
                AppDomain is a modal which defines boundary for code execution. AppDomain provides isolation within a process. AppDomain will be hosted into the OS process. The OS process can host multiple AppDomain.

                The  code running in an AppDomain will not affect the code running in another AppDomain. By this way it provides Security to your application.
AppDomain can be unloaded from the process at any time of execution. But the AppDomain should be idle during unload.
                By providing isolation, the AppDomain exceptions, memory are handled separately for each AppDoamin

Create your own appdomain,

AppDomain domain = AppDomain.CreateDomain("MyDomain");

Unload AppDomain,
Using the System.AppDomain.Unload method

Exception:  CannotUnloadAppDomainException.
Namespace: System.AppDomain

Setting AppDomain Setup using the AppDomainSetup.
// Create application domain setup information.
        AppDomainSetup domaininfo = new AppDomainSetup();
        domaininfo.ApplicationBase = "f:\\work\\development\\latest";

        // Create the application domain.
        AppDomain domain = AppDomain.CreateDomain("MyDomain", null,  domaininfo);

Use the LoadFrom to the assembly into AppDomain.
// Use the file name to load the assembly into the current
        // application domain.
        Assembly a = Assembly.Load("example");
        // Get the type to use.
        Type myType = a.GetType("Example");
        // Get the method to call.
        MethodInfo myMethod = myType.GetMethod("MethodA");
        // Create an instance.
        object obj = Activator.CreateInstance(myType);
        // Execute the method.
        myMethod.Invoke(obj, null);
    

Nov 5, 2011

BlackBerry and .NET

To test your web application in development environment you can use either simulators or the plugins for Visual Studio.
  1. You can download BlackBerry simulators from BlackBerry official website.
  2. The BlackBerry plugin for Visual Studio 2008 enables you to debug the web applications on Blackberry.
I can see the plugin only for Blacberry Device Software 4.6. If you would like to go for an older version, good to test with the simulators.

You may face an issue when you try to connect the Internet from the simulator and you would be getting the error message  "Unable to Connect the internet...". You can get out this problem by running MDS-CS before starting the BlackBerry simulators. The MDS-CS is available with the JDE for BlackBerry.