Visit Map

Wednesday, November 05, 2008

XMLHTTPRequest Object accessing web service

Hi
I just browing thorugh the xmlhttpobject and trying to call web service.I am posting the code the here. It calls the holiday web service GetHolidaysAvailable method which calls the method Synchronously.
The following is code


function GetSynchronousJSONResponse() {
var xmlhttp = null;
if (window.XMLHttpRequest)
xmlhttp = new XMLHttpRequest();
else if (window.ActiveXObject) {
if (new ActiveXObject("Microsoft.XMLHTTP"))
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
else
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
// to be ensure non-cached version of response
//url = url + "?rnd=" + Math.random();
url="http://www.holidaywebservice.com/Holidays/US/USHolidayService.asmx/GetHolidaysAvailable";
// xmlhttp.setRequestHeader("SOAPAction", "http://www.holidaywebservice.com/Holidays/US/USHolidayService.asmx/GetHolidaysAvailable");
xmlhttp.open("POST", url, false);//false means synchronous




//xmlhttp.setRequestHeader("Content-Type", "application/json; charset=utf-8");
xmlhttp.send();
//xmlhttp.send("action="+"null");
var responseText = xmlhttp.responseText;
alert(responseText);
return responseText;
}

This is one of learnings with XMLHTTPRequest object. Hope you find it useful

Saturday, September 06, 2008

Dell studio 1535 and Yahoo messager problem

I experienced problem with yahoo messenger and Dell studio 1535. When you install yahoo IM all your sound drivers will be jamed. If you face this problem,uninstall the version you have have then you need to install Yahoo messenger 9.0 Beta. Then your sound drivers will work.

Friday, December 28, 2007

Current configuration contains errors that are not corrected by the requested operation Error

When running IBM rational product or Websphere inupdates you may get the following error

Current configuration contains errors that are not corrected by the requested operation and more errors would be introduced

You can solve this problem by using procedure

I came across this error i solved this way

Go to the directory where your product is installed
updater\eclipse\rpu.exe -init -nosplash
type: updater\eclipse\rpu.exe # then proceed as usual.
This is given in IBM site

rpu is rational product updater


Friday, November 09, 2007

Documentum 6 new features

Hi,
I have been working on documentum for quite a long time. I have worked on documentum 5.3. Which used web services. Now Documentum 6.0 has support for SOA.
The following are features.
retrieving, updating, and deleting repository objects. Copy and move operations are also available.
Version Control Service: provides operations such as checkin and checkout that concern object versions.
Query Service: provides operations for obtaining data from repositories using ad-hoc queries.
Schema Service: provides operations for examining repository metadata (data dictionary).
Search Service: provides operations concerning full-text and property-based repository searches.
Workflow Service: provides operations that obtain data about workflow process templates and an operation for starting a workflow process instance.

This article is by pawan kumar which came in CMS Wire.
It can found at http://www.cmswire.com/cms/enterprise-cms/documentum-6-d6-and-your-services-oriented-architecture-soa-001846.php

Monday, August 20, 2007

Abstract Factory Applicable Scenarios and

Abstract Factory Applicable Scenarios
The system needs to be independent of how its objects are created,composed, and represented.The system needs to be configured with one of a multiple family of objectsThe family of related objects is intended to be used together and thisconstraint needs to be enforced.You want to provide a library of objects that does not show implementationsand only reveals interfaces
J2EE Technology Features and J2SE API Association
Data Access Object (Sun)Value Object Assembler (Sun)Builder Applicable senarios
The algorithm for creating a complex object needs to be independent of thecomponents that compose the object and how they are assembled. The construction process is to allow different representations of theconstructed object.
javax.ejb.EJBHome javax.ejb.EJBLocalHome javax.jms.QueueConnectionFactory javax.jms.TopicConnectionFactory
CompositeThe following scenarios are most appropriate for theComposite pattern:¦ You want to represent a full or partial hierarchy of objects.¦ You want clients to be able to ignore the differences between the varyingobjects in the hierarchy.¦ The structure is dynamic and can have any level of complexity: for example,using the Composite view from the J2EE Patterns Catalog, which is usefulfor portal applications.
Decorator Applicable Scenarios
You want to transparently and dynamically add responsibilities to objectswithout affecting other objects.¦ You want to add responsibilities to an object that you may want to change inthe future.¦ Extending functionality by subclassing is no longer practical

Tuesday, July 10, 2007

Nice article on entity framework.

Nice article on entity framework.

What is entity framework

Teams build software, not developers. Different members of a team think of data differently. For example:
Developers think in class diagrams
Analysts think in OR diagrams
DBAs think in ER diagrams

Is There a Solution?
At the core of the Entity Framework is an Entity Data Model (EDM). The EDM is meant to be the common grammar in which different fiefdoms. The EDM defines a language for describing data without having to describe the storage of that data. On top of the EDM is a set of services that work to enable manipulation of the data in beneficial ways throughout an organization

This is a nice article on server side.com.Follow the link.

http://www.theserverside.net/tt/articles/showarticle.tss?id=IntroducingEntityFramework

Saturday, June 30, 2007

Adapter Variations

//: adapter:AdapterVariations.java
// Variations on the Adapter pattern.
package adapter;
import junit.framework.*;

class WhatIHave {
public void g() {}
public void h() {}
}

interface WhatIWant {
void f();
}

class SurrogateAdapter implements WhatIWant {
WhatIHave whatIHave;
public SurrogateAdapter(WhatIHave wih) {
whatIHave = wih;
}
public void f() {
// Implement behavior using
// methods in WhatIHave:
whatIHave.g();
whatIHave.h();
}
}

class WhatIUse {
public void op(WhatIWant wiw) {
wiw.f();
}
}

// Approach 2: build adapter use into op():
class WhatIUse2 extends WhatIUse {
public void op(WhatIHave wih) {
new SurrogateAdapter(wih).f();
}
}

// Approach 3: build adapter into WhatIHave:
class WhatIHave2 extends WhatIHave
implements WhatIWant {
public void f() {
g();
h();
}
}

// Approach 4: use an inner class:
class WhatIHave3 extends WhatIHave {
private class InnerAdapter implements WhatIWant{
public void f() {
g();
h();
}
}
public WhatIWant whatIWant() {
return new InnerAdapter();
}
}

public class AdapterVariations extends TestCase {
WhatIUse whatIUse = new WhatIUse();
WhatIHave whatIHave = new WhatIHave();
WhatIWant adapt= new SurrogateAdapter(whatIHave);
WhatIUse2 whatIUse2 = new WhatIUse2();
WhatIHave2 whatIHave2 = new WhatIHave2();
WhatIHave3 whatIHave3 = new WhatIHave3();
public void test() {
whatIUse.op(adapt);
// Approach 2:
whatIUse2.op(whatIHave);
// Approach 3:
whatIUse.op(whatIHave2);
// Approach 4:
whatIUse.op(whatIHave3.whatIWant());
}
public static void main(String args[]) {
junit.textui.TestRunner.run(AdapterVariations.class);
}
} ///:~