I would like to increase the MaxBufferSize, MaxBufferPoolSize, ReceivedMessageSize, along with the readerQuotas maxDepth="2147483646" maxStringContentLength="2147483646" maxArrayLength="2147483646" maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646", It is my understanding that I must change these parameters in the registration process. But I see no examples anywhere on doing this.
I would appreciate any help on this matter.
Don't know if you found an answer to this or not but it would look something like this:
builder.Register(
container =>
new ChannelFactory<TService>(
new WSHttpBinding { TransactionFlow = supportTransactionFlow,
MaxReceivedMessageSize = 2147483646,
ReaderQuotas = {
MaxStringContentLength = 2147483646,
MaxDepth = 2147483646,
MaxArrayLength= 2147483646 }},
endpointAddress)).InstancePerDependency();
Related
I'm trying to create new vector layer with the same fields as contained in original layer.
original_layer_fields_list = original_layer.fields().toList()
new_layer = QgsVectorLayer("Point", "new_layer", "memory")
pr = new_layer.dataProvider()
However, when I try:
for fld in original_layer_fields_list:
type_name = fld.typeName()
pr.addAttributes([QgsField(name = fld.name(), typeName = type_name)])
new_layer.updateFields()
QgsProject.instance().addMapLayer(new_layer)
I get a layer with no fields in attribute table.
If I try something like:
for fld in original_layer_fields_list:
if fld.type() == 2:
pr.addAttributes([QgsField(name = fld.name(), type = QVariant.Int)])
new_layer.updateFields()
QgsProject.instance().addMapLayer(new_layer)
... it works like charm.
Anyway ... I'd rather like the first solution to work in case if one wants to automate the process and not check for every field type and then find an appropriate code. Besides - I really am not able to find any documentation about codes for data types. I managed to find this post https://gis.stackexchange.com/questions/353975/get-only-fields-with-datatype-int-in-pyqgis where in comments Kadir pointed on this sourcecode (https://codebrowser.dev/qt5/qtbase/src/corelib/kernel/qvariant.h.html#QVariant::Type).
I'd really be thankful for any kind of direction.
new to Mirth, not new to engines... finding it a bit challenging to do a basic source to destination HL7v2 transformation.
I've set up my Channel to read from a file as the source, and spit out the destination to a file as well. My output template is ${message.encodedData}. The channel seems to be reading the source correctly, and generating an output. But what I'm struggling with is how cumbersome this is.
I'm playing with an HL7 SIU message, my source has a lot more fields than the destination wants to receive, just need a simple way to map the few fields that are required.
I inserted the source system message template into the Destination Transformer Inbound Message Templates, then I'm doing the following which seems to work:
//MSH Segment
if (msg['MSH'][0]){
var MSH1 = msg['MSH']['MSH.1'];
var MSH2 = msg['MSH']['MSH.2'];
var MSH7 = msg['MSH']['MSH.7'];
var MSH9 = msg['MSH']['MSH.9'];
msg['MSH'] = '';
msg['MSH']['MSH.1']=MSH1;
msg['MSH']['MSH.2']=MSH2;
msg['MSH']['MSH.7']=MSH7;
msg['MSH']['MSH.9']=MSH9;
}
Rinse and repeat for the segments that I need, seems very painful to me.
On a second destination, I'm trying to leverage the Inbound and Outbound Message Template. Inserted the source system template as above, inserted the destination system template in Outbound Message Template.
My Javascript for that one looks something like this:
//MSH Segment
if (msg['MSH'][0]){
tmp['MSH'] = "";
tmp['MSH']['MSH.1'] = msg['MSH']['MSH.1'];
tmp['MSH']['MSH.2'] = msg['MSH']['MSH.2'];
tmp['MSH']['MSH.7'] = msg['MSH']['MSH.7'];
tmp['MSH']['MSH.9'] = msg['MSH']['MSH.9'];
}
It's cleaner, but doesn't seem to work properly, in some messages, my source doesn't have a PV1 segment, but the output contains the sample PV1 segment in the Output Message Template. Do I need to have an initial statement that is tmp = "";
There has to be a easier way to accomplish what I'm trying here, any advise is appreciated!
M
Eventually figured out a different route. Removed the outbound template entirely and built the outbound message from scratch. Here's a snapshot of what it looks like.
var output = <HL7Message/>;
//MSH Segment
createSegment('MSH',output);
output.MSH['MSH.1'] = msg['MSH']['MSH.1'];
output.MSH['MSH.2'] = msg['MSH']['MSH.2'];
output.MSH['MSH.7'] = msg['MSH']['MSH.7'];
output.MSH['MSH.9'] = msg['MSH']['MSH.9'];
//SCH Segment
if (msg['SCH'][0]){
createSegment('SCH',output);
output.SCH['SCH.1'] = msg['SCH']['SCH.1'];
output.SCH['SCH.2'] = msg['SCH']['SCH.2'];
output.SCH['SCH.6'] = msg['SCH']['SCH.6'];
output.SCH['SCH.7'] = msg['SCH']['SCH.7'];
output.SCH['SCH.8'] = msg['SCH']['SCH.8'];
output.SCH['SCH.11'] = msg['SCH']['SCH.11'];
output.SCH['SCH.12'] = msg['SCH']['SCH.12'];
output.SCH['SCH.16'] = msg['SCH']['SCH.16'];
output.SCH['SCH.25'] = msg['SCH']['SCH.25'];
}
var message = SerializerFactory.getSerializer('HL7V2').fromXML(output);
channelMap.put('outmsg',message);
And then in my destination, I use ${outmsg} for the Template.
I have a service to create bugs and using the below Documentation
https://learn.microsoft.com/es-es/azure/devops/integrate/quickstarts/create-bug-quickstart?view=azure-devops&viewFallbackFrom=vsts
Question is that,
a. Since service account(say:abc) is creating bug, once bugs gets resolved, its getting assigned to that same service account(abc). Is here a way i can hardcode to assign to someone say:xyz while bug is getting created. Or
Is there any JsonPathOperation Path that i can use to solve this?
b. What is JsonPathOperation Path for adding the tags to the Bug?
Appreciate any help or please direct to any references
Thanks
You can try to add the following code:
a.
patchDocument.Add(
new JsonPatchOperation()
{
Operation = Operation.Add,
Path = "/fields/System.AssignedTo",
Value = "***#***.com"//Accound Name
}
);
b.
patchDocument.Add(
new JsonPatchOperation()
{
Operation = Operation.Add,
Path = "/fields/System.Tags",
Value = "tag"//Tag Name
}
);
I'm working on switching OpenAPI v2 to Open API 3, we'll be using MicroProfile 2.0 with Projects as the plugin that will generate the OAS from the code.
Now, we have different headers that are needed as a kind of authorization. I know I can put them on each resource, that seems just a lot of repetition, so I thought it was a good idea to put in the JaxRSConfiguration file as a #SecurityScheme and add them as security to the #OpenApiDefinition.
#OpenAPIDefinition(
info = #Info(
...
)
),
security = {
#SecurityRequirement(name = Header1),
#SecurityRequirement(name = Header2)
},
components = #Components(
securitySchemes = {
#SecurityScheme( apiKeyName = Header1 ... ) ,
#SecurityScheme( apiKeyName = Header2 ....)
}),
...
)
This is working, however it generates an OR, while it should be an AND (without the - )
security:
- Header1: []
- Header2: []
I thought I could use #SecurityRequirementsSet inside security in the #OpenApiDefinition, but unfortunately this is not allowed. I know I can use it on each call or on top of the class of the different calls but as this is still a sort of repetition, I would prefer to have it as a general authentication security.
Does anybody know how I can achieve this ?
I have several urls:
/dave
/davina
/dave/chris
/davina/peter
I have entries for all of them in my routes, an example of this is:
routes.dave.route = /dave
routes.dave.defaults.module = default
routes.dave.defaults.controller = person
routes.rcp.defaults.action = index
routes.davina.route = /dave/chris
routes.davina.defaults.module = default
routes.davina.defaults.controller = person
routes.davina.defaults.action = index
I think you can see straight away that I have a duplication issue. Is there a way of combining multiple urls into a single route?
I have played around with using /:person but I also have other content aswell not going to person controller.
routes.person.route = /:personname
routes.person.defaults.module = default
routes.person.defaults.controller = person
routes.person.defaults.action = index
routes.person.reqs.personname = "^[a-zA-Z0-9]+$"
Urls such as /search?person=dave which goes off to the search controller is obviously being killed by the expression above.
Can I express the requirement as a list? "dave|davina|etc" or is there another magical zend method of doing this?
UPDATE:
I was playing around and came across this partial solution:
routes.person.route = /:personname
routes.person.defaults.module = default
routes.person.defaults.controller = person
routes.person.defaults.action = index
routes.person.reqs.personname = "(dave|davina)"
routes.person.route = /:person/:personname
routes.person.defaults.module = default
routes.person.defaults.controller = person
routes.person.defaults.action = index
routes.person.reqs.personname = "(chris|peter)"
I am going to run with this for the moment as is satisfies my requirements but I will leave this open(at least for a day) for anyone to offer there advice. The main issues is that both lists are going to grow, which will eventually cause an issue.
I think I may have the anwser for that.
In ZF, the routes are matched in reverse-order. So the last defined route, is the first matched.
In this case, you should define your /:person/:personname route, then define the others static routes like about page, contact page, etc.
If I understand Zend correctly, it should work. This do that in clear:
url=/about
match route "/about"
url=/david/parker
match route "/:person/:personname"
not "/about" or "/contact"