What and Why Is Web Services
Web Services, as known as XML Web Services, are units of application logic that provide data and services to other applications using Internet (or Intra net). Applications access Web Services via different kinds of Web protocols and data formats such as XML, with no need to worry about how Web Services are implemented. They can be implemented for any operation system that supports communication over the Internet and Intranet. They are the cornerstones of the Microsoft .NET programming model.
Web Services can be accessed by any language, using any component model, and running on any operating system. They utilize HTTP as the underlying transport, which allows function requests to pass through corporate firewalls. XML is used to format the input and output parameters of the request, so the request is not tied to any particular component technology or object calling convention. The Microsoft .NET Framework makes Web Services easy to write components that communicate using HTTP and SOAP.
Web Services are similar to the regular services in our life. For example, if you have a car that needs gasoline to run, you do not need to have your own gas pump at home. All you need to do is drive to a nearby gas station, fill up the gas tank, and you are on your way. You have received a service from the gas station, Web Services are like this as well. Now, imagine that you are going to build a web site or a Internet system for you company, you can use Web Services' "services" to get a complicated application. That should lighten your workload.
Building Web Services
Before you start to create your Web Services, there are some of concepts you have to know. The two most important things are the Simple Object Access Protocol (SOAP) and XML. SOAP is a way for applications to communicate with one another over the Internet, independent of platforms. Unlike Http-Get and Http-Post, only can send name/value, but SOAP can send various rich data type, classes, objects, and others. XML is a pared-down version of SGML, designed especially for Web documents. It allows designers to create their own customized tags, enable the definitions, transmission, validation, and interpret data between applications and between organizations. SOAP relies on XML.
Web Services relies on XML-formatted messages to send data and receive commands. Web Services support three stardard protocols, Http-Get, Http-Post, and SOAP. In Web Services , the Http protocol only can be use the simple data. We do not discuss it here. All Web Services exmaples in this artical use SOAP communication.
Now let's explore how to build a Web Service at server. There are two ways to do so. If your Web Service is quite simple, you can directly save it as a .asmx file, such as TempConvertorCsharp.asmx. In some complicated applications, especially for database related applications, I prefer to use components. For instance, The DB Query1/2-Web Service at my .NET tutorial, I created the classes as component first, then created a .asmx Web Service file that called the component (to create a component, see my .NET tutorial for details.) The whole structure of the service is "UI-Component(Web Service classes)-Database" known as 3-tier architecture.
Understanding Web Services
Interconnectedness engendered by the World Wide Web has created a pressure to create applications that are interoperable and distributable over the network. The direction of effort is towards creating applications that connect to each other regardless of the language or platform in which the application was created.
Web services are externally exposed systems that allow applications to talk to each other and share information over a network. The web service standards are built upon other standards such as HTTP or XML and are not reliant upon any proprietary systems. The Web service is itself a collection of methods that can be called from a remote location so that these methods accept and return parameters and provide for a wide variety of functionalities that can be used internally in the application that is exposed to the public.
The concept behind web services is not new. The ad hoc methods of tying applications together have merely given place to organized methods of communications between applications. Standardized specifications have also lowered costs and shortened development timelines.
Prior to the emergence of Visual Studio.NET in the market a number of technologies attempted to cater to the needs of the Web based world. Let us briefly look at the various technologies that tried to address these issues.
SOAP
Simple Object Access Protocol (SOAP) is a protocol that uses the XML to describe the data and Hyper Text Transfer Protocol (HTTP) to transmit application data. The Web Service and the client application must agree upon a common protocol to facilitate communication. SOAP is a standard communication protocol for interchanging information in a structured format in a distributed environment. Messaging is an example of information exchange between a client and a web service. The calls made by a client application to a web method and the data returned by a web method to the client are the messages that are actually exchanged. A SOAP packet is created when a web client makes a call to the web method. This message contains the name of the web method and the parameters that are needed for making a call to the web method in XML format. The Web method is invoked based on the information available in the SOAP Packet
The System.Runtime.Serialization.Formatters.Soap namespace contains the System.Runtime.Serialization.Formatters.Soap.SoapFormatter class, which can be used to serialize and de-serialize objects in the SOAP format. When building applications that uses the types in this namespace, a reference must be made to the System.Runtime.Serialization.Formatters.Soap.dll assembly. The COM+ SOAP service permits the publishing of a component as a XML Web Service. Clients can continue to access the component using previous methods, but the component is also accessible using WSDL (Web Services Description Language) and SOAP. We will see more of SOAP usage later in the lesson.
Disco and UDDI
The Web Service Discovery Tool (DISCO) is used to discover the URLs of XML Web Services located on a Web server and saves documents related to each XML service on a local disk. The DISCO takes the URL and discovers and produce publishes discovery documents (.wsdl, .xsd, .disco and .dicomap files) as arguments. Some of the options available for use with this tool are:
/d[omain]:domain Specifies the domain name to use when connecting to a proxy server that requires authentication
/nosave Does not save the discovered document or results
/nologo Suppresses the Microsoft startup banner display
/o[ut]:directoryName Specifies the output directory in which to save the discovered documents. Current directory is the default one.
/p[assword]:password Specifies the password to use when connecting to a proxy server
/proxy:url Specifies the URL of the proxy server to use for HTTP requests.
The following command is an example of how the tool can be used to search a specified URL for the discovery of documents. The documents are then saved to the current directory. It will throw an error message if it cannot find discoverable documents at the URL specified.
disco http://www.vbdotnetlearning.com/selflearningservie.disco
To specify a directory to save the documents you can use the /out option as shown below:
disco /out:VBtutorial http://www.vbdotnetlearning.com
Universal Description, Discovery and Integration (UDDI) is a platform independent framework functioning like a directory that provides a mechanism to locate and register web services on the internet. The web service provider makes the web service available to the consumer by describing the web service using a WDSL document and then registering the Web service in the UDDI Directory. The UDDI Directory contains pointers to the Web service and the WDSL document for the Web service. After this is done the Client Applications can discover the Web service using the UDDI Directory. The UDDI specification calls for three elements as given below:
(1) White Pages -- These provide business contact information
(2) Yellow Pages -- These organize Web services into categories like usage billing service, authorization service and so on.
(3) Green Pages --These Pages provide detailed technical information about individual services.
WSDL
Web Service Discovery Language (WSDL) is a markup language that describes the web service. In order to use this Web service, the Client application developers need to know the methods exposed by the Web service and the parameters to be passed to these methods. It is imperative that access to these methodologies is available at development time and it is just this need that WSDL addresses. A typical WSDL document provides the following information to the developer:
v The Web service available for a given Web site
v The purpose for which these services can be used
v The types of parameters that need to be passed to a Web service
v The format used to access these Web services
v The URL at which a Web Service can be accessed
Sunday, April 27, 2008
Thursday, April 10, 2008
"Unable to save orientation" - Capture Viewer
Problem: When trying to save the rotation on a faxed image, gives "Unable to save rotation" error.[FileNet Capture 4.1 and CE 3.0]
Solution: The error occurs because of unavailability of 'Rotation' tag on the image. Solution is to specify rotation value in DocProcessing component as 180 degree.[and then rotate the image again to 180 degree in source code incase of customize application].
Solution: The error occurs because of unavailability of 'Rotation' tag on the image. Solution is to specify rotation value in DocProcessing component as 180 degree.[and then rotate the image again to 180 degree in source code incase of customize application].
Wednesday, January 09, 2008
How to generate BarCode on physical forms ?
Query : How to generate Bar code on physical forms?
Solution : Barcode functionality on physical forms can be implemented using two types of technologies :
1).Using a barcode font (IDAutomation 3 of 9 Type) which is freely available from internet : the document was rendered in PDF from XML through Thunderhead Doc. Generation Software
2).Using Barcode4J barcode functionality integrated with Apache FOP for PDF document rendering (visit http://xmlgraphics.apache.org/fop/resources.html)
Option-1 is useful if you are rendering the physical form through thunderhead document generation software; Option-2 is preferred if you want to implement bar-code independent of thunderhead;Option-2 can be easily implemented using XSL alongwith Apache FOP open source JAVA API
Solution : Barcode functionality on physical forms can be implemented using two types of technologies :
1).Using a barcode font (IDAutomation 3 of 9 Type) which is freely available from internet : the document was rendered in PDF from XML through Thunderhead Doc. Generation Software
2).Using Barcode4J barcode functionality integrated with Apache FOP for PDF document rendering (visit http://xmlgraphics.apache.org/fop/resources.html)
Option-1 is useful if you are rendering the physical form through thunderhead document generation software; Option-2 is preferred if you want to implement bar-code independent of thunderhead;Option-2 can be easily implemented using XSL alongwith Apache FOP open source JAVA API
Wednesday, December 26, 2007
FileNet Capture 'Unable to save tiff rotaion for Faxes'
Problem: User is unable to save rotaion of Fax Images but has no problem with scanned one.
Reason: The possible reason for getting this error is because Fax image is not being in Group 4 format. So when user tries to chage and save rotation of Fax Images get this error.
Solution 1 : Check the configuration settings on Fax Gateway server.We solved this problem by changing the Incoming 'Fax Image format' from 'CCITT Group 3' to 'Group4'
Group 4 = Standard Tiff supported by FileNet Capture. User can change and save rotation for these images.
Solution 2 :If the first solution does not work then the problem is due to unavailability of 'Orientation' tag for the Tiff image. If this tag does not exists and user tries to save orientation we may get this error.
Reason: The possible reason for getting this error is because Fax image is not being in Group 4 format. So when user tries to chage and save rotation of Fax Images get this error.
Solution 1 : Check the configuration settings on Fax Gateway server.We solved this problem by changing the Incoming 'Fax Image format' from 'CCITT Group 3' to 'Group4'
Group 4 = Standard Tiff supported by FileNet Capture. User can change and save rotation for these images.
Solution 2 :If the first solution does not work then the problem is due to unavailability of 'Orientation' tag for the Tiff image. If this tag does not exists and user tries to save orientation we may get this error.
Tuesday, December 04, 2007
Send Keys Constants
VB: SendKeys Statement
Sends one or more keystrokes to the active window as if typed at the keyboard.
Syntax: SendKeys string[, wait]
The SendKeys statement syntax has these named arguments:
String expression (required) specifying the keystrokes to send
Wait (optional) Boolean value specifying the wait mode. If False (default), control is returned to the procedure immediately after the keys are sent. If True, keystrokes must be processed before control is returned to the procedure.
Remarks
To represent ABC abc 123 use "ABC abc 123" for string.
The plus sign (+), caret (^), percent sign (%), tilde (~), and parentheses ( ) are considered special characters. To specify one of these characters, enclose it within braces ({}). For example, to specify the plus sign, use {+}. Brackets ([ ]) have no special meaning to SendKeys, but you must enclose them in braces. In other applications, brackets do have a special meaning that may be significant when dynamic data exchange (DDE) occurs. To specify brace characters, use {{} and {}}.
To specify non printing keys such as ENTER or TAB, and function keys:
BACKSPACE {BACKSPACE}, {BS}, or {BKSP}
BREAK {BREAK}
CAPS LOCK {CAPSLOCK}
DEL or DELETE {DELETE} or {DEL}
DOWN ARROW {DOWN}
END {END}
ENTER {ENTER} or ~
ESC {ESC}
HELP {HELP}
HOME {HOME}
INS or INSERT {INSERT} or {INS}
LEFT ARROW {LEFT}
NUM LOCK {NUMLOCK}
PAGE DOWN {PGDN}
PAGE UP {PGUP}
PRINT SCREEN {PRTSC}
RIGHT ARROW {RIGHT}
SCROLL LOCK {SCROLLLOCK}
TAB {TAB}
UP ARROW {UP}
F1-F16 {F1}-{F16}
To specify keys combined with any combination of the SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following codes:
SHIFT = +
CTRL = ^
ALT = %
Combination Keys: To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to hold down SHIFT while E and C are pressed, use "+(ec)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+ec".
Repeating Keys: To specify repeating keys, use the form {key number}. You must put a space between key and number. For example, {LEFT 25} means press the LEFT ARROW key 25 times; {h 15} means press the H key 15 times.
Note: You can't use SendKeys to send keystrokes to an application that is not designed to run in Microsoft Windows. SendKeys also can not send the PRINT SCREEN key {PRTSC} to any application.
List Commands with SendKeys using:
UtilityProvider.ContextValue(_ValueIndex)
ListVarx
ValueIndex is a zero based index for parameter retrieval, x is a one based index for parameter retrieval.
Examples for "Move <1to5>" command where contains UP, DOWN, RIGHT, LEFT and <1to5> contains 1,2,3,4,5
UtilityProvider.ContextValue(ValueIndex) example
SendKeys "{"+UtilityProvider.ContextValue(0)+" "+UtilityProvider.ContextValue(1)+"}"
ListVarx example
SendKeys "{"+ListVar1+" "+ListVar2+"}"
Parameter Conversion and Control Blocks
Convert Parameter to Number Value: block& = val(_arg1)
Convert Number Value to text (CStr(): SendKeys "{Enter}{Up "+CStr(block&)+"}"
If Statement:
if block& = 0 then
sline = "{Shift+End}"
else
sline = "{Shift+Down "+CStr(block&)+"}{Shift+End}"
end if
While Statement
block& = val(_arg1)
loop& = block&
while ( loop& )
Sendkeys "{End}{Enter}"
loop& = loop& - 1
wend
Substring Search Syntax
for list format "Written\Spoken"
Lc% = Instr(_arg1,"\") - 1
TextVal$=MID$(_arg1,0,Lc%)
SendKeys TextVal$
Diagnostic Example: Test List
SendKeys "1. Selected value:{Enter}"
SendKeys ListVar1
SendKeys "{Enter}2. Count to divisor:{Enter}"
Lc% = InStr(ListVar1,"\")
SendKeys CStr(Lc%)
SendKeys "{Enter}3. Count to cutoff:{Enter}"
Lc% = Lc% - 1
SendKeys CStr(Lc%)
SendKeys "{Enter}4. Resulting Value:{Enter}"
TextVal$=Mid$(ListVar1,1,Lc%)
SendKeys TextVal$
SendKeys "{Enter}Command Complete.{Enter}"
Sends one or more keystrokes to the active window as if typed at the keyboard.
Syntax: SendKeys string[, wait]
The SendKeys statement syntax has these named arguments:
String expression (required) specifying the keystrokes to send
Wait (optional) Boolean value specifying the wait mode. If False (default), control is returned to the procedure immediately after the keys are sent. If True, keystrokes must be processed before control is returned to the procedure.
Remarks
To represent ABC abc 123 use "ABC abc 123" for string.
The plus sign (+), caret (^), percent sign (%), tilde (~), and parentheses ( ) are considered special characters. To specify one of these characters, enclose it within braces ({}). For example, to specify the plus sign, use {+}. Brackets ([ ]) have no special meaning to SendKeys, but you must enclose them in braces. In other applications, brackets do have a special meaning that may be significant when dynamic data exchange (DDE) occurs. To specify brace characters, use {{} and {}}.
To specify non printing keys such as ENTER or TAB, and function keys:
BACKSPACE {BACKSPACE}, {BS}, or {BKSP}
BREAK {BREAK}
CAPS LOCK {CAPSLOCK}
DEL or DELETE {DELETE} or {DEL}
DOWN ARROW {DOWN}
END {END}
ENTER {ENTER} or ~
ESC {ESC}
HELP {HELP}
HOME {HOME}
INS or INSERT {INSERT} or {INS}
LEFT ARROW {LEFT}
NUM LOCK {NUMLOCK}
PAGE DOWN {PGDN}
PAGE UP {PGUP}
PRINT SCREEN {PRTSC}
RIGHT ARROW {RIGHT}
SCROLL LOCK {SCROLLLOCK}
TAB {TAB}
UP ARROW {UP}
F1-F16 {F1}-{F16}
To specify keys combined with any combination of the SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following codes:
SHIFT = +
CTRL = ^
ALT = %
Combination Keys: To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to hold down SHIFT while E and C are pressed, use "+(ec)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+ec".
Repeating Keys: To specify repeating keys, use the form {key number}. You must put a space between key and number. For example, {LEFT 25} means press the LEFT ARROW key 25 times; {h 15} means press the H key 15 times.
Note: You can't use SendKeys to send keystrokes to an application that is not designed to run in Microsoft Windows. SendKeys also can not send the PRINT SCREEN key {PRTSC} to any application.
List Commands with SendKeys using:
UtilityProvider.ContextValue(_ValueIndex)
ListVarx
ValueIndex is a zero based index for parameter retrieval, x is a one based index for parameter retrieval.
Examples for "Move
UtilityProvider.ContextValue(ValueIndex) example
SendKeys "{"+UtilityProvider.ContextValue(0)+" "+UtilityProvider.ContextValue(1)+"}"
ListVarx example
SendKeys "{"+ListVar1+" "+ListVar2+"}"
Parameter Conversion and Control Blocks
Convert Parameter to Number Value: block& = val(_arg1)
Convert Number Value to text (CStr(): SendKeys "{Enter}{Up "+CStr(block&)+"}"
If Statement:
if block& = 0 then
sline = "{Shift+End}"
else
sline = "{Shift+Down "+CStr(block&)+"}{Shift+End}"
end if
While Statement
block& = val(_arg1)
loop& = block&
while ( loop& )
Sendkeys "{End}{Enter}"
loop& = loop& - 1
wend
Substring Search Syntax
for list format "Written\Spoken"
Lc% = Instr(_arg1,"\") - 1
TextVal$=MID$(_arg1,0,Lc%)
SendKeys TextVal$
Diagnostic Example: Test List
SendKeys "1. Selected value:{Enter}"
SendKeys ListVar1
SendKeys "{Enter}2. Count to divisor:{Enter}"
Lc% = InStr(ListVar1,"\")
SendKeys CStr(Lc%)
SendKeys "{Enter}3. Count to cutoff:{Enter}"
Lc% = Lc% - 1
SendKeys CStr(Lc%)
SendKeys "{Enter}4. Resulting Value:{Enter}"
TextVal$=Mid$(ListVar1,1,Lc%)
SendKeys TextVal$
SendKeys "{Enter}Command Complete.{Enter}"
Thursday, November 22, 2007
How to fix 'COM Makepy utility' error in Python 2.3.3?
Problem Description :
I have been using Python 2.3 for last 4-5 months without any problem. Today, I have tried installing Python 2.3.3 as well as Python 2.3 pywin32 extensions on Windows 2000 Server. But when I tried to Run 'COM Makepy utility' in PythonWin editor, I got error 'Error executing COM Makepy utility' and no dialog box appeared to allow me to create py equivalent.This is the first time I have received this error. Because of this I am unable to run my application. The same code is running on other Windows XP, 2K and 2003 server machines. I don't understand why this error has started appearing.
Solution:
Please make sure you are using build 210 of pywin32 (see sf.net/projects/pywin32).
Run pywin32-210.win32-py2.3.exe file on the affected pc.
I have been using Python 2.3 for last 4-5 months without any problem. Today, I have tried installing Python 2.3.3 as well as Python 2.3 pywin32 extensions on Windows 2000 Server. But when I tried to Run 'COM Makepy utility' in PythonWin editor, I got error 'Error executing COM Makepy utility' and no dialog box appeared to allow me to create py equivalent.This is the first time I have received this error. Because of this I am unable to run my application. The same code is running on other Windows XP, 2K and 2003 server machines. I don't understand why this error has started appearing.
Solution:
Please make sure you are using build 210 of pywin32 (see sf.net/projects/pywin32).
Run pywin32-210.win32-py2.3.exe file on the affected pc.
Tuesday, November 20, 2007
Visual Basic 6.0 error 'The memory could not be "read"'.
Problem :The instruction at "0x73d71805" referenced memory at "0x00000000". The memory could not be "read".
Click on OK to terminate the program
Click on CANCEL to debug the program
Solution:
To work around this problem, remove all blank lines that are present before any conditional compilation directives in your Visual Basic 6.0 code.
Click on OK to terminate the program
Click on CANCEL to debug the program
Solution:
To work around this problem, remove all blank lines that are present before any conditional compilation directives in your Visual Basic 6.0 code.
Thursday, September 13, 2007
How can one processmap can call another processmap using process API?
Problem description : if we create two process maps P1 (with steps: Step1, Step2 and Step3) and P2 (with Step5). There are two separate process maps and not sub-maps. Call P2 process map from Step1 of P1 using process service API. Is that possible and if yes what happens to P1 at the time of calling P2. And when P2 is completed what happens to P1 then.
Answer: There is no need to use process API for the same. One can leverage workflow Create function from the process map itself for launching P2. They will be 2 independent processes but if you want to establish a link between these 2 processes then put P1 on WaitForCondition till completion of P2.
Answer: There is no need to use process API for the same. One can leverage workflow Create function from the process map itself for launching P2. They will be 2 independent processes but if you want to establish a link between these 2 processes then put P1 on WaitForCondition till completion of P2.
Wednesday, June 06, 2007
A good link for script code
http://www.microsoft.com/technet/scriptcenter/resources/qanda/may07/hey0524.mspx
Wednesday, May 30, 2007
Write formatted text in a spreadsheet using VB 6.0
Dim xlApp As Excel.Application
Dim wb As Workbook
Dim ws As Worksheet
Dim rowNum As Integer
Set xlApp = New Excel.Application
Set wb = xlApp.Workbooks.Add()
rowNum = 2
'Specify your worksheet name
Set ws = wb.Worksheets(1)
ws.Name = "BoxCheckReport"
ws.Range(Trim("A1")).Value = "Account No" 'First header row value
ws.Range(Trim("A1")).EntireRow.Font.Bold = True
ws.Range(Trim("A1")).EntireRow.Font.Color = vbBlue
ws.Cells.EntireColumn.ColumnWidth = 25
'ws.Columns.Column(1
ws.Range(Trim("A:A")).NumberFormat = "#####################"
'Set horizontal alignment to Left
xlApp.Range("A:A").HorizontalAlignment = 2
xlApp.Range("B:B").HorizontalAlignment = 2
xlApp.Range("C:C").HorizontalAlignment = 2
xlApp.Range("D:D").HorizontalAlignment = 2
ws.Range(Trim("B1")).Value = "Entry Date" 'header row value
ws.Range(Trim("C1")).Value = "Doc Type" 'header row value
ws.Range(Trim("D1")).Value = "Doc ID" 'header row value
ws.Range(Trim("A2").Value = "1010101010"
ws.Range(Trim("B2").Value = "01/01/02"
ws.Range(Trim("C2").Value = "NAP"
ws.Range(Trim("D2").Value = "001"
wb.SaveAs "c:\ExcelReport.csv"
If Not ws Is Nothing Then
Set ws = Nothing
End If
If Not wb Is Nothing Then
wb.Close
Set wb = Nothing
End If
If Not xlApp Is Nothing Then
xlApp.Quit
Set xlApp = Nothing
End If
'After writing text in the spreadsheet just open it for User to view
ShellExecute 0, vbNullString, "c:\ExcelReport.csv", vbNullString, vbNullString, vbNormalFocus
-----------
OTHER LINKS
-----------
http://www.codeproject.com/vbscript/AssetScan.asp?df=100&forumid=188977&exp=0&select=1268478
http://www.codeguru.com/vb/gen/vb_misc/tips/article.php/c8227/
Dim wb As Workbook
Dim ws As Worksheet
Dim rowNum As Integer
Set xlApp = New Excel.Application
Set wb = xlApp.Workbooks.Add()
rowNum = 2
'Specify your worksheet name
Set ws = wb.Worksheets(1)
ws.Name = "BoxCheckReport"
ws.Range(Trim("A1")).Value = "Account No" 'First header row value
ws.Range(Trim("A1")).EntireRow.Font.Bold = True
ws.Range(Trim("A1")).EntireRow.Font.Color = vbBlue
ws.Cells.EntireColumn.ColumnWidth = 25
'ws.Columns.Column(1
ws.Range(Trim("A:A")).NumberFormat = "#####################"
'Set horizontal alignment to Left
xlApp.Range("A:A").HorizontalAlignment = 2
xlApp.Range("B:B").HorizontalAlignment = 2
xlApp.Range("C:C").HorizontalAlignment = 2
xlApp.Range("D:D").HorizontalAlignment = 2
ws.Range(Trim("B1")).Value = "Entry Date" 'header row value
ws.Range(Trim("C1")).Value = "Doc Type" 'header row value
ws.Range(Trim("D1")).Value = "Doc ID" 'header row value
ws.Range(Trim("A2").Value = "1010101010"
ws.Range(Trim("B2").Value = "01/01/02"
ws.Range(Trim("C2").Value = "NAP"
ws.Range(Trim("D2").Value = "001"
wb.SaveAs "c:\ExcelReport.csv"
If Not ws Is Nothing Then
Set ws = Nothing
End If
If Not wb Is Nothing Then
wb.Close
Set wb = Nothing
End If
If Not xlApp Is Nothing Then
xlApp.Quit
Set xlApp = Nothing
End If
'After writing text in the spreadsheet just open it for User to view
ShellExecute 0, vbNullString, "c:\ExcelReport.csv", vbNullString, vbNullString, vbNormalFocus
-----------
OTHER LINKS
-----------
http://www.codeproject.com/vbscript/AssetScan.asp?df=100&forumid=188977&exp=0&select=1268478
http://www.codeguru.com/vb/gen/vb_misc/tips/article.php/c8227/
Sunday, May 27, 2007
FileNet P8 4.0 Features
Core P8 4.0 Features:
• J2EE Content Engine on 5 platforms (Windows, AIX, Solaris, HP-UX, Red hat Linux and Suse Linux)
• Scalability improvements (farming and clustering)
• Compound document framework
• Security enhancements
• Enterprise site topology
• Distributed content caching
• CFS-IS, Annotation Support
• Multilingual AE/PE (dynamic handling of multiple languages on single engine)
• Complete .NET API for CE
• BPMN (import of visually developed business processes)
• Content Streaming API
• Process Analyzer enhancements
• Business Process Modeling Notation (BPMN)
• Enabling transition of eProcess and VW apps to BPM
• Single Sign-On Framework
• Netegrity support
• IBM Directory support
• AD Multi-Forest support
• Removing hard-coded users/groups
• Installer improvements
• Oracle 10g and 10g RAC support
• HP Itanium – Integrity Server support
P8 Platform 4.0 Security Enhancements
• Unified P8 Directory Service Provider
• Single Sign-On Framework
• Support for IBM Directory (suprise!)
• Active Directory Multi-Forest
• No AD dependency for non AD LDAP system
• No Enterprise Manager or Capture AD domain membership requirement
.NET Development in P8 4.0:
• Extending CE ability to service Microsoft .NET developers
• 4.0 includes a complete .NET API for CE
• C# representation of the CE object model
• .Net 2.0 Framework compatible
• J2EE Content Engine on 5 platforms (Windows, AIX, Solaris, HP-UX, Red hat Linux and Suse Linux)
• Scalability improvements (farming and clustering)
• Compound document framework
• Security enhancements
• Enterprise site topology
• Distributed content caching
• CFS-IS, Annotation Support
• Multilingual AE/PE (dynamic handling of multiple languages on single engine)
• Complete .NET API for CE
• BPMN (import of visually developed business processes)
• Content Streaming API
• Process Analyzer enhancements
• Business Process Modeling Notation (BPMN)
• Enabling transition of eProcess and VW apps to BPM
• Single Sign-On Framework
• Netegrity support
• IBM Directory support
• AD Multi-Forest support
• Removing hard-coded users/groups
• Installer improvements
• Oracle 10g and 10g RAC support
• HP Itanium – Integrity Server support
P8 Platform 4.0 Security Enhancements
• Unified P8 Directory Service Provider
• Single Sign-On Framework
• Support for IBM Directory (suprise!)
• Active Directory Multi-Forest
• No AD dependency for non AD LDAP system
• No Enterprise Manager or Capture AD domain membership requirement
.NET Development in P8 4.0:
• Extending CE ability to service Microsoft .NET developers
• 4.0 includes a complete .NET API for CE
• C# representation of the CE object model
• .Net 2.0 Framework compatible
Thursday, May 03, 2007
How to get a stamp on the page after being scanned?
'STAMPER' property of Scan component can be set to write a particular Text/String on the page after its been scanned. Show 'Scan' properties of a settings and goto 'Stamper' tab and configure whatever string you want to configure.
'Server batch cache is FULL!' error while committing batches using FileNet Capture 4.1
This error(Error tuple is 77,0,8)occurs if we have an application which is trying to commit number of batches using Capture. The solution is to wait for some time untill all the batches in BATCH CACHE are committed. Start using FileNet Capture 4.1 after some time. This should work fine. More information on this error can be found on FileNet site http://www.css.filenet.com/
Tuesday, April 10, 2007
Hide a folder in FileNet Capture 4.1
Following VB subroutine can be used to hide a particular node in Capture Tree View control....
[Pass the name of node to be hidden]
Public Sub HideANode(strNode As String)
Dim oRO As RepObject
Dim goRepServer As RepServer
Set goRepServer = CreateObject("FileNET.Capture.RepServer.1")
On Error GoTo ErrExit
If Not goRepServer Is Nothing Then
Set oRO = goRepServer.Sessions(0).Repository.Contents.Item(strNode)
If Not oRO Is Nothing Then oRO.Hidden = True
End If
ErrExit:
End Sub
[Pass the name of node to be hidden]
Public Sub HideANode(strNode As String)
Dim oRO As RepObject
Dim goRepServer As RepServer
Set goRepServer = CreateObject("FileNET.Capture.RepServer.1")
On Error GoTo ErrExit
If Not goRepServer Is Nothing Then
Set oRO = goRepServer.Sessions(0).Repository.Contents.Item(strNode)
If Not oRO Is Nothing Then oRO.Hidden = True
End If
ErrExit:
End Sub
Create a folder using VB code in FileNet Tree View
Select a node under which you want to create a new folder and use following code on some event....
Dim lResult As Long
Dim NewFolder As RepObject
Dim OldFolder As RepObject
Dim ParentObj As RepObject
'let the user know that we are doing something
Me.MousePointer = vbHourglass
'Validate the folder name
If txtFolderName = "" Then
'no name specified, so return error
MsgBox "Enter Folder name"
txtFolderName.SetFocus
'ElseIf InStr(1, txtFolderName.Text, "/", vbBinaryCompare) <> 0 Then
'the slash is not allowed in the name
ElseIf ValidateFolderName(txtFolderName.Text) = False Then
'MsgBox strInvalidName, , strCreateFolderTitle
txtFolderName.SetFocus
txtFolderName.SelStart = 0
txtFolderName.SelLength = Len(txtFolderName.Text)
Else
'we have a good name
On Error GoTo ErrExit:
'we need to check if the name is already used
'Find the parent
Set ParentObj = Me.FNCaptureTree1.GetSelectedItem(0)
'see if there is a duplicate below the parent
Set OldFolder = ParentObj.Contents.Item(txtFolderName.Text)
If Not OldFolder Is Nothing Then
'we have a duplicate name so return an error
MsgBox "Duplicate folder is not allowed"
Set OldFolder = Nothing
frmCreateFolder.MousePointer = vbDefault
Exit Sub
End If
'create the new folder
Set NewFolder = ParentObj.Contents.Add("Folder", txtFolderName.Text)
'save it
lResult = NewFolder.Save
'unload our form
'refresh the treeview so the new folder shows up
Me.FNCaptureTree1.SelectItem ParentObj
End If
'let the user know were done
Me.MousePointer = vbDefault
Exit Sub
ErrExit:
txtFolderName.SetFocus
txtFolderName.SelStart = 0
txtFolderName.SelLength = Len(txtFolderName.Text)
Me.MousePointer = vbDefault
Dim lResult As Long
Dim NewFolder As RepObject
Dim OldFolder As RepObject
Dim ParentObj As RepObject
'let the user know that we are doing something
Me.MousePointer = vbHourglass
'Validate the folder name
If txtFolderName = "" Then
'no name specified, so return error
MsgBox "Enter Folder name"
txtFolderName.SetFocus
'ElseIf InStr(1, txtFolderName.Text, "/", vbBinaryCompare) <> 0 Then
'the slash is not allowed in the name
ElseIf ValidateFolderName(txtFolderName.Text) = False Then
'MsgBox strInvalidName, , strCreateFolderTitle
txtFolderName.SetFocus
txtFolderName.SelStart = 0
txtFolderName.SelLength = Len(txtFolderName.Text)
Else
'we have a good name
On Error GoTo ErrExit:
'we need to check if the name is already used
'Find the parent
Set ParentObj = Me.FNCaptureTree1.GetSelectedItem(0)
'see if there is a duplicate below the parent
Set OldFolder = ParentObj.Contents.Item(txtFolderName.Text)
If Not OldFolder Is Nothing Then
'we have a duplicate name so return an error
MsgBox "Duplicate folder is not allowed"
Set OldFolder = Nothing
frmCreateFolder.MousePointer = vbDefault
Exit Sub
End If
'create the new folder
Set NewFolder = ParentObj.Contents.Add("Folder", txtFolderName.Text)
'save it
lResult = NewFolder.Save
'unload our form
'refresh the treeview so the new folder shows up
Me.FNCaptureTree1.SelectItem ParentObj
End If
'let the user know were done
Me.MousePointer = vbDefault
Exit Sub
ErrExit:
txtFolderName.SetFocus
txtFolderName.SelStart = 0
txtFolderName.SelLength = Len(txtFolderName.Text)
Me.MousePointer = vbDefault
Copy any page at any location in FileNET Capture Control
'oPageSelected - is the selected page after which you want to copy a particular page(Say Barcode separator)
If Not oPageSelected Is Nothing Then
MsgBox "Page Name is " + oPageSelected.Name
End If
Dim oBarCodeSep As RepObject
Dim oRepServer As RepServer
Set oRepServer = CreateObject("FileNET.Capture.RepServer.1")
If Not oRepServer Is Nothing Then
Set oBarCodeSep = oRepServer.ObjectFromFullName "IS1:/BarCodePage")
Dim oDstParent As RepObject
Dim oRepObj As RepObject
Dim lResult As Long
Set oDstParent = oPageSelected.Owner
oDstParent.CopyFrom oBarCodeSep
Set oRepObj = oDstParent.Contents.Item(oDstParent.Contents.Count - 1)
lResult = oPageSelected.Move(oRepObj)
If lResult = 0 Then
MsgBox oRepObj.Name & strCanNotBeMovedTo & oDst.Name
Else
End If
End If
If Not oPageSelected Is Nothing Then
MsgBox "Page Name is " + oPageSelected.Name
End If
Dim oBarCodeSep As RepObject
Dim oRepServer As RepServer
Set oRepServer = CreateObject("FileNET.Capture.RepServer.1")
If Not oRepServer Is Nothing Then
Set oBarCodeSep = oRepServer.ObjectFromFullName "IS1:/BarCodePage")
Dim oDstParent As RepObject
Dim oRepObj As RepObject
Dim lResult As Long
Set oDstParent = oPageSelected.Owner
oDstParent.CopyFrom oBarCodeSep
Set oRepObj = oDstParent.Contents.Item(oDstParent.Contents.Count - 1)
lResult = oPageSelected.Move(oRepObj)
If lResult = 0 Then
MsgBox oRepObj.Name & strCanNotBeMovedTo & oDst.Name
Else
End If
End If
Monday, April 02, 2007
How to resolve 'Can not recognize format' FileNet DocProcessing Error.
Solution:
FileNet DocProcessing throws 'Can not recognize format' error when it does not find the enough free space on root drive.To resolve this error ensure the following things:
1). There must be enough space on C:\ drive.
2). Remove all the unnecessary files including Temporary files.
3). Restart the PC and try DocProcessing coponent on a batch.
FileNet DocProcessing throws 'Can not recognize format' error when it does not find the enough free space on root drive.To resolve this error ensure the following things:
1). There must be enough space on C:\ drive.
2). Remove all the unnecessary files including Temporary files.
3). Restart the PC and try DocProcessing coponent on a batch.
Thursday, March 22, 2007
How to provide Magnifier for IDm Viewer Control?
Add the following line for your control's event to implement Magnifier functionality.
IDMViewerCtrl1.LeftButtonAction = idmActionMagnify
IDMViewerCtrl1.LeftButtonAction = idmActionMagnify
Sunday, February 04, 2007
Is FileNet CE 3.5.1 compatible with Citrix PS 4?
Problem : While trying to install FileNet Content Engine 3.5.1 client libraries on Citrix Presentation Server 4.0 it's corrupting ctxgina.dll after reboot.
Answer : As per FileNet,the installation of CE Client Libraries in any Citrix environment is not supported.
Answer : As per FileNet,the installation of CE Client Libraries in any Citrix environment is not supported.
Saturday, January 13, 2007
Configure more than 1 barcode for docprocessing.
Query: Suppose your scanned page is going to containg more than 1 barcode and the barcode information is required to be used at the time of INDEXING, use following steps to do that,
Steps:
First scan one of that kind of page and put it under Settings Collection to be used.Make sure that the page you place should be the first one in sequence under settings collection.Configure docprocessing component for it.After that configure Indexing Component. Select the field you want to configure and click 'Configure'. Select 'AutoIndex' tab. Now configure 'SelectPage', SourceGroup( Say Barcode) and then click 'Append AutoIndex String'.
Steps:
First scan one of that kind of page and put it under Settings Collection to be used.Make sure that the page you place should be the first one in sequence under settings collection.Configure docprocessing component for it.After that configure Indexing Component. Select the field you want to configure and click 'Configure'. Select 'AutoIndex' tab. Now configure 'SelectPage', SourceGroup( Say Barcode) and then click 'Append AutoIndex String'.
Subscribe to:
Posts (Atom)
