- XOBWPB04 ;OAK/BDT - HWSC :: Environmental Check ; 06/28/2016
- ;;1.0;HwscWebServiceClient;**4**;September 13, 2010;Build 9
- ;Per VA Directive 6402, this routine should not be modified.
- ;
- ; ***** IMPORTANT NOTE *******************************************
- ; This routine requires access to the manager (%SYS) namespace and
- ; can only be run by a user with permissions to that namespace.
- ; ****************************************************************
- ;
- ; Loads "xobw4b.xml" into XOBW*1*4 transport global. Post-installation
- ; routine ^XOBWPA04 will reconstruct the file for the installation of Cache
- ; classes into VistA to support SSL. The "xobw4.xml"
- ; file must be in the PRIMARY HFS DIRECTORY prior to transport.
- ;
- ; Note: Make sure that there are no lines longer than 255 chars in the file
- ; to be loaded! It appears $$FTG is not creating overflow nodes.
- ;
- POST ;
- D SETDATA ;
- D IMPDATA ;
- Q
- GETDATA ; export data from xobw4b.xml file
- N I,X,XFILE,XPATH,XREF
- K ^TMP($J,4)
- S XFILE="xobw4b.xml"
- S XPATH=$$DEFDIR^%ZISH ;PRIMARY HFS DIRECTORY
- S XREF="^TMP("_$J_",4,1,0)"
- S X=$$FTG^%ZISH(XPATH,XFILE,XREF,3) ;Load file into global
- Q
- ;
- IMPDATA ; import data into xobw4b.xml file
- N XDIR,XOBWY,Y
- S XDIR=$$DEFDIR^%ZISH
- S XREF="^TMP("_$J_",4,1,0)"
- S Y=$$GTF^%ZISH(XREF,3,XDIR,"xobw4b.xml") ;Export ^TMP global to XML file
- K ^TMP($J,4)
- S XDIR=$$DEFDIR^%ZISH
- S XOBWY=$$IMPORT^XOBWLIB1(XDIR,"xobw4b.xml") ;Import Cache classes
- IF 'XOBWY DO
- . DO BMES^XPDUTL("Error occurred during the importing of support classes file:")
- . DO MES^XPDUTL(" Directory: "_XDIR)
- . DO MES^XPDUTL(" File Name: "_"xobw4b.xml")
- . DO MES^XPDUTL(" Error: "_$PIECE(XOBWY,"^",2))
- . DO MES^XPDUTL(" o Classes not imported.")
- ELSE DO
- . DO MES^XPDUTL(" o Support classes imported successfully.")
- . DO MES^XPDUTL(" ")
- Q
- ;
- SETDATA ;
- N I,IT
- K ^TMP($J,4)
- F I=1:1:323 S IT=$T(DATA+I) S ^TMP($J,4,I,0)=$P(IT," ;;",2,99)
- Q
- DATA ;
- ;;<?xml version="1.0" encoding="UTF-8"?>
- ;;<Export generator="Cache" version="25" zv="Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2014.1.3 (Build 775)" ts="2016-06-22 15:48:50">
- ;;<Class name="xobw.WebServer">
- ;;<Description><![CDATA[
- ;;This persistent class contains web server connection information used to connect to server hosting web services
- ;;<br>
- ;;This class is mapped to the VA FileMan WEB SERVER (#18.12) file
- ;;<br><br>
- ;;<b>Restricted Use:</b> The properties and methods of this class are for HWSC use only.
- ;; ]]></Description>
- ;;<ClassType>persistent</ClassType>
- ;;<ProcedureBlock>1</ProcedureBlock>
- ;;<SqlRowIdPrivate>1</SqlRowIdPrivate>
- ;;<SqlTableName>WebServer</SqlTableName>
- ;;<StorageStrategy>WebServerStorage</StorageStrategy>
- ;;<Super>%Persistent</Super>
- ;;<TimeChanged>64091,56835.117773</TimeChanged>
- ;;<TimeCreated>60654,21265.065878</TimeCreated>
- ;;
- ;;<UDLText name="T">
- ;;<Content><![CDATA[
- ;;// 1.0;HwscWebServiceClient;;September 13, 2010
- ;;
- ;;]]></Content>
- ;;</UDLText>
- ;;
- ;;<UDLText name="T">
- ;;<Content><![CDATA[
- ;;// HealtheVet Web Service Client v1 [Build: 1.0.1.009]
- ;;
- ;;]]></Content>
- ;;</UDLText>
- ;;
- ;;<Index name="ienIndex">
- ;;<IdKey>1</IdKey>
- ;;<PrimaryKey>1</PrimaryKey>
- ;;<Properties>ien</Properties>
- ;;<Unique>1</Unique>
- ;;</Index>
- ;;
- ;;<Property name="server">
- ;;<Type>%String</Type>
- ;;<Parameter name="TRUNCATE" value="1"/>
- ;;</Property>
- ;;
- ;;<Property name="port">
- ;;<Type>%Integer</Type>
- ;;<Collection/>
- ;;<Relationship>0</Relationship>
- ;;</Property>
- ;;
- ;;<Property name="ien">
- ;;<Type>%String</Type>
- ;;<Collection/>
- ;;<Relationship>0</Relationship>
- ;;<Parameter name="TRUNCATE" value="1"/>
- ;;</Property>
- ;;
- ;;<Property name="name">
- ;;<Type>%String</Type>
- ;;<Collection/>
- ;;<Relationship>0</Relationship>
- ;;<Parameter name="TRUNCATE" value="1"/>
- ;;</Property>
- ;;
- ;;<Property name="production">
- ;;<Type>%Boolean</Type>
- ;;<Collection/>
- ;;<Relationship>0</Relationship>
- ;;<Transient>1</Transient>
- ;;</Property>
- ;;
- ;;<UDLText name="T">
- ;;<Content><![CDATA[
- ;;// server credentials
- ;;
- ;;]]></Content>
- ;;</UDLText>
- ;;
- ;;<Property name="loginRequired">
- ;;<Type>%Boolean</Type>
- ;;<SqlFieldName>loginRequired</SqlFieldName>
- ;;</Property>
- ;;
- ;;<Property name="password">
- ;;<Type>%String</Type>
- ;;<Private>1</Private>
- ;;<SqlFieldName>password</SqlFieldName>
- ;;<Parameter name="TRUNCATE" value="1"/>
- ;;</Property>
- ;;
- ;;<Property name="userName">
- ;;<Type>%String</Type>
- ;;<SqlFieldName>userName</SqlFieldName>
- ;;<Parameter name="TRUNCATE" value="1"/>
- ;;</Property>
- ;;
- ;;<Property name="defaultTimeout">
- ;;<Type>%Integer</Type>
- ;;<InitialExpression>30</InitialExpression>
- ;;<SqlFieldName>defaultTimeout</SqlFieldName>
- ;;<Parameter name="MAXVAL" value="7200"/>
- ;;<Parameter name="MINVAL" value="5"/>
- ;;</Property>
- ;;
- ;;<Property name="sslEnabled">
- ;;<Type>%Boolean</Type>
- ;;<SqlFieldName>sslEnabled</SqlFieldName>
- ;;</Property>
- ;;
- ;;<Property name="sslConfiguration">
- ;;<Type>%String</Type>
- ;;<SqlFieldName>sslConfiguration</SqlFieldName>
- ;;<Parameter name="TRUNCATE" value="1"/>
- ;;</Property>
- ;;
- ;;<Property name="sslPort">
- ;;<Type>%String</Type>
- ;;<SqlFieldName>sslPort</SqlFieldName>
- ;;<Parameter name="TRUNCATE" value="1"/>
- ;;</Property>
- ;;
- ;;<UDLText name="T">
- ;;<Content><![CDATA[
- ;;// for ISS use ------------------------
- ;;
- ;;]]></Content>
- ;;</UDLText>
- ;;
- ;;<Property name="authorizedWebServices">
- ;;<Type>xobw.WebServicesAuthorized</Type>
- ;;<Cardinality>children</Cardinality>
- ;;<Inverse>webServerRef</Inverse>
- ;;<Relationship>1</Relationship>
- ;;</Property>
- ;;
- ;;<Property name="status">
- ;;<Type>%Boolean</Type>
- ;;<Collection/>
- ;;<Relationship>0</Relationship>
- ;;</Property>
- ;;
- ;;<Method name="getPassword">
- ;;<ReturnType>%String</ReturnType>
- ;;<Implementation><![CDATA[ quit $$DECRYP^XOBWPWD(..password)
- ;;]]></Implementation>
- ;;</Method>
- ;;
- ;;<Method name="checkWebServicesAvailability">
- ;;<FormalSpec>dots:%String</FormalSpec>
- ;;<ReturnType>%Library.ListOfDataTypes</ReturnType>
- ;;<Implementation><![CDATA[
- ;; set key = ""
- ;; set count=0
- ;; set result=##class(%ListOfDataTypes).%New()
- ;;
- ;; // if server is disabled, stop
- ;; if '..status {
- ;; do result.Insert("")
- ;; do result.Insert(" o Web server is disabled")
- ;; do result.Insert("")
- ;; quit result
- ;; }
- ;;
- ;; // loop thru web services credentials defined for server and build list output
- ;; // mainly for ListMan consumption (AVAIL^XOBWUT1)
- ;; do {
- ;; set authorizedWebService = ..authorizedWebServices.GetNext(.key)
- ;; if $get(dots) write "."
- ;; set count=count+1
- ;; if (authorizedWebService '= $$$NULLOREF) {
- ;; set webService=##class(xobw.WebServiceMetadata).%OpenId(authorizedWebService.webServiceIen)
- ;; if (authorizedWebService.status) {
- ;; if ((webService.type=1) || (webService.type=2)) {
- ;; if ##class(xobw.WebServiceMetadata).checkResourceAvailability(##this,authorizedWebService,webService,.httpStatusCode) {
- ;; do result.Insert(count_" "_webService.name_" is available")
- ;; } else {
- ;; do result.Insert(count_" Unable to retrieve '"_webService.availResource_"' for "_webService.name)
- ;; //
- ;; // the following lines will report spurious %objlasterror errors.
- ;; // supposed to be fixed in Cache 5.1+.
- ;; //
- ;; if ($data(%objlasterror)'=0) {
- ;; do $system.Status.DecomposeStatus(%objlasterror,.err)
- ;; set x=$get(err(1)," o no reason available")
- ;; set length=$length(x)
- ;; do result.Insert(" o "_$extract(x,1,70))
- ;; set x=$extract(x,71,length)
- ;; while (x'="") {
- ;; do result.Insert(" "_$extract(x,1,70))
- ;; set x=$extract(x,71,length)
- ;; } // while
- ;; // if there is a status code, show it
- ;; if $get(httpStatusCode)]"" do result.Insert(" o HTTP Response Status Code: "_httpStatusCode)
- ;; } else {
- ;; do result.Insert(" o HTTP Response Status Code: "_$get(httpStatusCode,"<no status code available>"))
- ;; } // %objlasterror
- ;; } // resource availability
- ;; } else {
- ;; do result.Insert(count_" "_webService.name_" is not a valid web service type ["_webservice.type_"]")
- ;; } // not valid type (rare and should not occur)
- ;; } else {
- ;; do result.Insert(count_" "_webService.name_" is not enabled")
- ;; } // authorizedWebService.status
- ;; } // authorizedWebService
- ;; } while (key '= "")
- ;; quit result
- ;;]]></Implementation>
- ;;</Method>
- ;;
- ;;<Method name="getWebServerId">
- ;;<ClassMethod>1</ClassMethod>
- ;;<FormalSpec>name:%String</FormalSpec>
- ;;<ReturnType>%String</ReturnType>
- ;;<Implementation><![CDATA[
- ;; if $get(name)="" {
- ;; do ##class(xobw.error.DialogError).forceError(186005_"^<empty string>")
- ;; }
- ;; quit +$order(^XOB(18.12,"B",name,0))
- ;;]]></Implementation>
- ;;</Method>
- ;;
- ;;<Method name="setUpHttpRequest">
- ;;<FormalSpec>httpRequest:%Net.HttpRequest</FormalSpec>
- ;;<Implementation><![CDATA[
- ;; if (..sslEnabled && ('$$SSLOK^XOBWENV())) {
- ;; do ##class(xobw.error.DialogError).forceError(186002_"^"_..name_" (SSL is disabled on VMS)")
- ;; }
- ;; if (..sslEnabled) {
- ;; set httpRequest.Https=1
- ;; set httpRequest.SSLConfiguration=..sslConfiguration
- ;; set httpRequest.Port=..sslPort
- ;; set httpRequest.SSLCheckServerIdentity = 0
- ;; } else {
- ;; set httpRequest.Port=..port
- ;; }
- ;; // common setting
- ;; set httpRequest.Server=..server
- ;; set httpRequest.Timeout=..defaultTimeout
- ;; quit
- ;;]]></Implementation>
- ;;</Method>
- ;;
- ;;<Method name="defaultTimeoutGet">
- ;;<ReturnType>%Integer</ReturnType>
- ;;<Implementation><![CDATA[ quit $select(i%defaultTimeout:i%defaultTimeout,1:30)
- ;;]]></Implementation>
- ;;</Method>
- ;;
- ;;<Storage name="WebServerStorage">
- ;;<Type>%CacheSQLStorage</Type>
- ;;<StreamLocation>^xobw.WebServerS</StreamLocation>
- ;;<ExtentSize>100000</ExtentSize>
- ;;<SQLMap name="MasterMap">
- ;;<Type>data</Type>
- ;;<Global>^XOB</Global>
- ;;<Subscript name="1">
- ;;<Expression>18.12</Expression>
- ;;</Subscript>
- ;;<Subscript name="2">
- ;;<Expression>{ien}</Expression>
- ;;<LoopInitValue>0</LoopInitValue>
- ;;<StopExpression>'+{L2}</StopExpression>
- ;;</Subscript>
- ;;<RowIdSpec name="1">
- ;;<Expression>{L2}</Expression>
- ;;<Field>ien</Field>
- ;;</RowIdSpec>
- ;;<Data name="defaultTimeout">
- ;;<Delimiter>"^"</Delimiter>
- ;;<Node>0</Node>
- ;;<Piece>7</Piece>
- ;;</Data>
- ;;<Data name="loginRequired">
- ;;<Delimiter>"^"</Delimiter>
- ;;<Node>1</Node>
- ;;<Piece>1</Piece>
- ;;</Data>
- ;;<Data name="name">
- ;;<Delimiter>"^"</Delimiter>
- ;;<Node>0</Node>
- ;;<Piece>1</Piece>
- ;;</Data>
- ;;<Data name="password">
- ;;<Node>300</Node>
- ;;</Data>
- ;;<Data name="port">
- ;;<Delimiter>"^"</Delimiter>
- ;;<Node>0</Node>
- ;;<Piece>3</Piece>
- ;;</Data>
- ;;<Data name="server">
- ;;<Delimiter>"^"</Delimiter>
- ;;<Node>0</Node>
- ;;<Piece>4</Piece>
- ;;</Data>
- ;;<Data name="sslConfiguration">
- ;;<Delimiter>"^"</Delimiter>
- ;;<Node>3</Node>
- ;;<Piece>2</Piece>
- ;;</Data>
- ;;<Data name="sslEnabled">
- ;;<Delimiter>"^"</Delimiter>
- ;;<Node>3</Node>
- ;;<Piece>1</Piece>
- ;;</Data>
- ;;<Data name="sslPort">
- ;;<Delimiter>"^"</Delimiter>
- ;;<Node>3</Node>
- ;;<Piece>3</Piece>
- ;;</Data>
- ;;<Data name="status">
- ;;<Delimiter>"^"</Delimiter>
- ;;<Node>0</Node>
- ;;<Piece>6</Piece>
- ;;</Data>
- ;;<Data name="userName">
- ;;<Node>200</Node>
- ;;</Data>
- ;;</SQLMap>
- ;;</Storage>
- ;;</Class>
- ;;</Export>
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXOBWPB04 12468 printed Mar 13, 2025@21:51:15 Page 2
- XOBWPB04 ;OAK/BDT - HWSC :: Environmental Check ; 06/28/2016
- +1 ;;1.0;HwscWebServiceClient;**4**;September 13, 2010;Build 9
- +2 ;Per VA Directive 6402, this routine should not be modified.
- +3 ;
- +4 ; ***** IMPORTANT NOTE *******************************************
- +5 ; This routine requires access to the manager (%SYS) namespace and
- +6 ; can only be run by a user with permissions to that namespace.
- +7 ; ****************************************************************
- +8 ;
- +9 ; Loads "xobw4b.xml" into XOBW*1*4 transport global. Post-installation
- +10 ; routine ^XOBWPA04 will reconstruct the file for the installation of Cache
- +11 ; classes into VistA to support SSL. The "xobw4.xml"
- +12 ; file must be in the PRIMARY HFS DIRECTORY prior to transport.
- +13 ;
- +14 ; Note: Make sure that there are no lines longer than 255 chars in the file
- +15 ; to be loaded! It appears $$FTG is not creating overflow nodes.
- +16 ;
- POST ;
- +1 ;
- DO SETDATA
- +2 ;
- DO IMPDATA
- +3 QUIT
- GETDATA ; export data from xobw4b.xml file
- +1 NEW I,X,XFILE,XPATH,XREF
- +2 KILL ^TMP($JOB,4)
- +3 SET XFILE="xobw4b.xml"
- +4 ;PRIMARY HFS DIRECTORY
- SET XPATH=$$DEFDIR^%ZISH
- +5 SET XREF="^TMP("_$JOB_",4,1,0)"
- +6 ;Load file into global
- SET X=$$FTG^%ZISH(XPATH,XFILE,XREF,3)
- +7 QUIT
- +8 ;
- IMPDATA ; import data into xobw4b.xml file
- +1 NEW XDIR,XOBWY,Y
- +2 SET XDIR=$$DEFDIR^%ZISH
- +3 SET XREF="^TMP("_$JOB_",4,1,0)"
- +4 ;Export ^TMP global to XML file
- SET Y=$$GTF^%ZISH(XREF,3,XDIR,"xobw4b.xml")
- +5 KILL ^TMP($JOB,4)
- +6 SET XDIR=$$DEFDIR^%ZISH
- +7 ;Import Cache classes
- SET XOBWY=$$IMPORT^XOBWLIB1(XDIR,"xobw4b.xml")
- +8 IF 'XOBWY
- Begin DoDot:1
- +9 DO BMES^XPDUTL("Error occurred during the importing of support classes file:")
- +10 DO MES^XPDUTL(" Directory: "_XDIR)
- +11 DO MES^XPDUTL(" File Name: "_"xobw4b.xml")
- +12 DO MES^XPDUTL(" Error: "_$PIECE(XOBWY,"^",2))
- +13 DO MES^XPDUTL(" o Classes not imported.")
- End DoDot:1
- +14 IF '$TEST
- Begin DoDot:1
- +15 DO MES^XPDUTL(" o Support classes imported successfully.")
- +16 DO MES^XPDUTL(" ")
- End DoDot:1
- +17 QUIT
- +18 ;
- SETDATA ;
- +1 NEW I,IT
- +2 KILL ^TMP($JOB,4)
- +3 FOR I=1:1:323
- SET IT=$TEXT(DATA+I)
- SET ^TMP($JOB,4,I,0)=$PIECE(IT," ;;",2,99)
- +4 QUIT
- DATA ;
- +1 ;;<?xml version="1.0" encoding="UTF-8"?>
- +2 ;;<Export generator="Cache" version="25" zv="Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2014.1.3 (Build 775)" ts="2016-06-22 15:48:50">
- +3 ;;<Class name="xobw.WebServer">
- +4 ;;<Description><![CDATA[
- +5 ;;This persistent class contains web server connection information used to connect to server hosting web services
- +6 ;;<br>
- +7 ;;This class is mapped to the VA FileMan WEB SERVER (#18.12) file
- +8 ;;<br><br>
- +9 ;;<b>Restricted Use:</b> The properties and methods of this class are for HWSC use only.
- +10 ;; ]]></Description>
- +11 ;;<ClassType>persistent</ClassType>
- +12 ;;<ProcedureBlock>1</ProcedureBlock>
- +13 ;;<SqlRowIdPrivate>1</SqlRowIdPrivate>
- +14 ;;<SqlTableName>WebServer</SqlTableName>
- +15 ;;<StorageStrategy>WebServerStorage</StorageStrategy>
- +16 ;;<Super>%Persistent</Super>
- +17 ;;<TimeChanged>64091,56835.117773</TimeChanged>
- +18 ;;<TimeCreated>60654,21265.065878</TimeCreated>
- +19 ;;
- +20 ;;<UDLText name="T">
- +21 ;;<Content><![CDATA[
- +22 ;;// 1.0;HwscWebServiceClient;;September 13, 2010
- +23 ;;
- +24 ;;]]></Content>
- +25 ;;</UDLText>
- +26 ;;
- +27 ;;<UDLText name="T">
- +28 ;;<Content><![CDATA[
- +29 ;;// HealtheVet Web Service Client v1 [Build: 1.0.1.009]
- +30 ;;
- +31 ;;]]></Content>
- +32 ;;</UDLText>
- +33 ;;
- +34 ;;<Index name="ienIndex">
- +35 ;;<IdKey>1</IdKey>
- +36 ;;<PrimaryKey>1</PrimaryKey>
- +37 ;;<Properties>ien</Properties>
- +38 ;;<Unique>1</Unique>
- +39 ;;</Index>
- +40 ;;
- +41 ;;<Property name="server">
- +42 ;;<Type>%String</Type>
- +43 ;;<Parameter name="TRUNCATE" value="1"/>
- +44 ;;</Property>
- +45 ;;
- +46 ;;<Property name="port">
- +47 ;;<Type>%Integer</Type>
- +48 ;;<Collection/>
- +49 ;;<Relationship>0</Relationship>
- +50 ;;</Property>
- +51 ;;
- +52 ;;<Property name="ien">
- +53 ;;<Type>%String</Type>
- +54 ;;<Collection/>
- +55 ;;<Relationship>0</Relationship>
- +56 ;;<Parameter name="TRUNCATE" value="1"/>
- +57 ;;</Property>
- +58 ;;
- +59 ;;<Property name="name">
- +60 ;;<Type>%String</Type>
- +61 ;;<Collection/>
- +62 ;;<Relationship>0</Relationship>
- +63 ;;<Parameter name="TRUNCATE" value="1"/>
- +64 ;;</Property>
- +65 ;;
- +66 ;;<Property name="production">
- +67 ;;<Type>%Boolean</Type>
- +68 ;;<Collection/>
- +69 ;;<Relationship>0</Relationship>
- +70 ;;<Transient>1</Transient>
- +71 ;;</Property>
- +72 ;;
- +73 ;;<UDLText name="T">
- +74 ;;<Content><![CDATA[
- +75 ;;// server credentials
- +76 ;;
- +77 ;;]]></Content>
- +78 ;;</UDLText>
- +79 ;;
- +80 ;;<Property name="loginRequired">
- +81 ;;<Type>%Boolean</Type>
- +82 ;;<SqlFieldName>loginRequired</SqlFieldName>
- +83 ;;</Property>
- +84 ;;
- +85 ;;<Property name="password">
- +86 ;;<Type>%String</Type>
- +87 ;;<Private>1</Private>
- +88 ;;<SqlFieldName>password</SqlFieldName>
- +89 ;;<Parameter name="TRUNCATE" value="1"/>
- +90 ;;</Property>
- +91 ;;
- +92 ;;<Property name="userName">
- +93 ;;<Type>%String</Type>
- +94 ;;<SqlFieldName>userName</SqlFieldName>
- +95 ;;<Parameter name="TRUNCATE" value="1"/>
- +96 ;;</Property>
- +97 ;;
- +98 ;;<Property name="defaultTimeout">
- +99 ;;<Type>%Integer</Type>
- +100 ;;<InitialExpression>30</InitialExpression>
- +101 ;;<SqlFieldName>defaultTimeout</SqlFieldName>
- +102 ;;<Parameter name="MAXVAL" value="7200"/>
- +103 ;;<Parameter name="MINVAL" value="5"/>
- +104 ;;</Property>
- +105 ;;
- +106 ;;<Property name="sslEnabled">
- +107 ;;<Type>%Boolean</Type>
- +108 ;;<SqlFieldName>sslEnabled</SqlFieldName>
- +109 ;;</Property>
- +110 ;;
- +111 ;;<Property name="sslConfiguration">
- +112 ;;<Type>%String</Type>
- +113 ;;<SqlFieldName>sslConfiguration</SqlFieldName>
- +114 ;;<Parameter name="TRUNCATE" value="1"/>
- +115 ;;</Property>
- +116 ;;
- +117 ;;<Property name="sslPort">
- +118 ;;<Type>%String</Type>
- +119 ;;<SqlFieldName>sslPort</SqlFieldName>
- +120 ;;<Parameter name="TRUNCATE" value="1"/>
- +121 ;;</Property>
- +122 ;;
- +123 ;;<UDLText name="T">
- +124 ;;<Content><![CDATA[
- +125 ;;// for ISS use ------------------------
- +126 ;;
- +127 ;;]]></Content>
- +128 ;;</UDLText>
- +129 ;;
- +130 ;;<Property name="authorizedWebServices">
- +131 ;;<Type>xobw.WebServicesAuthorized</Type>
- +132 ;;<Cardinality>children</Cardinality>
- +133 ;;<Inverse>webServerRef</Inverse>
- +134 ;;<Relationship>1</Relationship>
- +135 ;;</Property>
- +136 ;;
- +137 ;;<Property name="status">
- +138 ;;<Type>%Boolean</Type>
- +139 ;;<Collection/>
- +140 ;;<Relationship>0</Relationship>
- +141 ;;</Property>
- +142 ;;
- +143 ;;<Method name="getPassword">
- +144 ;;<ReturnType>%String</ReturnType>
- +145 ;;<Implementation><![CDATA[ quit $$DECRYP^XOBWPWD(..password)
- +146 ;;]]></Implementation>
- +147 ;;</Method>
- +148 ;;
- +149 ;;<Method name="checkWebServicesAvailability">
- +150 ;;<FormalSpec>dots:%String</FormalSpec>
- +151 ;;<ReturnType>%Library.ListOfDataTypes</ReturnType>
- +152 ;;<Implementation><![CDATA[
- +153 ;; set key = ""
- +154 ;; set count=0
- +155 ;; set result=##class(%ListOfDataTypes).%New()
- +156 ;;
- +157 ;; // if server is disabled, stop
- +158 ;; if '..status {
- +159 ;; do result.Insert("")
- +160 ;; do result.Insert(" o Web server is disabled")
- +161 ;; do result.Insert("")
- +162 ;; quit result
- +163 ;; }
- +164 ;;
- +165 ;; // loop thru web services credentials defined for server and build list output
- +166 ;; // mainly for ListMan consumption (AVAIL^XOBWUT1)
- +167 ;; do {
- +168 ;; set authorizedWebService = ..authorizedWebServices.GetNext(.key)
- +169 ;; if $get(dots) write "."
- +170 ;; set count=count+1
- +171 ;; if (authorizedWebService '= $$$NULLOREF) {
- +172 ;; set webService=##class(xobw.WebServiceMetadata).%OpenId(authorizedWebService.webServiceIen)
- +173 ;; if (authorizedWebService.status) {
- +174 ;; if ((webService.type=1) || (webService.type=2)) {
- +175 ;; if ##class(xobw.WebServiceMetadata).checkResourceAvailability(##this,authorizedWebService,webService,.httpStatusCode) {
- +176 ;; do result.Insert(count_" "_webService.name_" is available")
- +177 ;; } else {
- +178 ;; do result.Insert(count_" Unable to retrieve '"_webService.availResource_"' for "_webService.name)
- +179 ;; //
- +180 ;; // the following lines will report spurious %objlasterror errors.
- +181 ;; // supposed to be fixed in Cache 5.1+.
- +182 ;; //
- +183 ;; if ($data(%objlasterror)'=0) {
- +184 ;; do $system.Status.DecomposeStatus(%objlasterror,.err)
- +185 ;; set x=$get(err(1)," o no reason available")
- +186 ;; set length=$length(x)
- +187 ;; do result.Insert(" o "_$extract(x,1,70))
- +188 ;; set x=$extract(x,71,length)
- +189 ;; while (x'="") {
- +190 ;; do result.Insert(" "_$extract(x,1,70))
- +191 ;; set x=$extract(x,71,length)
- +192 ;; } // while
- +193 ;; // if there is a status code, show it
- +194 ;; if $get(httpStatusCode)]"" do result.Insert(" o HTTP Response Status Code: "_httpStatusCode)
- +195 ;; } else {
- +196 ;; do result.Insert(" o HTTP Response Status Code: "_$get(httpStatusCode,"<no status code available>"))
- +197 ;; } // %objlasterror
- +198 ;; } // resource availability
- +199 ;; } else {
- +200 ;; do result.Insert(count_" "_webService.name_" is not a valid web service type ["_webservice.type_"]")
- +201 ;; } // not valid type (rare and should not occur)
- +202 ;; } else {
- +203 ;; do result.Insert(count_" "_webService.name_" is not enabled")
- +204 ;; } // authorizedWebService.status
- +205 ;; } // authorizedWebService
- +206 ;; } while (key '= "")
- +207 ;; quit result
- +208 ;;]]></Implementation>
- +209 ;;</Method>
- +210 ;;
- +211 ;;<Method name="getWebServerId">
- +212 ;;<ClassMethod>1</ClassMethod>
- +213 ;;<FormalSpec>name:%String</FormalSpec>
- +214 ;;<ReturnType>%String</ReturnType>
- +215 ;;<Implementation><![CDATA[
- +216 ;; if $get(name)="" {
- +217 ;; do ##class(xobw.error.DialogError).forceError(186005_"^<empty string>")
- +218 ;; }
- +219 ;; quit +$order(^XOB(18.12,"B",name,0))
- +220 ;;]]></Implementation>
- +221 ;;</Method>
- +222 ;;
- +223 ;;<Method name="setUpHttpRequest">
- +224 ;;<FormalSpec>httpRequest:%Net.HttpRequest</FormalSpec>
- +225 ;;<Implementation><![CDATA[
- +226 ;; if (..sslEnabled && ('$$SSLOK^XOBWENV())) {
- +227 ;; do ##class(xobw.error.DialogError).forceError(186002_"^"_..name_" (SSL is disabled on VMS)")
- +228 ;; }
- +229 ;; if (..sslEnabled) {
- +230 ;; set httpRequest.Https=1
- +231 ;; set httpRequest.SSLConfiguration=..sslConfiguration
- +232 ;; set httpRequest.Port=..sslPort
- +233 ;; set httpRequest.SSLCheckServerIdentity = 0
- +234 ;; } else {
- +235 ;; set httpRequest.Port=..port
- +236 ;; }
- +237 ;; // common setting
- +238 ;; set httpRequest.Server=..server
- +239 ;; set httpRequest.Timeout=..defaultTimeout
- +240 ;; quit
- +241 ;;]]></Implementation>
- +242 ;;</Method>
- +243 ;;
- +244 ;;<Method name="defaultTimeoutGet">
- +245 ;;<ReturnType>%Integer</ReturnType>
- +246 ;;<Implementation><![CDATA[ quit $select(i%defaultTimeout:i%defaultTimeout,1:30)
- +247 ;;]]></Implementation>
- +248 ;;</Method>
- +249 ;;
- +250 ;;<Storage name="WebServerStorage">
- +251 ;;<Type>%CacheSQLStorage</Type>
- +252 ;;<StreamLocation>^xobw.WebServerS</StreamLocation>
- +253 ;;<ExtentSize>100000</ExtentSize>
- +254 ;;<SQLMap name="MasterMap">
- +255 ;;<Type>data</Type>
- +256 ;;<Global>^XOB</Global>
- +257 ;;<Subscript name="1">
- +258 ;;<Expression>18.12</Expression>
- +259 ;;</Subscript>
- +260 ;;<Subscript name="2">
- +261 ;;<Expression>{ien}</Expression>
- +262 ;;<LoopInitValue>0</LoopInitValue>
- +263 ;;<StopExpression>'+{L2}</StopExpression>
- +264 ;;</Subscript>
- +265 ;;<RowIdSpec name="1">
- +266 ;;<Expression>{L2}</Expression>
- +267 ;;<Field>ien</Field>
- +268 ;;</RowIdSpec>
- +269 ;;<Data name="defaultTimeout">
- +270 ;;<Delimiter>"^"</Delimiter>
- +271 ;;<Node>0</Node>
- +272 ;;<Piece>7</Piece>
- +273 ;;</Data>
- +274 ;;<Data name="loginRequired">
- +275 ;;<Delimiter>"^"</Delimiter>
- +276 ;;<Node>1</Node>
- +277 ;;<Piece>1</Piece>
- +278 ;;</Data>
- +279 ;;<Data name="name">
- +280 ;;<Delimiter>"^"</Delimiter>
- +281 ;;<Node>0</Node>
- +282 ;;<Piece>1</Piece>
- +283 ;;</Data>
- +284 ;;<Data name="password">
- +285 ;;<Node>300</Node>
- +286 ;;</Data>
- +287 ;;<Data name="port">
- +288 ;;<Delimiter>"^"</Delimiter>
- +289 ;;<Node>0</Node>
- +290 ;;<Piece>3</Piece>
- +291 ;;</Data>
- +292 ;;<Data name="server">
- +293 ;;<Delimiter>"^"</Delimiter>
- +294 ;;<Node>0</Node>
- +295 ;;<Piece>4</Piece>
- +296 ;;</Data>
- +297 ;;<Data name="sslConfiguration">
- +298 ;;<Delimiter>"^"</Delimiter>
- +299 ;;<Node>3</Node>
- +300 ;;<Piece>2</Piece>
- +301 ;;</Data>
- +302 ;;<Data name="sslEnabled">
- +303 ;;<Delimiter>"^"</Delimiter>
- +304 ;;<Node>3</Node>
- +305 ;;<Piece>1</Piece>
- +306 ;;</Data>
- +307 ;;<Data name="sslPort">
- +308 ;;<Delimiter>"^"</Delimiter>
- +309 ;;<Node>3</Node>
- +310 ;;<Piece>3</Piece>
- +311 ;;</Data>
- +312 ;;<Data name="status">
- +313 ;;<Delimiter>"^"</Delimiter>
- +314 ;;<Node>0</Node>
- +315 ;;<Piece>6</Piece>
- +316 ;;</Data>
- +317 ;;<Data name="userName">
- +318 ;;<Node>200</Node>
- +319 ;;</Data>
- +320 ;;</SQLMap>
- +321 ;;</Storage>
- +322 ;;</Class>
- +323 ;;</Export>