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-file...
/// 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

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>
}

}
 

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 -->
<HTTPMessage xmlns: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>
<HTTPHeadersItem HTTPHeadersKey="CONTENT-TYPE">
text/html; charset=UTF-8
</HTTPHeadersItem>
<HTTPHeadersItem HTTPHeadersKey="DATE">
Sat, 11 May 2019 13:00:14 GMT
</HTTPHeadersItem>
<HTTPHeadersItem HTTPHeadersKey="SERVER">
Apache
</HTTPHeadersItem>
<HTTPHeadersItem HTTPHeadersKey="StatusLine">
HTTP/1.1 200 OK
</HTTPHeadersItem>
<HTTPHeadersItem HTTPHeadersKey="TRANSFER-ENCODING">
chunked
</HTTPHeadersItem>
</HTTPHeaders>
</HTTPMessage>

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
}

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.

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>