Quantcast

Sending request to CONNECT 4.7 from a client application developed in PHP

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Sending request to CONNECT 4.7 from a client application developed in PHP

vinish.viswan
Hi,

We are trying to connect to external applications through CONNECT gateway for health information exchange. We have successfully installed and configured CONNECT in our server. Now we need to send a patient discovery request from our client application to CONNECT gateway. From the documentations we know there are web services in CONNECT for PD, QD and RD. We need to know the XML format used to send request from client application to CONNECT. Is it the same NHIN SAML format that should be passed to CONNECT? Do we need to pass the assertion, signatures, body etc.?

Thanks and Regards
Vinish K
--
Thanks & Regards
Vinish K
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sending request to CONNECT 4.7 from a client application developed in PHP

Sovann Huynh
Administrator
Hi Vinish,

Take a look at our validation suite in SoapUI for a good example:

/CONNECT/Product/SoapUI_Test/ValidationSuite
Sovann
CONNECT Product Team Member
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sending request to CONNECT 4.7 from a client application developed in PHP

vinish.viswan
Thank You Sovann for the quick reply.

Can you please give me some more details, because I have gone through those folders before. I have noticed some WSDLs there. I am not clear how to use those information.

Vinish K
--
Thanks & Regards
Vinish K
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sending request to CONNECT 4.7 from a client application developed in PHP

vinish.viswan
Hi,

We have figured out an xml which we believe is used to send request from client application to CONNECT. Attaching the same with this post. We wanted a confirmation before moving forward.

PD.xml

Thanks & Regards,
Vinish K
--
Thanks & Regards
Vinish K
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sending request to CONNECT 4.7 from a client application developed in PHP

Minh
Administrator
That look correct.
Minh-Hai Nguyen
CONNECT Product Team Member
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sending request to CONNECT 4.7 from a client application developed in PHP

vinish.viswan
This post was updated on .
Hi Minh-Hai,

Is it mandatory to have all the sections PRPA_IN201305UV02, assertion and NhinTargetCommunities?Where do we get the description of each element inside the xml file? Is there any documentation for that?

Thanks & Regards
Vinish K
--
Thanks & Regards
Vinish K
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sending request to CONNECT 4.7 from a client application developed in PHP

vinish.viswan
Hi,

I am getting the below error when we send a request to CONNECT from our client application. What am I doing wrong?

15:29:17,095 WARN  [org.apache.cxf.ws.addressing.ContextUtils] (http--0.0.0.0-80
80-3) WS-Addressing - failed to retrieve Message Addressing Properties from cont
ext
15:29:17,109 WARN  [org.apache.cxf.ws.addressing.ContextUtils] (http--0.0.0.0-80
80-3) WS-Addressing - failed to retrieve Message Addressing Properties from cont
ext
15:29:17,131 WARN  [org.apache.cxf.ws.addressing.ContextUtils] (http--0.0.0.0-80
80-3) WS-Addressing - failed to retrieve Message Addressing Properties from cont
ext
15:29:17,134 INFO  [org.apache.cxf.binding.soap.interceptor.Soap12FaultOutInterc
eptor] (http--0.0.0.0-8080-3) class org.apache.cxf.binding.soap.interceptor.Soap
12FaultOutInterceptor$Soap12FaultOutInterceptorInternalapplication/soap+xml
15:29:17,104 ERROR [org.jboss.as.ejb3] (EJB default - 2) JBAS014102: Asynchronou
s invocation failed: javax.ejb.EJBException: java.lang.NullPointerException
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInt
erceptor.java:166) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.
java:230) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:
304) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxIntercep
tor.java:190) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.ja
va:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInte
rceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as
-ejb3-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.ja
va:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processIn
vocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.ja
va:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocati
on(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final
]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.ja
va:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.p
rocessInvocation(AdditionalSetupInterceptor.java:43) [jboss-as-ejb3-7.1.1.Final.
jar:7.1.1.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.ja
va:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInter
ceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.ja
va:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInte
rceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:16
5) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDes
cription.java:173) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.ja
va:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ejb3.component.interceptors.AsyncVoidInterceptorFactory$
Task.run(AsyncVoidInterceptorFactory.java:75) [jboss-as-ejb3-7.1.1.Final.jar:7.1
.1.Final]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1110) [rt.jar:1.7.0_03]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:603) [rt.jar:1.7.0_03]
        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.NullPointerException
        at gov.hhs.fha.nhinc.audit.transform.AuditTransforms.createBaseAuditMess
age(AuditTransforms.java:520) [AuditRepositoryCore-4.7.0.jar:]
        at gov.hhs.fha.nhinc.audit.transform.AuditTransforms.transformRequestToA
uditMsg(AuditTransforms.java:108) [AuditRepositoryCore-4.7.0.jar:]
        at gov.hhs.fha.nhinc.audit.ejb.impl.AuditEJBLoggerImpl.auditRequestMessa
ge(AuditEJBLoggerImpl.java:75) [AuditRepositoryEJB-4.7.0.jar:]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1
.7.0_03]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57) [rt.jar:1.7.0_03]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43) [rt.jar:1.7.0_03]
        at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_03]
        at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$Ma
nagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodIntercep
torFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.ja
va:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterc
eptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.proce
ssInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.
Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.ja
va:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocatio
n(SBInvocationInterceptor.java:47)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.ja
va:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInte
rceptor.java:21) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.ja
va:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInte
rceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor
.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.1.Fi
nal.jar:7.1.1.Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.ja
va:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInv
ocation(PooledInstanceInterceptor.java:51) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.
Final]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.ja
va:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.
java:228) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
        ... 22 more

15:29:17,202 WARN  [gov.hhs.fha.nhinc.logging.transaction.TransactionHandler] (h
ttp--0.0.0.0-8080-3) TransactionHandler.handleFault


Thanks & Regards
Vinish K
--
Thanks & Regards
Vinish K
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sending request to CONNECT 4.7 from a client application developed in PHP

vinish.viswan
Hi,

We have figured out the issue and corrected it. Everything looks fine and we are getting response for our request. But there is one statement that we could not figure out. When we send a request from our application to DIL testing tool via CONNECT gateway, we get the X509SubjectName as "CN=SAML User,OU=SU,O=SAML User,L=Los Angeles,ST=CA,C=US" inside the assertion. We are not sure from where this values is taken. We have configured our CONNECT system using the certificate provided by DIL. Is that the reason we get these default values while generating SAML in CONNECT? Is there anyway to change these values?

Thanks & Regards
Vinish K
--
Thanks & Regards
Vinish K
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sending request to CONNECT 4.7 from a client application developed in PHP

ravin
hi vinish: how you were able to solve the problem. we are having the same issue. it is for docquery transaction. I am pasting the snippet from the log which has the request and the corresponding error.
we are also getting the "X509SubjectName " error as you are getting. if you were able to solve it please let us know. that would be helpful.



Address: https://hqabqditdcon01.d1.na.ihs.gov:8181/Gateway/DocumentQuery/2_0/EntityService/EntityDocQuerySecured
Encoding: UTF-8
Http-Method: POST
Content-Type: application/soap+xml; charset=UTF-8; action="urn:gov:hhs:fha:nhinc:entitydocquery:RespondingGateway_CrossGatewayQuerySecuredRequestMessage"
Headers: {content-type=[application/soap+xml; charset=UTF-8; action="urn:gov:hhs:fha:nhinc:entitydocquery:RespondingGateway_CrossGatewayQuerySecuredRequestMessage"], Host=[hqabqditdcon01.d1.na.ihs.gov:8181], transfer-encoding=[chunked], User-Agent=[Axis2]}
Payload: <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:To>https://hqabqditdcon01.d1.na.ihs.gov:8181/Gateway/DocumentQuery/2_0/EntityService/EntityDocQuerySecured</wsa:To><wsa:MessageID>urn:uuid:F6D5BD9E68844AB8961495463499558</wsa:MessageID><wsa:Action>urn:gov:hhs:fha:nhinc:entitydocquery:RespondingGateway_CrossGatewayQuerySecuredRequestMessage</wsa:Action></soapenv:Header><soapenv:Body><nhinc_entity:RespondingGateway_CrossGatewayQuerySecuredRequest xmlns:nhinc_entity="urn:gov:hhs:fha:nhinc:common:nhinccommonentity"><query:AdhocQueryRequest xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0">
    <query:ResponseOption returnComposedObjects="true" returnType="LeafClass" />
    <AdhocQuery xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" id="urn:uuid:14d4debf-8f97-4251-9a74-a90016b0af0d">
        <Slot name="$XDSDocumentEntryPatientId">
            <ValueList>
                <Value>'1000506001^^^&2.16.840.1.113883.3.454.0&ISO'</Value>
            </ValueList>
        </Slot>
        <Slot name="$XDSDocumentEntryStatus">
            <ValueList>
                <Value>('urn:oasis:names:tc:ebxml-regrep:StatusType:Approved')</Value>
            </ValueList>
        </Slot>
    </AdhocQuery>
</query:AdhocQueryRequest><ns3:assertion xmlns:ns3="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:urn1="urn:gov:hhs:fha:nhinc:common:nhinccommon">     
    <urn1:haveSecondWitnessSignature>false</urn1:haveSecondWitnessSignature>
    <urn1:haveSignature>false</urn1:haveSignature>
    <urn1:haveWitnessSignature>false</urn1:haveWitnessSignature>
    <urn1:homeCommunity>
        <urn1:description>IHS</urn1:description>
        <urn1:homeCommunityId>urn:oid:2.16.840.1.113883.3.454</urn1:homeCommunityId>
        <urn1:name>IHS</urn1:name>
    </urn1:homeCommunity>   
           
    <urn1:uniquePatientId>1000506001^^^&2.16.840.1.113883.3.454.0&ISO</urn1:uniquePatientId>     
    <urn1:userInfo>
        <urn1:personName>
            <urn1:familyName>Shafi</urn1:familyName>
            <urn1:givenName>Omer</urn1:givenName>
            <urn1:secondNameOrInitials />     
        </urn1:personName>
        <urn1:userName />
        <urn1:org>
            <urn1:name />
        </urn1:org>
               
     
        <urn1:roleCoded>
            <urn1:code>112247003</urn1:code>
            <urn1:codeSystem>2.16.840.1.113883.6.96</urn1:codeSystem>
            <urn1:codeSystemName>SNOMED_CT</urn1:codeSystemName>
            <urn1:displayName>Medical doctor</urn1:displayName>           
                 
            <urn1:translation />
        </urn1:roleCoded>
    </urn1:userInfo>
    <urn1:authorized>false</urn1:authorized>
           
   
    <urn1:purposeOfDisclosureCoded>
        <urn1:code>TREATMENT</urn1:code>
        <urn1:codeSystem>2.16.840.1.113883.3.18.7.1</urn1:codeSystem>
        <urn1:codeSystemName>nhin-purpose</urn1:codeSystemName>
        <urn1:displayName>Treatment</urn1:displayName>             
    </urn1:purposeOfDisclosureCoded>
</ns3:assertion></nhinc_entity:RespondingGateway_CrossGatewayQuerySecuredRequest></soapenv:Body></soapenv:Envelope>
--------------------------------------
2017-05-22 08:31:39,437 INFO  [gov.hhs.fha.nhinc.logging.transaction.TransactionLogger] (default task-17) pass in transaction-id is null for message id: urn:uuid:F6D5BD9E68844AB8961495463499558
2017-05-22 08:31:39,437 WARN  [org.apache.cxf.phase.PhaseInterceptorChain] (default task-17) Interceptor for {urn:gov:hhs:fha:nhinc:entitydocquery}EntityDocQuerySecured#{urn:gov:hhs:fha:nhinc:entitydocquery}RespondingGateway_CrossGatewayQuery has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element (uri:"urn:gov:hhs:fha:nhinc:common:nhinccommon", local:"assertion"). Expected elements are <{urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0}AdhocQueryRequest>,<{urn:gov:hhs:fha:nhinc:common:nhinccommonentity}NhinTargetCommunities>
 at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:808)
 at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:629)
 at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:157)
 at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:198)
 at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
 at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
 at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
 at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:218)
 at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:198)
 at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
 at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:158)
 at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:243)
 at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:163)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
 at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:219)
 at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
 at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
 at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
 at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)

.
Loading...