ITI55 endpoint has pre-existing parameter

39 views
Skip to first unread message

jason.co...@gmail.com

unread,
Aug 10, 2021, 8:59:33 AM8/10/21
to ipf-user
Good morning,

An iti55 server endpoint that we communicate with has a pre-configured parameter.  Unforutnately, this causes an error whenever we try to initiate an ITI55 transaction with them:

...HS.IHE.XCPD.RespondingGateway.Services.cls?CFGITEM=Carequality_XCPD&inFaultInterceptors=%23serverInLogger&inInterceptors=%23serverInLogger&outFaultInterceptors=%23serverOutLogger&outInterceptors=%23serverOutLogger%2C%23OutgoingSamlInterceptor&secure=true due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{CFGITEM=Carequality_XCPD}]

Is there a way I can tell camel/ipf to pass that unknown parameter on?  The other are for my interceptors/ipf security and are handled correctly.

Thank you
Jason

jason.co...@gmail.com

unread,
Aug 10, 2021, 10:58:54 AM8/10/21
to ipf-user
Ok, it appears that I have to set isLenient to true on the camel Endpoint, although I don't have access to that directly.  Does anyone know how I can configure that via Spring or using the camel context?  Or a ProducerTemplate?

Dmytro Rud

unread,
Aug 10, 2021, 3:26:04 PM8/10/21
to ipf-...@googlegroups.com
Hello Jason

Unfortunately we have not investigated yet whether it is safe to make all IPF components lenient in regard to custom properties.
But what you can do now is to create an own version of Iti55Component (let us call it org.acme.MyIti55Component), where the endpoint class overrides the method isLenientProperties:

@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) {
return new Hl7v3Endpoint<>(uri, remaining, this, parameters, null) {
@Override
public AbstractWsProducer<Hl7v3AuditDataset, Hl7v3WsTransactionConfiguration, ?, ?> getProducer(AbstractWsEndpoint<Hl7v3AuditDataset, Hl7v3WsTransactionConfiguration> endpoint,
JaxWsClientFactory<Hl7v3AuditDataset> clientFactory) {
return new Iti55Producer(endpoint, clientFactory);
}

@Override
protected AbstractWebService getCustomServiceInstance(AbstractWsEndpoint<Hl7v3AuditDataset, Hl7v3WsTransactionConfiguration> endpoint) {
return new Iti55Service((Hl7v3Endpoint<Hl7v3WsTransactionConfiguration>) endpoint);
}

@Override
public boolean isLenientProperties() {
return true;
}
};
}
Then create a file src/main/resources/META-INF/services/org/apache/camel/component/my-xcpd-iti55 with the contents
class=org.acme.MyItt55Component
and use this new component ID in .to("my-xcpd-iti55://...") and from("my-xcpd-iti55://...").

Best regards
Dmytro


--
You received this message because you are subscribed to the Google Groups "ipf-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ipf-user+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ipf-user/5cb08860-db75-49ff-9ceb-ca54fa57fe38n%40googlegroups.com.

jason.co...@gmail.com

unread,
Aug 10, 2021, 3:42:08 PM8/10/21
to ipf-user
Dmytro,

Thank you so much.  I never considered overriding the Endpoint component.  

The changes you describe here, will they work with ipf 3.4.1?  I'm blocked from version 4 completely (I'm stuck with Java 8 for now), and I know there were some changes to the classes for the PIX transactions since 3.4.1 and I'd like to avoid upgrading at this time, if possible.  

I'll also need to override iti38, iti39 and iti56 as well.

Again, thank you.

Dmytro Rud

unread,
Aug 10, 2021, 4:20:56 PM8/10/21
to ipf-...@googlegroups.com
I did not try, but I think yes, this should work in 3.4.1 as well.  

Independently from the IPF version: besides isLenientProperties, you should also override getServiceUrl:

@Override
public String getServiceUrl() {
return super.getServiceUrl() + "?CFGITEM=Carequality_XCPD";
}

Otherwise, the parameter will be not present in the resulting target endpoint URL.

Best regards
Dmytro



jason.co...@gmail.com

unread,
Aug 10, 2021, 4:26:41 PM8/10/21
to ipf-user
Hmmm, that may be an issue.  This environment connects with thousands of possible endpoints, not just this one, and any one of these connections can change their endpoints at any time.

I may have to parse out the parameters, then use something like MDC to get them back into the URL via getServiceUrl().

Again, thank you, I'm much farther ahead with this than I was before.

Dmytro Rud

unread,
Aug 10, 2021, 4:32:12 PM8/10/21
to ipf-...@googlegroups.com
You do not have to parse parameters, they are pre-parsed for you:

@Override
public String getServiceUrl() {
String paramName = "CFGITEM";
return super.getServiceUrl() + "?" + paramName + "=" + parameters.get(paramName);
}

Or, if you do not know the parameter name, simply filter all parameters not matching IPF ones.

Best regards
Dmytro


jason.co...@gmail.com

unread,
Aug 25, 2021, 9:11:29 AM8/25/21
to ipf-user
Good morning,

I've finally got the time to work on this, and I'm having a small issue with my component.  Do I need to override the getProducer and getCustomServiceInstance methods?  Neither Iti55Producer or Iti55Service are declared public.

(I'm still relatively new to Java, unfortunately.)

Also, where can I see what parameter names are already handled?

Thanks
Jason

jason.co...@gmail.com

unread,
Aug 25, 2021, 11:32:20 AM8/25/21
to ipf-user
I've started to modify the Iti55Producer class (just making it public) in org.openehealth.ipf.platform.camel.ihe.hl7v3.iti55, and cannot build with my changes.  It looks like bintray.com is forbidding access to get the dependencies housed there.  The groovy eclipse compiler.

Do they exist somewhere else?  Can I modify one of the pom.xml files to change the bintray repository to something else?



jason.co...@gmail.com

unread,
Aug 26, 2021, 11:52:08 AM8/26/21
to ipf-user
I've tried building ipf 3.4.1 from source so that I can modify Iti55Producer.  Unfortunately, I have had no luck getting a successful build.  The groovy eclipse packages that are dependencies for that project don't exist anywhere anymore.

I've switched to 3.7, and am now unable to get a successful build of ipf-commons-ihe-hl7v2, with many undefined issues.  Does anyone know what I need to do to resolve these?  I'm locked into Java 8, unfortunately, so can't progress beyond ipf 3.7.

Thanks
Jason

COMPILATION ERROR : 
-------------------------------------------------------------
Failure executing groovy-eclipse compiler:
----------
1. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti31\Iti31AuditStrategy.java (at line 104)
.getMessage();
^^^^^^^^^^
The method getMessage() is undefined for the type PatientRecordEventBuilder<PatientRecordEventBuilder<T'>>
----------
----------
2. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti8\Iti8AuditStrategy.java (at line 81)
.getMessage();
^^^^^^^^^^
The method getMessage() is undefined for the type PatientRecordEventBuilder<PatientRecordEventBuilder<T'>>
----------
----------
3. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\Iti64AuditStrategy.java (at line 82)
.getMessages();
^^^^^^^^^^^
The method getMessages() is undefined for the type IHEPatientRecordChangeLinkBuilder
----------
----------
4. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\pdqcore\PdqAuditStrategy.java (at line 73)
.getMessages();
^^^^^^^^^^^
The method getMessages() is undefined for the type QueryInformationBuilder
----------
----------
5. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 64)
delegate.addPatient(patientId, null,
^^^^^^^^
delegate cannot be resolved
----------
6. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 66)
getTypeValuePair("MSH-10", auditDataset.getMessageControlId(), getAuditContext().getAuditValueIfMissing()),
^^^^^^^^^^^^^^^^
The method getTypeValuePair(String, String, String) is undefined for the type IHEPatientRecordChangeLinkBuilder<T>
----------
7. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 67)
getTypeValuePair(URN_IHE_ITI_XPID_2017_PATIENT_IDENTIFIER_TYPE, "localPatientId")
^^^^^^^^^^^^^^^^
The method getTypeValuePair(String, String) is undefined for the type IHEPatientRecordChangeLinkBuilder<T>
----------
8. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 79)
delegate.addPatient(patientId, null,
^^^^^^^^
delegate cannot be resolved
----------
9. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 81)
getTypeValuePair("MSH-10", auditDataset.getMessageControlId(), getAuditContext().getAuditValueIfMissing()),
^^^^^^^^^^^^^^^^
The method getTypeValuePair(String, String, String) is undefined for the type IHEPatientRecordChangeLinkBuilder<T>
----------
10. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 82)
getTypeValuePair(URN_IHE_ITI_XPID_2017_PATIENT_IDENTIFIER_TYPE, "subsumedPatientId")
^^^^^^^^^^^^^^^^
The method getTypeValuePair(String, String) is undefined for the type IHEPatientRecordChangeLinkBuilder<T>
----------
11. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 91)
delegate.addPatient(patientId, null,
^^^^^^^^
delegate cannot be resolved
----------
12. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 93)
getTypeValuePair("MSH-10", auditDataset.getMessageControlId(), getAuditContext().getAuditValueIfMissing()),
^^^^^^^^^^^^^^^^
The method getTypeValuePair(String, String, String) is undefined for the type IHEPatientRecordChangeLinkBuilder<T>
----------
13. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 94)
getTypeValuePair(URN_IHE_ITI_XPID_2017_PATIENT_IDENTIFIER_TYPE, "newPatientId")
^^^^^^^^^^^^^^^^
The method getTypeValuePair(String, String) is undefined for the type IHEPatientRecordChangeLinkBuilder<T>
----------
14. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 106)
delegate.addPatient(patientId, null,
^^^^^^^^
delegate cannot be resolved
----------
15. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 108)
getTypeValuePair("MSH-10", auditDataset.getMessageControlId(), getAuditContext().getAuditValueIfMissing()),
^^^^^^^^^^^^^^^^
The method getTypeValuePair(String, String, String) is undefined for the type IHEPatientRecordChangeLinkBuilder<T>
----------
16. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 109)
getTypeValuePair(URN_IHE_ITI_XPID_2017_PATIENT_IDENTIFIER_TYPE, "previousPatientId")
^^^^^^^^^^^^^^^^
The method getTypeValuePair(String, String) is undefined for the type IHEPatientRecordChangeLinkBuilder<T>
----------
17. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 122)
delegate.addParticipantObjectIdentification(
^^^^^^^^
delegate cannot be resolved
----------
18. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 137)
public void validate() {
            ^^^^^^^^^^
The method validate() of type IHEPatientRecordChangeLinkBuilder<T> must override or implement a supertype method
----------
19. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti64\IHEPatientRecordChangeLinkBuilder.java (at line 138)
super.validate();
      ^^^^^^^^
The method validate() is undefined for the type IHEAuditMessageBuilder<T,PatientRecordBuilder>
----------
----------
20. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti30\Iti30AuditStrategy.java (at line 76)
.getMessage();
^^^^^^^^^^
The method getMessage() is undefined for the type PatientRecordEventBuilder<PatientRecordEventBuilder<T'>>
----------
----------
21. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti9\Iti9AuditStrategy.java (at line 64)
.getMessages();
^^^^^^^^^^^
The method getMessages() is undefined for the type QueryInformationBuilder
----------
----------
22. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\hl7v2\src\main\java\org\openehealth\ipf\commons\ihe\hl7v2\audit\iti10\Iti10AuditStrategy.java (at line 56)
.getMessages();
^^^^^^^^^^^
The method getMessages() is undefined for the type PatientRecordEventBuilder
----------
22 problems (22 errors)

jason.co...@gmail.com

unread,
Aug 26, 2021, 1:20:35 PM8/26/21
to ipf-user
Now with a clean and build I'm getting this:

-------------------------------------------------------------
COMPILATION ERROR : 
-------------------------------------------------------------
Failure executing groovy-eclipse compiler:
----------
1. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\fhir\stu3\pixpdq\src\main\java\org\openehealth\ipf\commons\ihe\fhir\iti78\Iti78AuditStrategy.java (at line 51)
.getMessages();
^^^^^^^^^^^
The method getMessages() is undefined for the type QueryInformationBuilder<QueryInformationBuilder<T'>>
----------
----------
2. ERROR in C:\Users\jasonc\Documents\NetBeansProjects\ipf37\branches\ipf-3.7\commons\ihe\fhir\stu3\pixpdq\src\main\java\org\openehealth\ipf\commons\ihe\fhir\iti83\Iti83AuditStrategy.java (at line 55)
.getMessages();
^^^^^^^^^^^
The method getMessages() is undefined for the type QueryInformationBuilder<QueryInformationBuilder<T'>>
----------
2 problems (2 errors)


jason.co...@gmail.com

unread,
Aug 27, 2021, 11:13:59 AM8/27/21
to ipf-user
I moved on from trying to build the libraries to be able to override the component.  I'm now attempting to try with an interceptor.  Does anyone have any advice on what I should be extending (pure JAVA, no DSL)?   I don't think InterceptSendToEndpoint is the one to use, but I'm not sure what's better.  I'm grasping at straws here.

jason.co...@gmail.com

unread,
Aug 31, 2021, 9:29:58 AM8/31/21
to ipf-user
If anyone ever needs this:

public class EndpointInterceptor extends AbstractPhaseInterceptor { 
  private static final Logger LOGGER = LogManager.getLogger(EndpointInterceptor.class.getName()); 

  public EndpointInterceptor()
     { super(Phase.POST_LOGICAL); }

  @Override public void handleMessage(Message message) throws Fault {
             //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 
            String address = (String)message.get(Message.ENDPOINT_ADDRESS);
            address = "test.com" message.put(Message.ENDPOINT_ADDRESS, address); 
Reply all
Reply to author
Forward
0 new messages