Monday, 23 February 2009
Enable Disable Registry editing
'Enable/Disable Registry Editing tools
'© Doug Knox - rev 12/06/99
Option Explicit
'Declare variables
Dim WSHShell, n, MyBox, p, t, mustboot, errnum, vers
Dim enab, disab, jobfunc, itemtype
Set WSHShell = WScript.CreateObject("WScript.Shell")
p = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\"
p = p & "DisableRegistryTools"
itemtype = "REG_DWORD"
mustboot = "Log off and back on, or restart your pc to" & vbCR & "effect the changes"
enab = "ENABLED"
disab = "DISABLED"
jobfunc = "Registry Editing Tools are now "
'This section tries to read the registry key value. If not present an
'error is generated. Normal error return should be 0 if value is
'present
t = "Confirmation"
Err.Clear
On Error Resume Next
n = WSHShell.RegRead (p)
On Error Goto 0
errnum = Err.Number
if errnum <> 0 then
'Create the registry key value for DisableRegistryTools with value 0
WSHShell.RegWrite p, 0, itemtype
End If
'If the key is present, or was created, it is toggled
'Confirmations can be disabled by commenting out
'the two MyBox lines below
If n = 0 Then
n = 1
WSHShell.RegWrite p, n, itemtype
Mybox = MsgBox(jobfunc & disab & vbCR & mustboot, 4096, t)
ElseIf n = 1 then
n = 0
WSHShell.RegWrite p, n, itemtype
Mybox = MsgBox(jobfunc & enab & vbCR & mustboot, 4096, t)
End If
Distributed Transaction install XA Driver SQL Server
Install SQL Server 2005 and all required patches.
2. Select the authentication mode for this installation:
o Windows Authentication Mode
o Mixed Mode (Windows Authentication and SQL Server Authentication)
Either authentication mode allows the user who is specified as the database administrator in the wkplc_comp.properties file to log in to the SQL server. Mixed Mode authentication allows either a Windows user or a SQL server user, or both, to log in to the SQL Server.
3. In the SQL Server 2005 Setup panel, Components to Install, select the following components, which are required services for WebSphere Portal:
o SQL Server Database Services
o Integration Services
The option Integration Services, creates the directory DTS/Binn, where you will need to copy files when you install Microsoft SQL Server 2005 JDBC drivers and enable XA connections.
4. Complete the installation using SQL Server documentation as a guide.
5. Enable TCP/IP connectivity in the SQL Server Configuration Manager.
6. Install the JDBC driver using one of these methods:
o Installing DataDirect Connect for JDBC drivers on UNIX
o Installing DataDirect Connect for JDBC drivers on Windows
o Installing Microsoft SQL Server 2005 JDBC drivers and enabling XA connections
7. Network the connections for MSDTC in the Windows Component Services as described in Microsoft Help and Support.
8. Start SQL Server 2005.
Installing DataDirect Connect for JDBC drivers on UNIX
1. Purchase and download DataDirect Connect for JDBC and save file 360connectjdbc.jar in a temporary work directory.
2. To create the required files, run the following command from the directory that contains 360connectjdbc.jar:jar -xvf 360connectjdbc.jar:
3. Run ./Installer.sh in the same directory.
4. When installation is complete, change directory to /installation/lib, where installation is the directory in which you installed the DataDirect Connect for JDBC drivers.
5. Run the following command to change the permissions on the JAR files in the installation/lib directory:chmod 777 *.jar
6. Change the ownership and group of these files by running the following commands in the installation/lib directory:
7. chgrp system_grp *.jar
chown root *.jar
Where system_grp is the system group as labeled by your operating system.
Installing DataDirect Connect for JDBC drivers on Windows
1. Purchase and download DataDirect Connect for JDBC and save file 360connectjdbc.jar in a temporary work directory.
2. To create the required files, run the following command from the directory that contains 360connectjdbc.jar:jar -xvf 360connectjdbc.jar:
3. Run Installer.bat in the same directory.
Installing Microsoft SQL Server 2005 JDBC drivers and enabling XA connections
1. Download and install the Microsoft SQL Server 2005 JDBC driver.
2. Copy file sqljdbc_xa.dll from the xa subdirectory to the C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqljdbc_xa.dll directory of the SQL Server 2005 installation.
3. Start the database server.
4. Ensure that the Distributed Transaction Coordinator has been started. The status can be verified in the list of services in the Computer Management console.
5. Start the Microsoft SQL Server Management Studio and connect to the local database engine as the system administrator, sa.
6. Select File > Open > File and select xa_install.sql from the subdirectory of the downloaded and extracted JDBC driver.
7. Execute the script by selecting Query > Execute.
Note: Any warnings that appear in the messages section of the application window that say that stored procedures cannot be found can be safely ignored.
8. For Microsoft SQL Server 2005 JDBC drivers: If you are running Windows XP SP2, Windows XP 64-Bit Edition, or Windows Server 2003, refer to the Registry Entries Are Required for XA Transaction Support document for information on a new security constraint and how to set SQL Server 2005 on Windows XP SP2, Windows XP 64-Bit Edition, or Windows Server 2003.
Create a additional value in the Windows registry for WebSphere Portal by following these steps:
a. Open theWindows Registry Editor (regedit) and navigate to the element HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\XADLL
b. From the menu bar, select Edit > New > String Value to create a new parameter named sqljdbc_xa.dll in that element.
c. Change the value of the new parameter to the location of the sqljdbc_xa.dll file copied in Step 2 above, for example: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqljdbc_xa.dll
Enable XA Transactions in Windows Component Services
1. From your Windows desktop, follow these steps:
2. Click Start > Settings > Administrative Tools > Component Services.
3. Expand the tree view to locate the computer where you want to turn on support for XA transactions (for example, My Computer).
4. Display the context menu for the computer name and click Properties.
5. Click Options and tune the Transaction Timeout that suits your environment. (The recommended minimum is 180 seconds).
6. Click MSDTC and click Security Configuration.
7. Under Security Settings, select XA Transactions to enable this support.
8. Click OK to save your changes.
Note: The installation documentation for JDBC XA connectivity refers to two known problems, see the Microsoft support site for more information:
· KB899756: Windows 2003 only. MSDTC does not detect process termination, and MSDTC cannot set time-out values for XA transactions in Windows Server 2003.
Saturday, 21 February 2009
Save Object to Database Oracle BPM
eg.
1. You have database db and table mytable
2. Catalogue table ad say you name it MyTable
3. Right-click and select "Create Heir" and you name it MyTableObj
4. To use this:
Create an instance of this BMPObject type
myTable as MyTableObj = MyTableObj()
myTable.<some field> = .... to set some field value or
someVar = myTable.<some field> to read some field value
5. To save record in DB use: myTable.store()
WS-Addressing Tutorial
A good Overview by SUN
http://www.javapassion.com/webservices/wsaddressing.pdf
Friday, 20 February 2009
BPM Definations and Overview
So what definitions do you need to build an architecture?
The rules for mapping your organization into the BPM space
Criteria must be in place to translate the real organization into BPM, which includes defining the following things:
- Patterns for organizational units
- Patterns for organizational roles
- Patterns for groups
- Assignment of participants to OUs
- Assignment of participants in groups
- Assignment of organizational roles to participants and groups
The infrastructure components
The distribution of applications and services and the way they communicate is a critical part of the architecture. Actually, this is the technical architecture of the solution. Here is a basic list of applications you need to include and the type of configuration needed.
- BPM Enterprise Servers
- Type (Standalone, WebLogic)
- Configuration (Clustering, Location)
- Database configuration
- HiPer Workspace for BPM
- Configuration (Clustering, Location)
- Other modules
- Business process dependencies
- BPM Enterprise Servers
The process deployment topology
Business processes have to be inserted in the infrastructure and the organization: This is the deployment topology. The topology has a direct impact on the infrastructure and on the way people use the processes. The definitions are simple, but they need to be carefully defined based on the organization and the infrastructure.
- The mapping to the organization
- The OUs that the process will be deployed
- The mapping of process roles to organization roles
- The mapping to the infrastructure
- The enterprise server that will execute the processes
- The external resources required by the processes
- The mapping to the organization
Thursday, 19 February 2009
WS-Policy Tutorial
Name Spaces and prefix
* xmlns:wsp="http://www.w3.org/2006/07/ws-policy" – This represents the actual namespace used for elements from the WS-Policy language.
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" –
We will show some policy examples related to the WS-Addressing
language, which is why this namespace comes up here. How the referenced
WS-Addressing features actually work is covered in Chapter 18 and this particular policy assertion is further revisited at the end of Chapter 19.
* xmlns:wsrmp="http://docs.oasis-open.org/ws-rx/wsrmp/200702" –
This namespace corresponds to the WS-ReliableMessaging policy
assertion. Although WS-ReliableMessaging is not a technology covered in
this book, there are a few references to one of its policy assertions
in the examples.
* xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" –
There is a special type of schema that is referred to as a "utility
schema" in which generic and commonly used attributes are established.
One such attribute is wsu:Id, a
simple ID used to associate an identifier with an element. This and
other chapters make occasional reference to this attribute.
There are two ways of attaching policies to WSDL documents:
- The policy expression code can be embedded within the WSDL definition and then utilized via native references that can be attached directly to WSDL elements as child extensibility elements.
- Policy expressions can reside externally in a separate WS-Policy definition document, which is then referenced within the WSDL document via an external attachment mechanism.
Policy Attachment Points and Policy Subjects
Whatever part of a WSDL definition we attach a policy to is referred to as a policy attachment point. For example, we could have a policy attached to an operation element and then another to one of that operation's message elements.
Within WSDL 1.1, the following elements represent common policy attachment points:
- service element
- port element
- binding element
- portType element
- operation element
- message element
The policy attachment specification organizes these policy attachment points into the following four distinct policy subjects:
- Service (maps to service element in wsdl)
- Endpoint (maps to port, binding, portType)
- Operation (maps to Operation element in wsdl)
- Message
Note: This is work in progress more updates to follow
source:Thomas Erl- Web service Contract Design and versioning for SOA
Oracle Day 2009- IT Architects
Agenda
Tuesday, 17 February 2009
free Xpath XSLT plugin for notepad++
- Download the notepad++ binary installer
- Download the cml plugin. The zip file will contain a dll file that you need to place in plugin folder to install
restart notepad++ and in plugins menu there will be a xml tools sub-menu
cheers :)
Web Service Versioning
Service Version - This article is work in progress
There is no one versioning approach that is right for everyone. Because versioning represents a governance-related phase in the overall lifecycle of a service, it is a practice that is subject to the conventions, preferences, and requirements that are distinct to any enterprise.
Three known strategies:
Strict – Any compatible or incompatible changes result in a new version of the service contract. This approach does not support backwards or forwards compatibility.
Flexible – Any incompatible change results in a new version of the service contract and the contract is designed to support backwards compatibility but not forwards compatibility.
Loose – Any incompatible change results in a new version of the service contract and the contract is designed to support backwards compatibility and forwards compatibility
Scenarios
This paper(see link below) groups service versioning options into two categories:
- Message Versioning—Focuses on versioning the schemas used to describe messages processed by the service.
- Contract Versioning—Focuses on versioning the WSDL and contract information used to describe the service.
Message versioning
Message versioning implies XML Schema related versioning. There are several common techniques for XML versioning and extensibility techniques available:
- Namespaces
- Extension Elements
- Custom version attributes
Namespaces and Extension Elements
There are several options for versioning or extending a schema using XML Namespaces:- Use a new XML Namespace for major version releases
- Keep XML Namespace values constant and add an XML Schema version attribute
- Keep XML Namespace values constant and add a special element for grouping custom extensions
Design Principle #1:
Use targetNamespace to communicate major version releases
Rationale:
Major version releases are typically breaking changes.
Ease of implementation and support.
Judicious use of <xsd:any>
Adding <xsd:any> enable you to enter anything in that. Its good in that you could add any extra tag when required, but drawback of this is that it would not be validated with XML schema, so it could be used in short term quick changes scenario.Design Principle #2:
Judicious use of unambiguous wildcards can help minimize service versioning.
Rationale:
Extensible schemas adapt to meet changing user or service needs.
The W3C Web Services Description Working Group is developing a set of
Extensible schemas minimize versioning due to schema enhancements.
Adjuncts for WSDL 2.0. The Adjuncts will provide a set of predefined
extensions to WSDL 2.0 and will appear in Part 2 of the specification.
WSDL 2.0's predefined extensions were designed for message exchange
patterns, operation styles, and bindings. The extensions define a SOAP
Header Block that could be used to extend schemas by adding the new
data structures within the WSDL........ more on this later on
Contract Versioning
Contract Versioning implies WSDL versioning.
- Adding a new operation—Adding a new
operation to a service does not break existing consumers since they
will be unaware of the new operation's existence. Newer consumers can
then take advantage of these new operations without breaking existing
consumers. - Adding new data structures and data types—New
data structures and data types can be added as long as the old ones are
preserved. New, optional structures and data types added to the end of
messages sent to services will not break existing consumers since they
will be unaware of the new data structures. Services can also expand
the range of possible data values or types they can accept without
impacting existing consumers (assuming a doc-literal encoding style is
utilized). - Adding a new interface for an existing operation—Once
again, existing consumers will be unaware of the new interface and will
be unaffected by it. Newer consumers will have a choice of interfaces
to utilize. - Remember the First Tenet—The
first tenet of Service Orientation tells us that boundaries are
explicit. A boundary represents the border between a service's public
interface and its internal, private implementation. Service internals
can be modified, evolved, or totally rewritten as long as the contract
for that service remains unchanged. When service implementation details
leak into the service boundary this freedom is lost and the contract
becomes much more fragile. - Type restriction in response messages—Response
messages cannot, for the most part, be modified without breaking
existing consumers. Services may restrict the range of possible types
sent as a response without breaking the contract, depending on how a
given consumer has been developed. Consumers will most likely still
expect a given range of response values without realizing that the
range of possible responses has just been reduced in scope. - Use <wsa:Action>—ASMX
uses the soapAction header to perform message dispatching by default.
This enables service operation names to change without impacting
consumers because the soapAction remains constant. soapAction is only
valid over HTTP because the WSDL specification restricts its usage to
HTTP. Luckily, WS-Addressing's <wsa:Action> element can be used to communicate intent across any protocol (even HTTP). - Use a Service Broker—A
service broker serves as a front-end to the targeted service,
redirecting the request to the appropriate version of the service,
based upon the content of the request itself. Service brokers are
available as commercial products or can be specialized services
designed to serve as façades for existing systems.
Design Principle #4:
When adding new data structures, make them optional and add them to the end of service request messages.
Rationale:
Existing consumers remain unaware of the new data structures.
Design Principle #5:
Changing service response messages (other than type
restrictions) are breaking changes and will require a new version of
the service.
Rationale:
Existing consumers cannot serialize unexpected data structures.
Conclusion
Six design principles were identified to summarize best practices
for service versioning. This is not a static list and will likely grow
as the Web services specifications continue to evolve:
- Use targetNamespace to communicate major version releases.
- Judicious use of unambiguous wildcards can minimize service versioning.
- Extensions must not use the targetNamespace value.
- When adding new data structures, make them optional and add them to the end of service request messages.
- Changing
service response messages (other than type restrictions) are breaking
changes that will require a new version of the service. - Adopt a one-to-one relationship between interface versions and UDDI tModels.
http://msdn.microsoft.com/en-us/library/ms954726.aspx
Monday, 16 February 2009
Facebook test
I am just using atom feed to start off. After playing with several applications on facebook, including one from typepad, the most stable one is blog/rss import on facebook wall. I am also experimenting with "Simplaris blogcast" this adds Box on profile displaying bog contents, its automatic refresh feature has been reported to be bit flaky in past.
So conclusion stick with blog/Rss import on facebook wall :)
if you got any suggestions let me know.
Oracle Aqualogic ESB Dynamic Routing Step By Step
This was achieved using dynamic routing as described in Oracle message flow guide. In the guide two methods are specified for dynamic routing, one static xml and another one is storing routing table in database and fetching routing endpoint using XQuery.
Below is a screen shot of proxy routing.
- First routing destination is determined by inspecting the payload (using XPath).
- Using XQuery respective business service is determined from the DB
- Routing Data is deleted from payload as business service does not need this info
- Dynamic service call
Over All Flow
Step 1 and 2
- First routing destination is determined by inspecting the payload (using XPath).
- Using XQuery respective business service is determined from the DB

ER Diagram of the routing database
Step 3
- Routing Data is deleted from payload as business service does not need this info

Last Step

Wednesday, 11 February 2009
Oracle ESb Dynamic routing error
Response Document | |
| |||||||||||||||||||||||||||||||||||||||
|
If i look under the Invocation tree, Under the Message context
Message Context Changes
| added $outbound |
<con:endpoint | name="BusinessService$dynaRouting$BS$bondSearchBS" xmlns:con="http://www.bea.com/wli/sb/context"> |
<con:service/> |
<con:transport> |
<con:uri> |
http://172.16.113.231:8080/WebApp/SearchService |
con:uri> |
<con:mode>request-responsecon:mode> |
<con:qualityOfService>best-effortcon:qualityOfService> |
<con:request | xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
<tran:headers | xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports"> |
<http:Content-Type>text/xml; charset=utf-8http:Content-Type> |
tran:headers> |
<tran:encoding | xmlns:tran="http://www.bea.com/wli/sb/transports">utf-8tran:encoding> |
con:request> |
<con:response | xsi:type="http:HttpResponseMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
<tran:headers | xsi:type="http:HttpResponseHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports"> |
<tran:user-header | name="X-Powered-By" value="Servlet 2.4; JBoss-4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)/Tomcat-5.5"/> |
<http:Connection>closehttp:Connection> |
<http:Content-Type>text/xml;charset=utf-8http:Content-Type> |
<http:Date>Wed, 11 Feb 2009 15:11:47 GMThttp:Date> |
<http:Server>Apache-Coyote/1.1http:Server> |
<http:Transfer-Encoding>chunkedhttp:Transfer-Encoding> |
tran:headers> |
<tran:response-code | xmlns:tran="http://www.bea.com/wli/sb/transports">2tran:response-code> |
<tran:response-message | xmlns:tran="http://www.bea.com/wli/sb/transports">Internal Server Errortran:response-message> |
<tran:encoding | xmlns:tran="http://www.bea.com/wli/sb/transports">utf-8tran:encoding> |
<http:http-response-code>500http:http-response-code> |
con:response> |
con:transport> |
<con:security> |
<con:doOutboundWss>falsecon:doOutboundWss> |
con:security> |
con:endpoint> |
| changed $body |
<soapenv:Body | xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
<soapenv:Fault> |
<faultcode | xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPActionfaultcode> |
<faultstring>no SOAPAction header!faultstring> |
soapenv:Fault> |
soapenv:Body> |
This error was resolved by adding Transport level SoapAction header when doing dynamic routing. SoapAction was set to empty string, this resolved the error as service then looks for operation details in soap body
Monday, 9 February 2009
Bloging add-on for firefox
The link below give you step by step guide to use tags with scribefire:
http://1024strongoxen.blogspot.com/2007/03/scribefire-howto-tags-and-labels.html
Wednesday, 4 February 2009
Kerberos java 5 DES Krb5LoginModule
Kerberos login module implementation by sun is Krb5LoginModule. Krb5LoginModule in java 5 supports DES and Triple DES but infrastructure team wants AES 256. The Ciphers in JCA of java 1.5 support AES, Therefore if I want to use Kerberos Authentication in java 1.5 with AD accounts that have AES encryption i need to implement my own login module interface.
Java 5 supporting DES
Triple DES http://java.sun.com/j2se/1.5.0/docs/guide/security/jgss/jgss-tiger.html
Cipher in JAVA 5 http://java.sun.com/j2se/1.5.0/docs/guide/security/CryptoSpec.html#CipherClass
Oracle Aqua logic ESB and Alfresco document management integration
To insert a document in alfresco document management service, insure a store exists and a user has rights to it, following that follow steps below
1) Use authentication service to Authenticate and retrieve a token
2) Use the token from step 1 and pass to any subsequent web service calls, in this case create service (to store document)
Alfresco Authentication service from ESB
Insure alfresco is running, if not start alfresco using shortcut in start menu
1) Import the WSDL. The WSDL file could be found in WSDL folder example C:\Alfresco\tomcat\webapps\alfresco\wsdl
2) Create business service using the business service in step 1
3) Call the start session operation, passing the username and password.
This will result in service returning:
TICKET_d1b09a6cf0a6083e1079be6dff9a09ff1300fd95
Ticket returned in the response needs to be passed along to subsequent calls in SOAP header
Content service in alfresco
When calling write operation in create service, authentication information is required in soap header example:
SpacesStore
Content
The content passed in write operation needs to be in base64 format. There are various methods of encoding a file into base64 format. To get started one could use online services. Programmatically ESB provides function to convert text to base64 format. In POC it was converted using JAX-WS based web service.
Mime type
Correct mime type of the content needs to be passed along so that when reading browser could render the content. List of mime types could be found here
Password Text
Password text field contains the Ticket retrieved from authentication service.
Once the document has been uploaded into the repository end session operation of authentication service is called along with ticket
Copy the DLL for CIFS to work
From
C:\Alfresco\extras\bin
To
C:\WINDOWS\system32
SOA Design Principals
Service Oriented design Principals
Following are key principals that would bring interoperability, vendor diversification options, increased ROI, increased Organizational Agility and going forward reduce IT costs.
Standardized service Contracts:
Services within the same service inventory are in compliance with the same contract design standards. This increases inherent interoperability and as it brings natural compatibility between data models in service contracts and also reduces need for transformation in middleware.
Service loose coupling
: By consistently fostering reduced coupling within and between services we are working towards a state where service contracts increase independence from implementation and services are increasingly independent from each other. Increase interoperability by making individual services less dependent on each other and therefore more open to sharing data with different service consumers
Service abstraction
: Service contracts only contain essential information and information about services is limited to what is published in service contracts. The primary role of this principal is to keep the quality and detail of contract contents concise and balanced and prevent unnecessary access to additional service details. In GAT solution ESB will provide service abstraction
Service reusability
: Services contain and express agnostic logic and can be positioned as reusable enterprise resources
Service Autonomy
: Services exercise a high level of control over their underlying runtime execution environment. Services have a contract that expresses a well defined functional boundary that should not overlap with other services
Service Statelessness
: Services minimize resource consumption by deferring the management of state information when necessary
*source Thomas Erl