Difference between revisions of "WSDLs for QED"

From IHE Wiki
Jump to navigation Jump to search
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 name.  Simply substitute one the following values for the string ACTOR in the following WSDL example.
+
The WSDL for QED transactions {{ILink|WSDLs for QED|PCC-1}}, {{ILink|WSDLs for QED|PCC-2}}, {{ILink|WSDLs for QED|PCC-3}}, {{ILink|WSDLs for QED|PCC-4}}, {{ILink|WSDLs for QED|PCC-5}} and {{ILink|WSDLs for QED|PCC-6}} are identical except for the actor name.  Simply substitute one the following values for the string ACTOR in the following WSDL example.
  
 
{{T|Transaction|Actor Name|Rows=
 
{{T|Transaction|Actor Name|Rows=
 
{{R|PCC-1|VitalSignsDataRepository}}
 
{{R|PCC-1|VitalSignsDataRepository}}
 
{{R|PCC-2|ProblemAndAllergyDataRepository}}
 
{{R|PCC-2|ProblemAndAllergyDataRepository}}
{{R|PCC-3|VitalSignsDataRepository}}
+
{{R|PCC-3|DiagnosticDataRepository}}
 
{{R|PCC-4|MedicationDataRepository}}
 
{{R|PCC-4|MedicationDataRepository}}
 
{{R|PCC-5|ImmunizationDataRepository}}
 
{{R|PCC-5|ImmunizationDataRepository}}
 +
{{R|PCC-5|ProfessionalServicesDataRepository}}
 
}}
 
}}
 +
 +
These WSDLs are represent interface contracts for the QED profile.  Conformance to these contracts is a requirement of the profile.  However, the WSDLs representing the these contracts are 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.
 +
  
 
<pre>
 
<pre>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
<!--
+
<definitions name="ACTOR" 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:import schemaLocation="QUPC_IN043100UV.xsd"/>
 +
  <xsd:element name="QUPC_IN043100UV"/>
 +
    </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:import schemaLocation="QUPC_IN043200UV.xsd"/>
      <!-- General Query Activate Query Continue -->
+
  <xsd:element name="QUPC_IN043200UV"/>
      <xsd:include schemaLocation="processable/QUPC_IN000005UV.xsd"/>
+
    </xsd:schema>
       <!-- General Query Query Cancel -->
+
    <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3">
       <xsd:include schemaLocation="processable/QUPC_IN000003UV.xsd"/>
+
       <!-- General Query Activate Query Continue / Cancel -->
 +
       <xsd:import schemaLocation="QUQI_IN000003UV01.xsd"/>
 +
  <xsd:element name="QUQI_IN000003UV01"/>
 
     </xsd:schema>
 
     </xsd:schema>
 
   </types>
 
   </types>
  <!-- HL7-WSP100) The top-level element of the HL7 message MUST be embedded as the only child of
+
   <message name="QUPC_IN043100UV_Message"><part element="hl7:QUPC_IN043100UV" name="Body"/></message>
        the soap:Body element. The name of the top-level element (the one directly under the soap:Body element)
+
   <message name="QUPC_IN043200UV_Message"><part element="hl7:QUPC_IN043200UV" name="Body"/></message>
        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">
 
    <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">
 
   <message name="QUQI_IN000003UV01_Message">
 
     <part element="hl7:QUQI_IN000003UV01" name="Body"/>
 
     <part element="hl7:QUQI_IN000003UV01" name="Body"/>
 
   </message>
 
   </message>
 
+
<portType name="ACTOR_PortType">
 
+
<operation name="ACTOR_QUPC_IN043100UV">
  <portType name="ACTOR_PortType">
+
<input message="tns:QUPC_IN043100UV_Message" wsaw:Action="urn:hl7-org:v3:QUPC_IN043100UV"/>
    <!-- Send Message with Immediate Response (CP002): this communication maps to a Request/Response MEP.
+
<output message="tns:QUPC_IN043200UV_Message" wsaw:Action="urn:hl7-org:v3:QUPC_IN043200UV "/>
          The request and response messages can be correlated both at the Messaging Infrastructure layer and at the application level.
+
</operation>
    -->
+
<operation name="ACTOR_QUQI_IN000003UV01_Continue">
    <!-- Rather than using {NAME}_{Interaction Artifact Id}, we are using human readable names for the operations.  These
+
<input message="tns:QUQI_IN000003UV01_Message"  
          human readable names are derived from the HL7 names for the message. -->
+
wsaw:Action="urn:hl7-org:v3:QUQI_IN000003UV01_Continue"/>
    <operation name="ACTOR_QUPC_IN043100UV">
+
<output message="tns:QUPC_IN043200UV_Message"  
      <input message="hl7:QUPC_IN043100UV_Message" wsa:Action="urn:hl7-org:v3:GetCareRecordProfileQuery"/>
+
wsaw:Action="urn:hl7-org:v3:QUPC_IN043200UV "/>
      <output message="hl7:QUPC_IN043200UV_Message" wsa:Action="urn:hl7-org:v3:GetCareRecordProfileQueryResponse"/>
+
</operation>
    </operation>
+
<operation name="ACTOR_QUQI_IN000003UV01_Cancel">
    <operation name="ACTOR_QUQI_IN000003UV01">
+
<input message="tns:QUQI_IN000003UV01_Message"  
      <input message="hl7:QUQI_IN000003UV01_Message" wsa:Action="urn:hl7-org:v3:GeneralQueryActivateQueryContinue"/>
+
wsaw:Action="urn:hl7-org:v3:QUQI_IN000003UV01_Cancel"/>
      <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>
  </portType>
+
</portType>
 
+
<binding name="ACTOR_Binding_Soap12"  
  <binding name="ACTOR_Binding" type="hl7:ACTOR_PortType">
+
type="ACTOR_PortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
<wsoap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <!-- Vitals -->
+
<operation name="ACTOR_QUPC_IN043100UV">
    <operation name="ACTOR_QUPC_IN043100UV">
+
<wsoap12:operation soapAction="urn:hl7-org:v3:QUPC_IN043100UV"/>
      <soap:operation soapAction="urn:hl7-org:v3:GetCareRecordProfileQueryQuery"/>
+
<input><wsoap12:body use="literal"/></input>
      <input>
+
<output><wsoap12:body use="literal"/></output>
        <soap:body use="literal"/>
+
</operation>
      </input>
+
<operation name="ACTOR_QUQI_IN000003UV01_Continue">
      <output>
+
<wsoap12:operation soapAction="urn:hl7-org:v3:QUQI_IN000003UV01"/>
        <soap:body use="literal"/>
+
<input><wsoap12:body use="literal"/></input>
      </output>
+
<output><wsoap12:body use="literal"/></output>
    </operation>
+
</operation>
    <operation name="ACTOR_QUQI_IN000003UV01">
+
<operation name="ACTOR_QUQI_IN000003UV01_Cancel">
      <soap:operation soapAction="urn:hl7-org:v3:GeneralQueryActivateQueryContinue"/>
+
<wsoap12:operation soapAction="urn:hl7-org:v3:QUQI_IN000003UV01"/>
      <input>
+
<input><wsoap12:body use="literal"/></input>
        <soap:body use="literal"/>
+
<output><wsoap12:body use="literal"/></output>
      </input>
+
</operation>
      <output>
+
</binding>
        <soap:body use="literal"/>
+
<binding name="ACTOR_Binding_Soap11"
      </output>
+
type="ACTOR_PortType">
    </operation>
+
<wsoap11:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  </binding>
+
<operation name="ACTOR_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="ACTOR_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="ACTOR_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="ACTOR_Service">
 
   <service name="ACTOR_Service">
     <port binding="hl7:ACTOR_Binding" name="ACTOR_Port">
+
     <port binding="tns:ACTOR_Binding_Soap11" name="ACTOR_Port">
       <soap:address location="http://servicelocation/"/>
+
       <wsoap11:address location="http://servicelocation/"/>
 +
    </port>
 +
    <port binding="tns:ACTOR_Binding_Soap12" name="ACTOR_Port">
 +
      <wsoap12:address location="http://servicelocation/"/>
 
     </port>
 
     </port>
 
   </service>
 
   </service>
Line 120: Line 120:
 
</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 here]
+
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]

Revision as of 11:39, 5 September 2007

Appendix E - WSDLs for QED

The WSDL for QED transactions PCC-1, PCC-2, PCC-3, PCC-4, PCC-5 and PCC-6 are identical except for the actor name. Simply substitute one the following values for the string ACTOR in the following WSDL example.

Transaction Actor Name
PCC-1 VitalSignsDataRepository
PCC-2 ProblemAndAllergyDataRepository
PCC-3 DiagnosticDataRepository
PCC-4 MedicationDataRepository
PCC-5 ImmunizationDataRepository
PCC-5 ProfessionalServicesDataRepository

These WSDLs are represent interface contracts for the QED profile. Conformance to these contracts is a requirement of the profile. However, the WSDLs representing the these contracts are 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="ACTOR" 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:import schemaLocation="QUPC_IN043100UV.xsd"/>
		  <xsd:element name="QUPC_IN043100UV"/>
    </xsd:schema>
    <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3">
      <!-- Query Care Record Event Profile Query Response -->
      <xsd:import schemaLocation="QUPC_IN043200UV.xsd"/>
		  <xsd:element name="QUPC_IN043200UV"/>
    </xsd:schema>
    <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3">
      <!-- General Query Activate Query Continue / Cancel -->
      <xsd:import schemaLocation="QUQI_IN000003UV01.xsd"/>
		  <xsd:element name="QUQI_IN000003UV01"/>
    </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="ACTOR_PortType">
 		<operation name="ACTOR_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="ACTOR_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="ACTOR_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="ACTOR_Binding_Soap12" 
		type="ACTOR_PortType">
		<wsoap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
		<operation name="ACTOR_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="ACTOR_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="ACTOR_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="ACTOR_Binding_Soap11" 
		type="ACTOR_PortType">
		<wsoap11:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
		<operation name="ACTOR_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="ACTOR_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="ACTOR_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="ACTOR_Service">
    <port binding="tns:ACTOR_Binding_Soap11" name="ACTOR_Port">
      <wsoap11:address location="http://servicelocation/"/>
    </port>
    <port binding="tns:ACTOR_Binding_Soap12" name="ACTOR_Port">
      <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]