Difference between revisions of "WSDLs for QED"

From IHE Wiki
Jump to navigation Jump to search
m (New page: == Appendix E - WSDLs for QED == The WSDL for QED transactions PCC-1, PCC-2, PCC-3, PCC-4 and PCC-5 are identical except for the actor name. Simply substitute one the...)
 
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Appendix E - WSDLs for QED ==
+
= Appendix E - WSDLs for QED =
  
The WSDL for QED transactions [[PCC-1]], [[PCC-2]], [[PCC-3]], [[PCC-4]] and [[PCC-5]] are identical except for the actor nameSimply substitute one the following values for the string ACTOR in the following WSDL example.
+
The WSDL for the QED transaction {{ILink|WSDLs for QED|PCC-1}} represents the interface contract for the QED profile.  Conformance to this contract is a requirement of the profile.  However, the WSDL representing the this contract is not necessarily the best WSDLs to use when generating application proxies.
 +
 
 +
There is a general guideline for generating proxies make application development much easier for complex WSDL/schemas such as the ones included for QED.  Use a generic, non-strongly typed WSDL that is for the purpose of generating the proxy.  Use of a strongly typed WSDL forces the generation infrastructure to go through all the XML type definitions.  It will then generate classes for each of them, which can result in thousands of generated classes and megabytes of generated code. In addition, the mapping between the schema and object oriented constructs is not straightforward.  Because of both the size, and complexity of the schema, proxy generators often run into problems with valid instances of strongy typed WSDLs.
 +
 
 +
A commonly used method for creating non-strongly typed WDSL for HL7 Messages used for generating proxies substitutes the ANY data type for the payload of either the message infrastructure or the control act.  This results in much smaller proxiesApplications receiving messages using these proxies may want to validate inputs since they are no longer validated by the proxy.  A discussion of this method of proxy generation can be found in this article: http://msdn2.microsoft.com/en-us/library/ms954603.aspx.  See the section on Web Services Code Generation.
  
{{T|Transaction|Actor Name|Rows=
 
{{R|PCC-1|VitalSignsDataRepository}}
 
{{R|PCC-2|ProblemAndAllergyDataRepository}}
 
{{R|PCC-3|VitalSignsDataRepository}}
 
{{R|PCC-4|MedicationDataRepository}}
 
{{R|PCC-5|ImmunizationDataRepository}}
 
}}
 
  
 
<pre>
 
<pre>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
<!--
+
<definitions name="ClinicalDataSource" targetNamespace="urn:ihe:pcc:qed:2007"  
  HL7-WSP200) WSDL documents SHOULD implement a specific Application Role
+
xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:hl7="urn:hl7-org:v3"  
  This WSDL implements a ACTOR application role.
+
xmlns:tns="urn:ihe:pcc:qed:2007"
 
+
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"  
  HL7-WSP201) The attribute /wsdl:definitions/@name SHOULD be {Application Role Artifact Id}
+
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
  This is an IHE Actor, and conforms to the IHE Convention, using the Actor Name.
+
xmlns:wsoap11="http://schemas.xmlsoap.org/wsdl/soap/"
 
+
xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap/"
  Interactions
+
xmlns:wsaw="http://schemas.xmlsoap.org/ws/2004/08/addressing"
    Query Care Record Event Profile Query (QUPC_IN043100UV)
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"  
    Query Care Record Event Profile Query Response (QUPC_IN043200UV)
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"  
    General Query Activate Query Continue (QUPC_IN000005UV)
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    General Query Query Cancel (QUPC_IN000003UV)
 
 
 
  HL7-WSP202) The targetNamespace of the WSDL MUST be “urn:hl7-org:v3”.
 
  It is.
 
 
 
  HL7-WS203) The WSDL MUST include XML Schema Definitions for each supported Interaction.
 
  It does, but it is not clear that this is best, due to the overhead this causes when creating services and proxies from
 
  the WSDL.  Perhaps the contract should be defined using the XML Schema definitions, but a lighter weight WSDL should
 
  also be provided for engineering use.
 
 
 
  HL7-WSP208) WSDL messages for Interactions SHOULD use wsdl:operation/wsdl:input/@wsa:Action = "urn:hl7-org:v3:{Interaction_Artifact_Id}"
 
  It doesn't.  Instead the wsa:Action uses
 
  HL7-WSP209) WSDL messages for Accept Acknowledgement SHOULD use wsdl:operation/wsdl:input/@wsa:Action = "urn:hl7-org:v3:AcceptAcknowledgement".
 
 
 
  HL7-WSP210) WSDL messages for Application Level Acknowledgement SHOULD use wsdl:operation/wsdl:input/@wsa:Action = "urn:hl7-org:v3:ApplicationAcknowledgement".
 
 
 
-->
 
<definitions name="ACTOR" targetNamespace="urn:hl7-org:v3" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:hl7="urn:hl7-org:v3" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
 
   <types>
 
   <types>
     <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3" xmlns:hl7="urn:hl7-org:v3">
+
     <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3">
 
       <!-- Query Care Record Event Profile Query -->
 
       <!-- Query Care Record Event Profile Query -->
       <xsd:include schemaLocation="processable/QUPC_IN043100UV.xsd"/>
+
       <xsd:include schemaLocation="QUPC_IN043100UV.xsd"/>
 +
    </xsd:schema>
 +
    <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3">
 
       <!-- Query Care Record Event Profile Query Response -->
 
       <!-- Query Care Record Event Profile Query Response -->
       <xsd:include schemaLocation="processable/QUPC_IN043200UV.xsd"/>
+
       <xsd:include schemaLocation="QUPC_IN043200UV.xsd"/>
      <!-- General Query Activate Query Continue -->
+
    </xsd:schema>
      <xsd:include schemaLocation="processable/QUPC_IN000005UV.xsd"/>
+
    <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3">
       <!-- General Query Query Cancel -->
+
       <!-- General Query Activate Query Continue / Cancel -->
       <xsd:include schemaLocation="processable/QUPC_IN000003UV.xsd"/>
+
       <xsd:include schemaLocation="QUQI_IN000003UV01.xsd"/>
 
     </xsd:schema>
 
     </xsd:schema>
 
   </types>
 
   </types>
  <!-- HL7-WSP100) The top-level element of the HL7 message MUST be embedded as the only child of
 
        the soap:Body element. The name of the top-level element (the one directly under the soap:Body element)
 
        MUST be {Interaction Artifact Id}.
 
   
 
        Rather than using {Interaction Artifact Id}_Message, we are using human readable names for the message
 
        parts.  These human readable names come from the HL7 names for the message.  The interaction artifact Ids are
 
        used as the element names.
 
  -->
 
 
   <message name="QUPC_IN043100UV_Message">
 
   <message name="QUPC_IN043100UV_Message">
 
     <part element="hl7:QUPC_IN043100UV" name="Body"/>
 
     <part element="hl7:QUPC_IN043100UV" name="Body"/>
Line 71: Line 44:
 
     <part element="hl7:QUQI_IN000003UV01" name="Body"/>
 
     <part element="hl7:QUQI_IN000003UV01" name="Body"/>
 
   </message>
 
   </message>
 
+
   <portType name="ClinicalDataSource_PortType">
 
+
     <operation name="ClinicalDataSource_QUPC_IN043100UV">
   <portType name="ACTOR_PortType">
+
      <input message="tns:QUPC_IN043100UV_Message"
     <!-- Send Message with Immediate Response (CP002): this communication maps to a Request/Response MEP.
+
        wsaw:Action="urn:hl7-org:v3:QUPC_IN043100UV"/>
          The request and response messages can be correlated both at the Messaging Infrastructure layer and at the application level.
+
      <output message="tns:QUPC_IN043200UV_Message"
    -->
+
        wsaw:Action="urn:hl7-org:v3:QUPC_IN043200UV "/>
     <!-- Rather than using {NAME}_{Interaction Artifact Id}, we are using human readable names for the operations.  These
+
     </operation>
          human readable names are derived from the HL7 names for the message. -->
+
     <operation name="ClinicalDataSource_QUQI_IN000003UV01_Continue">
     <operation name="ACTOR_QUPC_IN043100UV">
+
       <input message="tns:QUQI_IN000003UV01_Message"  
       <input message="hl7:QUPC_IN043100UV_Message" wsa:Action="urn:hl7-org:v3:GetCareRecordProfileQuery"/>
+
        wsaw:Action="urn:hl7-org:v3:QUQI_IN000003UV01_Continue"/>
       <output message="hl7:QUPC_IN043200UV_Message" wsa:Action="urn:hl7-org:v3:GetCareRecordProfileQueryResponse"/>
+
       <output message="tns:QUPC_IN043200UV_Message"  
 +
        wsaw:Action="urn:hl7-org:v3:QUPC_IN043200UV "/>
 
     </operation>
 
     </operation>
     <operation name="ACTOR_QUQI_IN000003UV01">
+
     <operation name="ClinicalDataSource_QUQI_IN000003UV01_Cancel">
       <input message="hl7:QUQI_IN000003UV01_Message" wsa:Action="urn:hl7-org:v3:GeneralQueryActivateQueryContinue"/>
+
       <input message="tns:QUQI_IN000003UV01_Message"  
       <output message="hl7:QUPC_IN043200UV_Message" wsa:Action="urn:hl7-org:v3:GetCareRecordProfileQueryResponse"/>
+
        wsaw:Action="urn:hl7-org:v3:QUQI_IN000003UV01_Cancel"/>
 +
       <output message="tns:QUPC_IN043200UV_Message"  
 +
        wsaw:Action="urn:hl7-org:v3:QUPC_IN043200UV"/>
 
     </operation>
 
     </operation>
 
   </portType>
 
   </portType>
 
+
   <binding name="ClinicalDataSource_Binding_Soap12" type="tns:ClinicalDataSource_PortType">
   <binding name="ACTOR_Binding" type="hl7:ACTOR_PortType">
+
     <wsoap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
     <operation name="ClinicalDataSource_QUPC_IN043100UV">
     <!-- Vitals -->
+
      <wsoap12:operation soapAction="urn:hl7-org:v3:QUPC_IN043100UV"/>
     <operation name="ACTOR_QUPC_IN043100UV">
+
      <input><wsoap12:body use="literal"/></input>
       <soap:operation soapAction="urn:hl7-org:v3:GetCareRecordProfileQueryQuery"/>
+
      <output><wsoap12:body use="literal"/></output>
       <input>
+
    </operation>
        <soap:body use="literal"/>
+
    <operation name="ClinicalDataSource_QUQI_IN000003UV01_Continue">
       </input>
+
      <wsoap12:operation soapAction="urn:hl7-org:v3:QUQI_IN000003UV01"/>
       <output>
+
      <input><wsoap12:body use="literal"/></input>
        <soap:body use="literal"/>
+
      <output><wsoap12:body use="literal"/></output>
       </output>
+
    </operation>
 +
     <operation name="ClinicalDataSource_QUQI_IN000003UV01_Cancel">
 +
       <wsoap12:operation soapAction="urn:hl7-org:v3:QUQI_IN000003UV01"/>
 +
       <input><wsoap12:body use="literal"/></input>
 +
      <output><wsoap12:body use="literal"/></output>
 +
    </operation>
 +
  </binding>
 +
  <binding name="ClinicalDataSource_Binding_Soap11" type="tns:ClinicalDataSource_PortType">
 +
    <wsoap11:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
 +
    <operation name="ClinicalDataSource_QUPC_IN043100UV">
 +
      <wsoap11:operation soapAction="urn:hl7-org:v3:QUPC_IN043100UV"/>
 +
       <input><wsoap12:body use="literal"/></input>
 +
       <output><wsoap12:body use="literal"/></output>
 +
    </operation>
 +
    <operation name="ClinicalDataSource_QUQI_IN000003UV01_Continue">
 +
      <wsoap11:operation soapAction="urn:hl7-org:v3:QUQI_IN000003UV01"/>
 +
      <input><wsoap11:body use="literal"/></input>
 +
       <output><wsoap11:body use="literal"/></output>
 
     </operation>
 
     </operation>
     <operation name="ACTOR_QUQI_IN000003UV01">
+
     <operation name="ClinicalDataSource_QUQI_IN000003UV01_Cancel">
       <soap:operation soapAction="urn:hl7-org:v3:GeneralQueryActivateQueryContinue"/>
+
       <wsoap11:operation soapAction="urn:hl7-org:v3:QUQI_IN000003UV01"/>
       <input>
+
       <input><wsoap11:body use="literal"/></input>
        <soap:body use="literal"/>
+
       <output><wsoap11:body use="literal"/></output>
      </input>
 
       <output>
 
        <soap:body use="literal"/>
 
      </output>
 
 
     </operation>
 
     </operation>
 
   </binding>
 
   </binding>
 
+
   <service name="ClinicalDataSource_Service">
   <service name="ACTOR_Service">
+
     <port binding="tns:ClinicalDataSource_Binding_Soap11" name="ClinicalDataSource_Port_Soap11">
     <port binding="hl7:ACTOR_Binding" name="ACTOR_Port">
+
      <wsoap11:address location="http://servicelocation/"/>
       <soap:address location="http://servicelocation/"/>
+
    </port>
 +
    <port binding="tns:ClinicalDataSource_Binding_Soap12" name="ClinicalDataSource_Port_Soap12">
 +
       <wsoap12:address location="http://servicelocation/"/>
 
     </port>
 
     </port>
 
   </service>
 
   </service>
 
</definitions>
 
</definitions>
 
</pre>
 
</pre>
 +
 +
This file, along with the necessary HL7 Schemas, and some skelatal examples can all be found on the Patient Care Coordination FTP site: [ftp://ftp.ihe.net/Patient_Care_Coordination/yr3_2007-2008/resources/Query.zip]

Latest revision as of 17:26, 13 April 2009

Appendix E - WSDLs for QED

The WSDL for the QED transaction PCC-1 represents the interface contract for the QED profile. Conformance to this contract is a requirement of the profile. However, the WSDL representing the this contract is not necessarily the best WSDLs to use when generating application proxies.

There is a general guideline for generating proxies make application development much easier for complex WSDL/schemas such as the ones included for QED. Use a generic, non-strongly typed WSDL that is for the purpose of generating the proxy. Use of a strongly typed WSDL forces the generation infrastructure to go through all the XML type definitions. It will then generate classes for each of them, which can result in thousands of generated classes and megabytes of generated code. In addition, the mapping between the schema and object oriented constructs is not straightforward. Because of both the size, and complexity of the schema, proxy generators often run into problems with valid instances of strongy typed WSDLs.

A commonly used method for creating non-strongly typed WDSL for HL7 Messages used for generating proxies substitutes the ANY data type for the payload of either the message infrastructure or the control act. This results in much smaller proxies. Applications receiving messages using these proxies may want to validate inputs since they are no longer validated by the proxy. A discussion of this method of proxy generation can be found in this article: http://msdn2.microsoft.com/en-us/library/ms954603.aspx. See the section on Web Services Code Generation.


<?xml version="1.0" encoding="UTF-8"?>
<definitions name="ClinicalDataSource" targetNamespace="urn:ihe:pcc:qed:2007" 
		xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:hl7="urn:hl7-org:v3" 
		xmlns:tns="urn:ihe:pcc:qed:2007"
		xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
		xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
		xmlns:wsoap11="http://schemas.xmlsoap.org/wsdl/soap/"
		xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap/"
		xmlns:wsaw="http://schemas.xmlsoap.org/ws/2004/08/addressing"
	 	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
		xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <types>
    <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3">
      <!-- Query Care Record Event Profile Query -->
      <xsd:include schemaLocation="QUPC_IN043100UV.xsd"/>
    </xsd:schema>
    <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3">
      <!-- Query Care Record Event Profile Query Response -->
      <xsd:include schemaLocation="QUPC_IN043200UV.xsd"/>
    </xsd:schema>
    <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3">
      <!-- General Query Activate Query Continue / Cancel -->
      <xsd:include schemaLocation="QUQI_IN000003UV01.xsd"/>
    </xsd:schema>
  </types>
  <message name="QUPC_IN043100UV_Message">
    <part element="hl7:QUPC_IN043100UV" name="Body"/>
  </message>
  <message name="QUPC_IN043200UV_Message">
    <part element="hl7:QUPC_IN043200UV" name="Body"/>
  </message>
  <message name="QUQI_IN000003UV01_Message">
    <part element="hl7:QUQI_IN000003UV01" name="Body"/>
  </message>
  <portType name="ClinicalDataSource_PortType">
    <operation name="ClinicalDataSource_QUPC_IN043100UV">
      <input message="tns:QUPC_IN043100UV_Message" 
        wsaw:Action="urn:hl7-org:v3:QUPC_IN043100UV"/>
      <output message="tns:QUPC_IN043200UV_Message" 
        wsaw:Action="urn:hl7-org:v3:QUPC_IN043200UV "/>
    </operation>
    <operation name="ClinicalDataSource_QUQI_IN000003UV01_Continue">
      <input message="tns:QUQI_IN000003UV01_Message" 
        wsaw:Action="urn:hl7-org:v3:QUQI_IN000003UV01_Continue"/>
      <output message="tns:QUPC_IN043200UV_Message" 
        wsaw:Action="urn:hl7-org:v3:QUPC_IN043200UV "/>
    </operation>
    <operation name="ClinicalDataSource_QUQI_IN000003UV01_Cancel">
      <input message="tns:QUQI_IN000003UV01_Message" 
        wsaw:Action="urn:hl7-org:v3:QUQI_IN000003UV01_Cancel"/>
      <output message="tns:QUPC_IN043200UV_Message" 
        wsaw:Action="urn:hl7-org:v3:QUPC_IN043200UV"/>
    </operation>
  </portType>
  <binding name="ClinicalDataSource_Binding_Soap12" type="tns:ClinicalDataSource_PortType">
    <wsoap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="ClinicalDataSource_QUPC_IN043100UV">
      <wsoap12:operation soapAction="urn:hl7-org:v3:QUPC_IN043100UV"/>
      <input><wsoap12:body use="literal"/></input>
      <output><wsoap12:body use="literal"/></output>
    </operation>
    <operation name="ClinicalDataSource_QUQI_IN000003UV01_Continue">
      <wsoap12:operation soapAction="urn:hl7-org:v3:QUQI_IN000003UV01"/>
      <input><wsoap12:body use="literal"/></input>
      <output><wsoap12:body use="literal"/></output>
    </operation>
    <operation name="ClinicalDataSource_QUQI_IN000003UV01_Cancel">
      <wsoap12:operation soapAction="urn:hl7-org:v3:QUQI_IN000003UV01"/>
      <input><wsoap12:body use="literal"/></input>
      <output><wsoap12:body use="literal"/></output>
    </operation>
  </binding>
  <binding name="ClinicalDataSource_Binding_Soap11" type="tns:ClinicalDataSource_PortType">
    <wsoap11:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="ClinicalDataSource_QUPC_IN043100UV">
      <wsoap11:operation soapAction="urn:hl7-org:v3:QUPC_IN043100UV"/>
      <input><wsoap12:body use="literal"/></input>
      <output><wsoap12:body use="literal"/></output>
    </operation>
    <operation name="ClinicalDataSource_QUQI_IN000003UV01_Continue">
      <wsoap11:operation soapAction="urn:hl7-org:v3:QUQI_IN000003UV01"/>
      <input><wsoap11:body use="literal"/></input>
      <output><wsoap11:body use="literal"/></output>
    </operation>
    <operation name="ClinicalDataSource_QUQI_IN000003UV01_Cancel">
      <wsoap11:operation soapAction="urn:hl7-org:v3:QUQI_IN000003UV01"/>
      <input><wsoap11:body use="literal"/></input>
      <output><wsoap11:body use="literal"/></output>
    </operation>
  </binding>
  <service name="ClinicalDataSource_Service">
    <port binding="tns:ClinicalDataSource_Binding_Soap11" name="ClinicalDataSource_Port_Soap11">
      <wsoap11:address location="http://servicelocation/"/>
    </port>
    <port binding="tns:ClinicalDataSource_Binding_Soap12" name="ClinicalDataSource_Port_Soap12">
      <wsoap12:address location="http://servicelocation/"/>
    </port>
  </service>
</definitions>

This file, along with the necessary HL7 Schemas, and some skelatal examples can all be found on the Patient Care Coordination FTP site: [1]