Don Rozwick · Feb 6, 2017 go to post

Thank you Eduard, I didn't find any code called for CreateBusinessService.

The production I think is a generic, not an HL7 like I usually  use. 

If I run in a terminal the code you specified for the Business Service named "Weather"  then I get no errors.  Yet I still get the error.

If I create a new Business Server with the EnsLib.SOAP.GenericService I still get the error when I call to http://127.0.0.1:57774/esb/soap/EnsLib.SOAP.GenericService/GlobalWeather.asmx

Here is my web app setup in security:

Here is the Business Service configuration from the Production class

  <Item Name="Weather" Category="" ClassName="EnsLib.SOAP.GenericService" PoolSize="0" Enabled="true" Foreground="false" Comment="" LogTraceEvents="false" Schedule="">
    <Setting Target="Host" Name="TargetConfigName">Weather BO</Setting>
    <Setting Target="Adapter" Name="AdapterURL">/GlobalWeather.asmx</Setting>
    <Setting Target="Adapter" Name="EnableStandardRequests">1</Setting>
    <Setting Target="Adapter" Name="Port"></Setting>
  </Item>
 

Don Rozwick · Feb 6, 2017 go to post

Sorry not Business Server but Business Service

I tried "?CfgItem=Weather" on the end of the calling URL (HTTP/1.1 400 Bad Request
) and on the Business Service on the URL.

If I test on a HealthShare 2016, then I get

HTTP/1.1 200 OK
Date: Mon, 06 Feb 2017 20:37:38 GMT
Server: Apache
CACHE-CONTROL: private, max-age=0
VARY: Accept-Encoding
X-ASPNET-VERSION: 4.0.30319
X-POWERED-BY: ASP.NET
SET-COOKIE: CSPSESSIONID=00010000000036So99K9SK000000000000000000000000000000000000; path=/;
CONTENT-ENCODING: gzip
CONTENT-LENGTH: 231
Keep-Alive: timeout=120
Connection: Keep-Alive
Content-Type: text/xml; charset=utf-8

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetWeatherResponse xmlns="http://www.webserviceX.NET"><GetWeatherResult>Data Not Found</GetWeatherResult></GetWeatherResponse></soap:Body></soap:Envelope>

And I thought I configured the settings the same as 2014.1.5, so I don't know what is going on.

Don Rozwick · May 29, 2018 go to post

What would you think to use on 2014.1.5?  I see the activity monitor doesn't come in until 2016.1

Don Rozwick · May 13, 2019 go to post

So from a network capture if I use out of the box operation EnsLib.http.operation the URL is correct

So now I am wondering if I need to get my proxy setup.

Here is the response from the trace:

<?xml version="1.0" ?>
<!-- type: EnsLib.HTTP.GenericMessage id: 55 -->
<HTTPMessagexmlns:s="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Stream>
<![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><title>Wireless Messaging</title> <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1" /> <link href='/message/stylesheets/OpenSans.css' rel='stylesheet' type='text/css'> <link href="/message/stylesheets/spok_1.css" rel="stylesheet" type="text/css" /> <script language=JavaScript> <!-- function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } //--> </script> </head> <body leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"> <table width=750 border=0 align="center" cellPadding=0 cellSpacing=0> <tbody> <tr> <td align="center" class=text-12>&nbsp;</td> </tr> <tr> <td align="center" class=text-12> Your page has been sent to <span class="TDBOLD"> Cannot process that request. Try Again. @page.metrocall.com</span>. <p>&nbsp;</p> <span class="TDBOLD"><a href="#" onclick="window.open('','_self',''); window.top.close();">Close [X]</a></span><br><br> <span class="TDBOLD"><a href="#" onclick="document.location.href='/message/index.html';">Send Another Page</a></span><br><br> <p class="TDBOLD">Thank you for using Spok.</p></td> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td> <p align=center><a href="javascript:history.go(-1)">Back</a></p></td> </tr> </tbody> </table> </body> </html> ]]>

</Stream>

<Type>
BG

</Type>

<HTTPHeaders>
<HTTPHeadersItemHTTPHeadersKey="CONTENT-TYPE">
text/html; charset=UTF-8

</HTTPHeadersItem>

<HTTPHeadersItemHTTPHeadersKey="DATE">
Sat, 11 May 2019 13:00:14 GMT

</HTTPHeadersItem>

<HTTPHeadersItemHTTPHeadersKey="SERVER">
Apache

</HTTPHeadersItem>

<HTTPHeadersItemHTTPHeadersKey="StatusLine">
HTTP/1.1 200 OK

</HTTPHeadersItem>

<HTTPHeadersItemHTTPHeadersKey="TRANSFER-ENCODING">
chunked

</HTTPHeadersItem>

</HTTPHeaders>

</HTTPMessage>

Don Rozwick · May 13, 2019 go to post

Compiling class User.NewClass21
ERROR #5373: Class 'Ens.StreamResponse', used by 'User.NewClass21:OnD03Alert:FormalSpec', does not exist
  > ERROR #5030: An error occurred while compiling class 'User.NewClass21'
Dropping orphaned procedure: SQLUSER.NEWCLASS21_ENUMERATESETTINGS
Detected 1 errors during compilation in 0.657s.

I am using HealthShare Health Connect 2018.1

Also here is the User.Alert

Class User.Alert Extends Ens.Request
{
/// Analyst Pager number
Property PIN As %String;
/// Alert Message
Property MSSG As %String;
Storage Default
{
<Data name="AlertDefaultData">
<Subscript>"Alert"</Subscript>
<Value name="1">
<Value>PIN</Value>
</Value>
<Value name="2">
<Value>MSSG</Value>
</Value>
</Data>
<DefaultData>AlertDefaultData</DefaultData>
<Type>%Library.CacheStorage</Type>
}
}
 

Don Rozwick · Oct 3, 2019 go to post

Thank You!!!

Here is what seems to work right now:

Class FCH.HL7.Operation.FileOperation Extends (Ens.BusinessOperation, EnsLib.HL7.Operation.FileOperation) [ Language = cache ]
{/// From https://community.intersystems.com/post/pointers-creating-operation-fil…
/// Nigel Salm, Michel Bruyère, Jeffrey Drumm
Parameter ADAPTER = "EnsLib.File.OutboundAdapter";Property Adapter As EnsLib.File.OutboundAdapter;Parameter INVOCATION = "Queue";Method WriteMessage(pRequest As EnsLib.HL7.Message, Output pResponse As EnsLib.HL7.Message) As %Status
{
// Initialise your return status variable and a variable called file
// I use $ZTRAP to trap code errors though TRY/CATCH would be the more modern approach
set tSC=$$$OK,$ZTRAP="Error",file=""
// Create your file name and append to the Adapter Attribute 'FilePath'
// if working with UNIX change the next line of code accordingly
//if $e(..Adapter.FilePath,*)'="\" set ..Adapter.FilePath=..Adapter.FilePath_"\"
if $e(..Adapter.FilePath,*)'="/" set ..Adapter.FilePath=..Adapter.FilePath_"/"
set file=..Adapter.FilePath_"ZLOG_FILE_"_$REPLACE($PIECE(pRequest.GetValueAt("MSH:MessageType"),pRequest.CS,1,2),pRequest.CS,"")_$tr($zdt($h,3),"-: ","")_".txt" if 'tSC quit tSC
$$$LOGINFO("The File Name is="_file)
// You can use the appropriate method in the File Outbound Adapter though I have used the OPEN
// command
open file:("WNS"):0
else  
set tSC=$system.Status.Error(5001,"Cannot create File: "_file) goto End
// Invoke the outputDocument method inherited from the class 'EnsLib.HL7.Operation.FileOperation'
set tSC=..outputDocument(file,pRequest) if 'tSC goto End
End ;
// Close the file if it exists
if file'="" close file
set pResponse=##class(EnsLib.HL7.Message).%New()
// Populate the response HL7 message as you see fit. Either send back an HL7 ACK or NACK would be
// the most appropriate
quit tSC
Error ;
set $ztrap="",tSC=$system.Status.Error($$$GeneralError,"Code Error: "_$ze) goto End
}XData MessageMap
{
<MapItems>
                 <MapItem MessageType="EnsLib.HL7.Message">
                        <Method>WriteMessage</Method>
                </MapItem>
        </MapItems>
}}

result of sending an ORM

ERROR #5001: Cannot create File: /message_archive/inbound_messages/ZLOG_FILE_ORMO0120191003113432.txt
 

Now to work on that error and get the messages in one file.  BUT THANKS

Don Rozwick · Mar 20, 2017 go to post

Method OnResponse1(process As Ens.BusinessProcess, context As Ens.BP.Context, request As EnsLib.REST.GenericMessage, response As EnsLib.REST.GenericMessage, callrequest As FCH.Request.PatientLookupRequest, callresponse As FCH.Response.PatientLookupResponse, callname As %String) As %Status [ Language = cache, PublicList = (process, context) ]
{
 Set $ZT="Trap",status=$$$OK do {
 Set status=context.ReturnedIds.SetAt(callresponse.PatientLookupResult.Patients.IDs.ID,1)
 If $$$ISERR(status) Quit
 while (0)
Exit Quit status
Trap Set $ZT="",status=##class(Ens.Util.Error).EnsSystemError("FCH.BPL.PATWISJSONEPICXML.Thread1","OnResponse1")
 Goto Exit
}

Don Rozwick · Mar 21, 2017 go to post

That worked

<response type='FCH.Response.PatientLookupResponse>
<assign property="context.ReturnedIdsvalue="callresponse.PatientLookupResult.Patients.GetAt(1).IDs.GetAt(1).IDaction="set" key="1/>
</response>
 

Now I have to work on the response with multiple Patients.

Don Rozwick · Mar 22, 2017 go to post

Here is the SQL search that works:

SELECT SUBSTRING(StreamGC,1)
FROM EnsLib_HTTP.GenericMessage
WHERE SUBSTRING(StreamGC,1)['token'

Don Rozwick · Jan 20, 2021 go to post

If you extended the class make sure that you change the settings on the Business Service to the new class.  Also remember to select the new class when doing the search.  Both I have forgotten many times.

Don Rozwick · Dec 20, 2021 go to post

how do you use the Unescape in a Transformation?

Would a <code> section work?

How do you pass the source and return something useful to use in the transform?

I got a note comment that has escape sequence in it.

Thank you