Showing posts with label Web Services. Show all posts
Showing posts with label Web Services. Show all posts

Saturday 25 October 2014

How do I get a YouTube video thumbnail from the YouTube

How do I get a YouTube video thumbnail from the YouTube




How to get youtube video thumbnail
1. First Get the Video URL (Video URL is like https://www.youtube.com/v/J0Qu6eyyr4c)
2. Get the youtube video Id from Video URL (Video id is like J0Qu6eyyr4c)
3. Now video thumbnail is ready.


Small Video Image
How do I get a YouTube video thumbnail from the YouTube
http://img.youtube.com/vi/J0Qu6eyyr4c/default.jpg 



Bigger Video Thumbnail
How do I get a YouTube video thumbnail from the YouTube
http://img.youtube.com/vi/J0Qu6eyyr4c/mqdefault.jpg



Large Video Thumbnail
How do I get a YouTube video thumbnail from the YouTube
http://img.youtube.com/vi/J0Qu6eyyr4c/hqdefault.jpg



Thursday 21 August 2014

XML Interview Questions And Answers

XML Interview Questions And Answers

What is full Form XML?
Extensible Markup Language.


What is XML?
It is text-based standard design for interchange the information between two application. There are no predefined tags and attributes in XML. you can create your own tags and attributes in tag.


Who created the XML?
Jon Bosak


Why It is so popular?
  • It is free standard for exchange information.
  • It is independent of language.
  • It is independent of Hosting Server 
  • Human Readable.
  • You can create your Own tags in XML. 
  • Used for embed images, video etc

Where XML is used?
It is used to exchange the information between two application. Information can also be exchanged between two different application which is running on different OR same server. It is used in Web Application, Mobile Application (IOS, Android, Iphone, window Phone) for providing the API. It is also used AS installer in web application, you can set the application configuration in XML file.


Why it is used?
  • It is Opensource.
  • It is easy to understand.
  • you can create your own tags. 
  • Independent of languages and OS.
  • You can embed photo, videos in XML.

What is file extension of XML?
.xml


How the raw XML file can be viewed in a browser?
Raw XML files can be viewed in Mozilla, Firefox, Opera, Internet Explorer and in Netscape. For make XML documents to display like nice web pages, you will have to add some display information.


How to parse XML in PHP?
http://www.web-technology-experts-notes.in/2013/05/parse-xml-in-php-by-example.html


What is a CDATA section in XML?
The CDATA is used when you don't want some text data be parsed by the XML parser.
<![CDATA[ HERE IS NON-PARSED DATA]]>
Now, above data will not parse.


What is XQuery?
Xquery is a query language that is used to retrieve data from XML documents. You can add, update, delete and list the XML with use of XQuery.


What i XMLA ?
It is protocol of Microsoft  for XML-messaging used for exchanging data between client and servers.


What is XSL?
XSL is a language used for expressing style sheets. An XSL style sheet is a file that describes the way to display an XML document.


What is the difference between XML and HTML?
HTML XML
Used for displaying information. Used for data representation.
HTML is used to mark up text so it can be displayed to users. XML is used to mark up data so it can be processed by computers.
HTML describes both structure (e.g. <p>, <h2>, <em>) and appearance (e.g. <br>, <font>, <i>) XML describes only content
HTML uses a fixed, unchangeable tags There is no predefined tags, you can create your own.



What are the benefits of XML?
Simplicity
Openness
Extensibility
Self-description
Contains machine-readable context information- Tags, attributes and element structure provide context information. Can embed multiple data types - XML documents can contain any possible data type - from multimedia data (image, sound, video) to active components (Java applets, ActiveX).



What is a well-formed XML document?
If a document is syntactically correct it can be called as well-formed XML documents.
Every open tag must be closed.
The open tag must exactly match the closing tag: XML is case-sensitive.
All elements must be embedded within a single root element.
Child tags must be closed before parent tags.
A well-formed document has correct XML tag syntax, but the elements might be invalid for the specified document type.



How to add CSS in XML File?
<!--xml-stylesheet type="text/css" href="/css/mystyle.css"?-->



How to add CSS in XML File?
<script>
<![CDATA[
function()
{
    any code........
}
]]>
</script>

Thursday 7 August 2014

Goole Map - Track your moving Position on google map- html5

Goole Map - Track your moving Position on google map- html5

This will enable to you get the current position of your location in mobile. First it will tell your current position on the Google map in form of Pushpin. When you start changing your position then pushpin will start moving. It will be follow you. But GPS and internet must be support by your mobile and off-course it should be enabled in your mobile. It will also work in 2G/3G/4G. It will give your more accurate when you are in City area.

How its work:
It will check your current position with use of browser html5 property. Thats why it ask "Are you want to share your current location".To see your position you must give the access of your current position to the browser. After getting your position it simply plot on google map. When you change your position it recheck the position with use of GPS and update the pushpin on google map.


Initializing...

<style>
    body {font-family: Helvetica;font-size:13pt;padding:0px;margin:0px}
    #map_canvas{display:none; height:100%; width:100%; position:relative;z-index:1;}
    #current {padding:5px; background-color:#000; position:unset; left:0px;z-index:2;text-align:center;width:90%;opacity:0.4;color:#FFF;border-radius:0px 0px 5px 5px; font-weight:bold;}
    #btnCont{position:absolute; bottom:0px; left:0px; width:100%; text-align:center;z-index:2;}</style>


<div id="current">
Initializing...</div>
<div id="map_canvas" style="height: 300px; width: 800px;">
</div>
<div id="btnCont" style="display: none;">
<button onclick="startAgain();"> Restart Tracking</button>
    <button onclick="stopTracking();"> Stop Tracking</button>
</div>
<script charset="utf-8" src="//mapduck.com/js/geoPosition.js" type="text/javascript"></script>
<script src="//maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>


<script>
    var gmap = null;
    var markers = [];
    var opts = {
        enableHighAccuracy: true,
        timeout: 60000,
        maximumAge: 0
    };
            
    function initialiseMap(){
        var myOptions = {
            minZoom : 3,
            zoom: 10,
            mapTypeControl: true,
            mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
            navigationControl: true,
            navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
            mapTypeId: google.maps.MapTypeId.ROADMAP      
        } 
        gmap = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    }
      
    function initialise(){
        if(geoPosition.init())
        {
            document.getElementById('current').innerHTML="Receiving...";
            geoPosition.getCurrentPosition(showPosition,handle_errors,opts);
        }
        else
        {
            document.getElementById('current').innerHTML="Functionality not available";
        }
    }
            
    function handle_errors(error){
        var error_str='';
        switch(error.code)
        {
            case error.PERMISSION_DENIED: 
                error_str="User(you) did not share your geolocation";
                break;
 
            case error.POSITION_UNAVAILABLE: 
                error_str="Could not detect current position";
                break;
 
            case error.TIMEOUT: 
                error_str="retrieving position timed out";
                break;
 
            default: 
                error_str="unknown error";
                break;
        }
        document.getElementById('current').innerHTML=error_str;
    }
   
    function showPosition(p){
        if(gmap == null){
            document.getElementById('map_canvas').style.display = 'block';
            initialiseMap();
        }
        var latitude = parseFloat( p.coords.latitude );
        var longitude = parseFloat( p.coords.longitude );
        document.getElementById('current').innerHTML="Lat = " + latitude.toFixed(2) +" and Long = " + longitude.toFixed(2);
        var location = new google.maps.LatLng( latitude , longitude);
        gmap.setCenter(location);

        var marker = new google.maps.Marker({
            position: location,
            map: gmap,
            title:"You are here"
        });
        markers.push(marker);
    
        var infowindow = new google.maps.InfoWindow({
            content: "<strong>This is your current location.</strong>"
        });
    
        google.maps.event.addListener(marker, 'click', function() {
            infowindow.open(gmap,marker);
        });
        document.getElementById('btnCont').style.display = 'block';
    }
   
    function setAllMap(map) {
        for (var i = 0; i &lt; markers.length; i++) {
            markers[i].setMap(map);
        }
    }
    
    function deleteMarkers() {
        setAllMap(null);
        markers = [];
    }
            
    var watchID = navigator.geolocation.watchPosition(trace,handle_errors,opts);
   
    function trace(position){
        geoPosition.getCurrentPosition(position);
        deleteMarkers();
        showPosition(position);
    }
   
    function startAgain(){
        navigator.geolocation.clearWatch(watchID);
        watchID = navigator.geolocation.watchPosition(trace,handle_errors,opts);
    }   
   
    function stopTracking(){
        navigator.geolocation.clearWatch(watchID);
    }
    google.maps.event.addDomListener(window, 'load', initialise);

</script>


Tuesday 20 May 2014

Difference between WebService and API

Difference between WebService and API


S.No
Web Service
API
1
Interaction between two machines over a network. Interaction between two API.
2
Uses SOAP, REST, and XML-RPC as a means of communication. It may use any way to communication
3
Web Services involves calling of system. We can render form in one line, one by one element, element OR  decorator OR error separately.
4
Web service might not contain a complete set of specifications and sometimes might not be able to perform all the tasks that may be possible from a complete API. An API consists of a complete set of rules and specifications for a software program to follow in order to facilitate interaction.
5
All Web services are APIs All APIs are not Web services
6
A Web service always needs a network for its operation API doesn't need a network for its operation
7
WebServices are services available over internet. You can call these services and get so information in your application without know how it works. For example weather webservices gives you information about the city weather. API is a collection of class which provide you some functionality like Google api gives google-search.



Friday 16 May 2014

Zend Framework - Free Google Analytics API

Zend Framework - Free Google Analytics API

After making a successful website, we add an  google analytics code to track the activities on our website. It gives all tracking information from all geo regions on all the pages.
It help us to know daily, monthly, yearly visiter in different countries and list of pages which searched most.

But creating a report on the behalf of analytics data, is difficult stuff because it take a lot of lot of time.

Following are simplest way to get the google analytics data.
        $email = 'ADSENSE_GMAIL_USERNAME';
        $password = 'ADSENSE_GMAIL_PASSWORD';
        /** Get Connection with Analytics Account * */
        $client = Zend_Gdata_ClientLogin::getHttpClient($email, $password, Zend_Gdata_Analytics::AUTH_SERVICE_NAME);
        $service = new Zend_Gdata_Analytics($client);
        /** Get Connection with Analytics Account * */
        
        
        /** Get Analytics Account Information * */        
        $profileResults = $service->getDataFeed($service->newAccountQuery()->profiles())->current()->getExtensionElements();
        foreach($profileResults as $profileResult){
            $attributes = $profileResult->getExtensionAttributes();
            $name = $attributes['name']['value'];
            $value = $attributes['value']['value'];
            if($name=='ga:profileId'){
                $profileId = $value;
            }
            echo "$name : $value\n";
        }       
        /** Get Analytics Account Information * */
        
        
        /** Get Analytics Data */         
        $dimensions = array(
            Zend_Gdata_Analytics_DataQuery::DIMENSION_MEDIUM,
            Zend_Gdata_Analytics_DataQuery::DIMENSION_SOURCE,
            Zend_Gdata_Analytics_DataQuery::DIMENSION_BROWSER_VERSION,
            Zend_Gdata_Analytics_DataQuery::DIMENSION_MONTH,
        );

        $query = $service->newDataQuery()->setProfileId($profileId)
                ->addMetric(Zend_Gdata_Analytics_DataQuery::METRIC_BOUNCES)
                ->addMetric(Zend_Gdata_Analytics_DataQuery::METRIC_VISITS)
                ->addFilter("ga:browser==Firefox")
                ->setStartDate('2013-05-01')
                ->setEndDate('2014-05-31')
                ->addSort(Zend_Gdata_Analytics_DataQuery::METRIC_VISITS, true)
                ->addSort(Zend_Gdata_Analytics_DataQuery::METRIC_BOUNCES, false)
                ->setMaxResults(1000);
        echo "\nVisits : Bounce \n\n";
        foreach ($dimensions as $dim) {
            $query->addDimension($dim);
        }
        try{
                   $result = $service->getDataFeed($query); 
        }catch(Exception $e){
            echo $e->getMessage();die;
            
        }

        foreach ($result as $row) {
            echo $row->getMetric('ga:visits') . "\t";
            echo $row->getValue('ga:bounces') . "\n";
        }
        /** Get Analytics Data */


As an above example, you can extract all information from the Google Analytics API and stored in array or Object then can download into csv OR Excel format.




Wednesday 23 April 2014

Google Dynamic Charts - Bar Pie and Line Chart - code snippets

One image express thousand words, that's why we use images in our daily life, Personal & professional.
Reading full report is a difficult task and need hours to understand, but we get the chart of that report Its easy and need only few minutes to understand. That's why we use chart in our professional life.

Chart can have different types and each have its own quality. For Example
Pie Chart: It display percentage values as a slice of a pie.
Bar Chart: It display with rectangular bars with lengths proportional to the values that they represent. The bars can be plotted vertically OR horizontally.
line chart is a two-dimensional scatterplot of ordered observations where the observations are connected.


Google Create different types of chart on the fly. No installtion and no code download is required. Just pass all parameter and your desired chart is ready.

Its very quick. see below few examples. you will understand how Google make easy. 
Pie chart
Pie chart Example
<img alt="Pie chart Example" src="https://chart.googleapis.com/chart?chs=250x100&amp;chd=t:30,20,50&amp;cht=p3&amp;chl=Arun|Kuldeep|Ajit" title="Pie chart Example" />



Bar Chart

Bar chart Example
<img alt="Bar chart Example" src="https://chart.googleapis.com/chart?chs=320x200&amp;cht=bvs&amp;chd=t:_,30,-30,50,80,200&amp;chxt=y" title="Bar chart Example" />


Line Chart

Line chart Example
<img alt="Line chart Example" src="https://chart.googleapis.com/chart?chf=bg,s,FFFFFF00&amp;chxl=1:|16%2F04%2F2014|18%2F04%2F2014|20%2F04%2F2014|

21%2F04%2F2014|23%2F04%2F2014&amp;chxp=0,15,30|1,0,25,50,75,100&amp;chxr=0,0,30&amp;chxs=0,676767,11.5,0,t,676767|

1,6AA9E6,12,0,l,676767&amp;chxt=y,x&amp;chs=416x180&amp;cht=lc&amp;chco=6AA9E6&amp;chd=s:MWYYOOAKYKSWECEWCEEIQ1aESKIUMEEIOICECCCEEEMUYMMGQYQYKKOlWWIGECCCKGGGMMIfKGMKGGEOIGACAAtAGEEIQKMOMI

IQQIISGEECIACGAGUEUUUUcjMfOhKQYWIICGCIIGGIWjrKcjMMKCIMKCECCGIAGGUOSQrA&amp;chls=3&amp;chm=B,6AA9E664,0,0,0|h,E7E7E7,0,0.5,1,-1|h,AAAAAA,0,0,1,1|h,AAAAAA,0,1,1,1|

V,E7E7E7,0,0,1,-1|V,E7E7E7,0,42,1,-1|V,E7E7E7,0,84,1,-1|V,E7E7E7,0,126,1,-1|V,E7E7E7,0,168,1,-1
" title="Line chart Example" />





Tuesday 8 April 2014

Facebook User Profile Get Custom Picture of Facebook User

Facebook User Profile Get Custom Picture of Facebook User


Today, Every one use the Facebook for social networking whether he is Student, Working Women, House wives, IT Professional or Business man etc. Everyone open Facebook account at-least once a day.

Due to huge use of Facebook profiles.  All Web application start integrate the Facebook plugins in their websites.
They Start using plugins like Registration, Like plugin, Comment box, Login/Logout functionalists and Chat implement.

Many times, we need to show the Profile pictures of Facebook users in web page. Sometimes you have to show the custom size of profile picture. If there is requirement of showing the custom images of profile user then you are very right place. Here we are giving you lot of example of custom size.

You can show the profile pictures in unlimited sizes. Just fill the height width parameter in URL and your profile picutre is ready. to show the Profile picture you need 1 parameter only and that is UID. UID is user id and facebook users and its unique.



If we have facebook profile Id, then we can get different facebook profile images with the following URLs.
http://graph.facebook.com/[UID]/picture?type=square
https://graph.facebook.com/[UID]/picture?width=[WIDTH]&height=[HEIGHT]
Here [UID] is Facebook Profile Id and [WIDTH]/[HEIGHT] is width/height



Very Small Profile Image(50 X 50)
Very Small Profile Image(50 X 50)
https://graph.facebook.com/1438566719/picture?width=50&height=50
Profile Thumbnail Profile Thumbnail
http://graph.facebook.com/1438566719/picture?type=square
Large Profile Image (300 X 300)
Large Profile Image (300 X 300)
https://graph.facebook.com/1438566719/picture?width=300&height=300



5 Best Related Posts are Following:1. Facebook comments box for website
2. Facebook login with javascript SDK example
3. Facebook User Profile Get Custom Picture of Facebook User
4. Facebook Login with JavaScript
5. Firebase Chat with Facebook and Twitter Integration

Thursday 3 April 2014

Facebook Login with JavaScript

Follow Simple Steps to Integrate "Facebook Login" with JavasScript in your Web Application.

  • Login in https://www.facebook.com/
  • "Create a New App" in https://developers.facebook.com/
  • Fill all required Information
  • Settings => App PlateForm=>Click on "Website" then add detail
  • In "Status & Review", Click on "Yes" to activate for public


Get the "App Id" and use in Following Example
<html>
    <head>
        <title>Facebook Login Integration with JavaScript</title>
        <script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
    </head>
    <body>

        <div id="fb-root">
</div>
<script>
            window.fbAsyncInit = function() {
                FB.init({
                    appId      : 'XXXXXXXX',//your appid
                    status     : true, 
                    cookie     : true,
                    xfbml      : true,
                    oauth      : true                    
                });
                FB.Event.subscribe('auth.authResponseChange', function(response) {                    
                    // Here we specify what we do with the response anytime this event occurs. 
                    if (response.status === 'connected') {
                        saveuserdetail();
                    } else if (response.status === 'not_authorized') {
                        // In this case, the person is logged into Facebook, but not into the app, so we call                        
                        FB.login();
                    } else {
                        // In this case, the person is not logged into Facebook, so we call the login()                         
                        FB.login();
                    }
                })  
  
            };
        
            function saveuserdetail() {
                //console.log('Welcome!  Fetching your information.... ');
                FB.api('/me', function(response) {                    
                    console.log(response.toSource());
                    $.ajax({                        
                        type: "POST",
                        url: '/url_to_save_detail',
                        data: response,
                        success: function(msg){
                        console.log(msg);    
                        },
                        dataType: 'json'
                    });
                });
            }
            (function(d){
                var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
                js = d.createElement('script'); js.id = id; js.async = true;
                js.src = "//connect.facebook.net/en_US/all.js";
                d.getElementsByTagName('head')[0].appendChild(js);
            }(document));
        </script>
        <div class="fb-login-button">
Login with Facebook</div>
</body>
</html>



Facebook Login URL:
https://www.facebook.com/dialog/oauth?redirect_uri=websiteLoginURL&display=popup&response_type=code&client_id=appId&ret=login
websiteLoginURL: After login which page of your website should redirect.
appId: Application Id of facebook.com



Sunday 22 September 2013

Soap Interview Questions and Answers

Question:  Explain the SOAP?
Answer: SOAP stands for Simple Object Access Protocol. SOAP is an XML-based protocol for exchanging information between two computers over the internet. It enables you to Remote Procedure Calls (RPC) transported via HTTP.
Following are the SOAP characteristics. 
SOAP is for communication between applications
SOAP is a format for sending messages
SOAP is designed to communicate via Internet
SOAP is platform independent
SOAP is language independent
SOAP is simple and extensible


Question: Where is SOAP used?
Answer: It is used to exchanges the information between two computers over the internet. For this we used the XML in special format to send and receive the Information.


Question: Difference between XML and SOAP?
Answer: XML is language whereas SOAP is protocol. 


Question: Difference between JSON and SOAP?
Answer: JSON is standard to represent human-readable data.  SOAP is a protocol specification for transmitting information and calling web services use XML.


Question: What are the rules for using SOAP?
Answer: http://www.web-technology-experts-notes.in/2012/11/soap.html



Question: What is SOAP Envelope Element?
Answerhttp://www.web-technology-experts-notes.in/2012/11/soap.html



Question: What does SOAP Namespace defines?
Answer: The namespace defines the Envelope as a SOAP Envelope. If a different namespace is used, the application generates an error and discards the message.



Question: What is the SOAP encodings?
Answer: The envelope specified the encoding for the body.  This is a method for structuring the request that is suggested within the SOAP specification, known as the SOAP serialization. It's worth noting that one of the biggest technical complaints against SOAP is that it mixes a specification for message transport with a specification for message structure.  



Question: What does SOAP encodingStyle Attribute defines?
Answer: The encodingStyle attribute is used to define the data types used in the document(s). This attribute may appear on any SOAP element, and applies to the element's contents and all child element(s).


Question: What are the Different Transport Protocols?
Answer:  SOAP, REST,  SMTP, raw TCP Socket.



Question: What is UML?
Answer: Unified Modeling Language



Question: can we send soap messages with attachments.
Answer: Yes, We can send photos/Audio/video with soap messages as an attahcment. SOAP messages can be attached with MIME extensions that come in multipart/related. It is used to send messages using the binary data with defined rules. The SOAP message is carried in the body part with the structure that is followed by the message of the SOAP.



Question: What is the difference between SOAP and other remote access techniques?
Answer: SOAP is simple to use and it is non-symetrical whereas DCOM or CORBA is highly popular and usually have complexity in them. It also has the symmetrical nature in it. 



Question: What are the problems faced by users by using SOAP?

Answer:  There is a problem to use this protocol as firewall is a security mechanism that comes in between. This ock all the ports leaving few like HTTP port 80 and the HTTP port is used by SOAP that bypasses the firewall. It is a serious concern as it can pose difficulties for the users. There are ways like SOAP traffic can be filtered from the firewalls.

Saturday 1 June 2013

Binary Search Tree

Binary Search Tree
In computer science, a Binary Search Tree (also known as ordered or sorted binary tree) is a node-based binary data structure which has the following properties.









  • The left subtree of a node contains only nodes with keys less than the node's key.
  • The right subtree of a node contains only nodes with keys greater than the node's key.
  • The left and right subtree must each also be a binary tree.
  • There must be no duplicate nodes.


In Following case, We use Binary Search Tree
They can be used as a quick way to sort data. Insert data into a binary search tree at O(log(n)). Then traverse the tree in order to sort them.

Binary Search Tree Example in PHP
/** Create Node Class **/
class Node
{
 public $parent = null;
 public $left = null;
 public $right = null;
 public $data = null;
 
 public function __construct($data)
 {
  $this->data = $data;
 }
 
 public function __toString()
 {
  return $this->data;
 }
}

/** Create BinarySearchTree Class **/ 
class BinarySearchTree
{
 protected $_root = null;
 
 protected function _insert(&$new, &$node)
 {
  if ($node == null) {
   $node = $new;
   return;
  }
 
  if ($new->data <= $node->data) {
   if ($node->left == null) {
    $node->left = $new;
    $new->parent = $node;
   } else {
    $this->_insert($new, $node->left);
   }
  } else {
   if ($node->right == null) {
    $node->right = $new;
    $new->parent = $node;
   } else {
    $this->_insert($new, $node->right);
   }
  }  
 }
 
 protected function _search(&$target, &$node)
 {
  if ($target == $node) {
   return 1;
  } else if ($target->data > $node->data && isset($node->right)) {
   return $this->_search($target, $node->right);
  } else if ($target->data <= $node->data && isset($node->left)) {
   return $this->_search($target, $node->left);
  }
 
  return 0;
 }
 
 public function insert($node)
 {
  $this->_insert($node, $this->_root);
 }
 
 public function search($item) 
 {
  return $this->_search($item, $this->_root);
 }
}
 
/* Add Data in Nodes **/
$node1 = new Node(43);
$node2 = new Node(52);
$node3 = new Node(44);
$node4 = new Node(47);
$node5 = new Node(65);
 
/* Create Object **/
$obj = new BinarySearchTree();
 
$obj->insert($node1);
$obj->insert($node2);
$obj->insert($node3);
$obj->insert($node4);
$obj->insert($node5);

Friday 2 November 2012

Soap Interview Questions and Answers for Experienced

What is SOAP ?
It is communication protocol based on XML.


What is Full Form of SOAP?
Simple Object Access Protocol.


Why we use it?
It is used to communicate between two applications that is on different operating system and on different language.
SOAP is platform independent.
SOAP is Language Independent.
SOAP is simple and Extensive.


How to use SOAP?
SOAP is communication protocol, that use xml to communicate.
To use SOAP write your xml in some specific format and xml must contain some specific elements.


What are the elements use is SOAP message.?
It has 4 imp elements that are following..
  •  Envelope element: It contain information about this document and message.
  •  Header element: It contain information about  header.
  •  Body element: It contain Message
  •  Fault element: containing errors and status information

What are syntax for SOAP?
Following are the syntax for SOAP..
  •  Encoded using XML
  •  Use the SOAP Envelope namespace
  •  SOAP Encoding namespace
  • A SOAP message must NOT contain a DTD reference
  • A SOAP message must NOT contain XML Processing instructions


What is structure for SOAP?
    <soap:envelope soap:encodingstyle="http://www.w3.org/2001/12/soap-encoding" xmlns:soap="http://www.w3.org/2001/12/soap-envelope">
      <soap:header></soap:header>
      <soap:body>
        <soap:fault></soap:fault>
      </soap:body>
  </soap:envelope>


What is SOAP Envelope Element?
It is root element of a soap and it define about xml document. It have following attributes
encodingStyle : It may appear on any soap element.
<soap-env:envelope soap-env:encodingstyle="http://www.www.org/soap/encoding/" xmlns:soap-env="http://www.www.org/soap/envelope/">
<!-- SOAP body goes here -->
</soap-env:envelope>



What is SOAP Header Element?
SOAP Header: It contain application information (for example payment, authentication).It is optional. It have following attributes:
encodingStyle : It may appear on any soap element.
<soap:encodingStyle="http://php-tutorial-php.blogspot.in/2012/11/soap.html">
mustUnderstand: The SOAP mustUnderstand attribute can be used to indicate whether a header entry is mandatory or optional for the recipient to process. If you add mustUnderstand='1' to a child element of the Header element it indicates that the receiver processing the Header must recognize the element. If the receiver does not recognize the element it will fail when processing the Header.
<soap:mustUnderstand="0|1">
actor: It is used to address the header element to a specific endpoint.
<soap:actor="http://php-tutorial-php.blogspot.in/2012/11/soap.html"> 



What is SOAP Body Element?
SOAP Body: It contain the actual SOAP message intended for the ultimate endpoint of the message
<soap:body>
  <m:getblogresponse http:="http:" php-tutorial-php.blogspot.in="php-tutorial-php.blogspot.in" soap.html="soap.html" xmlns:m="">
    <m:blogname>php-tutorial-php.blogspot.com</m:blogname>
  </m:getblogresponse>
</soap:body>





What is SOAP Fault Element?
If a Fault element is present, it must appear as a child element of the Body element. A Fault element can only appear once in a SOAP message.  

Saturday 14 July 2012

What is OpenInviter

OpenInviter is free & let you import contacts from yahoo, gmail, rediff, MSN, AOL etc by entering the username & password. It take 5-10 min to integrate in your websites.

get contact list form


When we click on after filling detail, it show all the contacts store in your mail box. It will just return data in form of array of object( field's return Email, Name), depend of you how you display.


It provide the code to import contacts from followings website
  1. YouTube,
  2.  Evite,
  3.  Xing,
  4.  Mynet.com, 
  5. Virgilio, 
  6. Wp.pt,
  7.  IndiaTimes,
  8.  Bigstring, 
  9. Netaddress, 
  10. Inbox.com, 
  11. Web.de, 
  12. Aussiemail, 
  13. Interia, 
  14. 5Fm, 
  15. GMX.net, 
  16. Canoe, 
  17. Yandex, 
  18. Mail2World, 
  19. Freemail,
  20.  Doramail,
  21.  Plaxo, 
  22. GMail, 
  23. KataMail, 
  24. Bordermail, 
  25. Walla, 
  26. O2, 
  27. Nz11,
  28.  Inet, 
  29. India, 
  30. Apropo, 
  31. Mail.in, 
  32. Care2, 
  33. Mail.ru, 
  34. MSN, 
  35. Clevergo, 
  36. Gawab, 
  37. Lycos, 
  38. Kids, 
  39. Uk2, 
  40. Abv, 
  41. Mail.com, 
  42. Azet, 
  43. AOL, 
  44. OperaMail, 
  45. Yahoo!, 
  46. Sapo.pt, 
  47. Meta, 
  48. Pochta,
  49.  Hushmail,
  50. Terra, 
  51. Rediff,
  52.  Popstarmail,
  53.  Libero, 
  54. Rambler,
  55.  LinkedIn,
  56.  FastMail,
  57.  Zapakmail,
  58.  Live/Hotmail, 
  59. Atlas, Grafitti, 
  60. Techemail or social portals like Skyrock,
  61.  Orkut, 
  62. Xanga, 
  63. Mydogspace,
  64. Konnects,
  65.  Hyves,
  66. Fdcareer, 
  67. Mycatspace,
  68.  Last.fm, 
  69. Plazes, 
  70. Meinvz, 
  71. Eons, 
  72. Vimeo, 
  73. Friendfeed,
  74.  Flickr, 
  75. Brazencareerist, 
  76. Cyworld, 
  77. Kincafe, 
  78. Flixster, 
  79. Ning, 
  80. Livejournal, 
  81. Bookcrossing, 
  82. Facebook, 
  83. Perfspot, 
  84. Hi5, 
  85. Tagged, 
  86. Lovento, 
  87. Xuqa, 
  88. Badoo, 
  89. Koolro, 
  90. NetLog, 
  91. Mevio, 
  92. Flingr, 
  93. Famiva, 
  94. Vkontakte,
  95.  Faces, 
  96. Friendster, 
  97. Twitter, 
  98. Motortopia, 
  99. MySpace,
  100.  Plurk, 
  101. Multiply, 
  102. Bebo