1 Reply Latest reply on Feb 4, 2009 8:58 AM by mfueser

    MTOM enabled webservice, no access to base64 fields / not ma

    mfueser

      Hi!

      I am building an MTOM enabled Webservice. A client sends in SOAP with MTOM enabled. The Mapping to the XML structures is working so far, but I dot have access to the "document"-tag part of the message. The resulting document list is always empty.

      This is a message sent by the client:

      -MIMEBoundaryurn_uuid_3B788247A69DDDCBAE1233055309739
      Content-Type:
      application/xop+xml; charset=UTF-8; type="application/soap+xml"
      Content-Transfer-Encoding: binary
      Content-ID: <0.urn:uuid:3B788247A69DDDCBAE1233055309740@apache.org>
      
      <?xml version='1.0' encoding='UTF-8'?>
      <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
       xmlns:wsa="http://www.w3.org/2005/08/addressing">
       <soapenv:Header>
       <wsa:To>http://localhost:8888/Repository/Repository
       </wsa:To>
       <wsa:MessageID>urn:uuid:3B788247A69DDDCBAE1233055309629
       </wsa:MessageID>
       <wsa:Action>urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b
       </wsa:Action>
       </soapenv:Header>
       <soapenv:Body>
       <xdsb:ProvideAndRegisterDocumentSetRequest
       xmlns:xdsb="urn:ihe:iti:xds-b:2007">
       <lcm:SubmitObjectsRequest
       xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0">
       <rim:RegistryObjectList
       xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">
       <rim:ExtrinsicObject id="Document01" mimeType="text/plain"
       objectType="urn:uuid:7edca82f-054d-47f2-a032-9b2a5b5186c1">
       <rim:Slot name="creationTime">
       <rim:ValueList>
       <rim:Value>20051224</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Slot name="languageCode">
       <rim:ValueList>
       <rim:Value>en-us</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Slot name="serviceStartTime">
       <rim:ValueList>
       <rim:Value>200412230800</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Slot name="serviceStopTime">
       <rim:ValueList>
       <rim:Value>200412230801</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Slot name="sourcePatientId">
       <rim:ValueList>
       <rim:Value>89765a87b^^^fj34r</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Slot name="sourcePatientInfo">
       <rim:ValueList>
       <rim:Value>PID-3|pid1^^^domain</rim:Value>
       <rim:Value>PID-5|Doe^John^^^</rim:Value>
       <rim:Value>PID-7|19560527</rim:Value>
       <rim:Value>PID-8|M</rim:Value>
       <rim:Value>PID-11|100 Main St^^Metropolis^Il^44130^USA
       </rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Name>
       <rim:LocalizedString value="Physical"></rim:LocalizedString>
       </rim:Name>
       <rim:Description></rim:Description>
       <rim:Classification
       classificationScheme="urn:uuid:93606bcf-9494-43ec-9b4e-a7748d1a838d"
       classifiedObject="Document01" nodeRepresentation=""
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Classification"
       id="id_1">
       <rim:Slot name="authorPerson">
       <rim:ValueList>
       <rim:Value>^Smitty^Gerald^^^</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Slot name="authorInstitution">
       <rim:ValueList>
       <rim:Value>Cleveland Clinic</rim:Value>
       <rim:Value>Parma Community</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Slot name="authorRole">
       <rim:ValueList>
       <rim:Value>Attending</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Slot name="authorSpecialty">
       <rim:ValueList>
       <rim:Value>Orthopedic</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       </rim:Classification>
       <rim:Classification
       classificationScheme="urn:uuid:93606bcf-9494-43ec-9b4e-a7748d1a838d"
       classifiedObject="Document01" nodeRepresentation=""
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Classification"
       id="id_2">
       <rim:Slot name="authorPerson">
       <rim:ValueList>
       <rim:Value>^Dopplemeyer^Sherry^^^
       </rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Slot name="authorInstitution">
       <rim:ValueList>
       <rim:Value>Cleveland Clinic</rim:Value>
       <rim:Value>Berea Community</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Slot name="authorRole">
       <rim:ValueList>
       <rim:Value>Primary Surgon</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Slot name="authorSpecialty">
       <rim:ValueList>
       <rim:Value>Orthopedic</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       </rim:Classification>
       <rim:Classification
       classificationScheme="urn:uuid:41a5887f-8865-4c09-adf7-e362475b143a"
       classifiedObject="Document01" nodeRepresentation="History and Physical"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Classification"
       id="id_3">
       <rim:Slot name="codingScheme">
       <rim:ValueList>
       <rim:Value>Connect-a-thon classCodes</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Name>
       <rim:LocalizedString value="History and Physical"></rim:LocalizedString>
       </rim:Name>
       </rim:Classification>
       <rim:Classification
       classificationScheme="urn:uuid:f4f85eac-e6cb-4883-b524-f2705394840f"
       classifiedObject="Document01" nodeRepresentation="1.3.6.1.4.1.21367.2006.7.101"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Classification"
       id="id_4">
       <rim:Slot name="codingScheme">
       <rim:ValueList>
       <rim:Value>Connect-a-thon confidentialityCodes
       </rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Name>
       <rim:LocalizedString value="Clinical-Staff"></rim:LocalizedString>
       </rim:Name>
       </rim:Classification>
       <rim:Classification
       classificationScheme="urn:uuid:a09d5840-386c-46f2-b5ad-9c3699a4309d"
       classifiedObject="Document01" nodeRepresentation="CDAR2/IHE 1.0"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Classification"
       id="id_5">
       <rim:Slot name="codingScheme">
       <rim:ValueList>
       <rim:Value>Connect-a-thon formatCodes</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Name>
       <rim:LocalizedString value="CDAR2/IHE 1.0"></rim:LocalizedString>
       </rim:Name>
       </rim:Classification>
       <rim:Classification
       classificationScheme="urn:uuid:f33fb8ac-18af-42cc-ae0e-ed0b0bdb91e1"
       classifiedObject="Document01" nodeRepresentation="Outpatient"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Classification"
       id="id_6">
       <rim:Slot name="codingScheme">
       <rim:ValueList>
       <rim:Value>Connect-a-thon
       healthcareFacilityTypeCodes</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Name>
       <rim:LocalizedString value="Outpatient"></rim:LocalizedString>
       </rim:Name>
       </rim:Classification>
       <rim:Classification
       classificationScheme="urn:uuid:cccf5598-8b07-4b77-a05e-ae952c785ead"
       classifiedObject="Document01" nodeRepresentation="General Medicine"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Classification"
       id="id_7">
       <rim:Slot name="codingScheme">
       <rim:ValueList>
       <rim:Value>Connect-a-thon practiceSettingCodes
       </rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Name>
       <rim:LocalizedString value="General Medicine"></rim:LocalizedString>
       </rim:Name>
       </rim:Classification>
       <rim:Classification
       classificationScheme="urn:uuid:f0306f51-975f-434e-a61c-c59651d33983"
       classifiedObject="Document01" nodeRepresentation="34108-1"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Classification"
       id="id_8">
       <rim:Slot name="codingScheme">
       <rim:ValueList>
       <rim:Value>LOINC</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Name>
       <rim:LocalizedString value="Outpatient Evaluation And Management"></rim:LocalizedString>
       </rim:Name>
       </rim:Classification>
       <rim:ExternalIdentifier
       identificationScheme="urn:uuid:58a6f841-87b3-4a3e-92fd-a8ffeff98427"
       value="fca50fea3a5e41a^^^&1.3.6.1.4.1.21367.2005.3.7&ISO"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:ExternalIdentifier"
       id="id_9" registryObject="Document01">
       <rim:Name>
       <rim:LocalizedString value="XDSDocumentEntry.patientId"></rim:LocalizedString>
       </rim:Name>
       </rim:ExternalIdentifier>
       <rim:ExternalIdentifier
       identificationScheme="urn:uuid:2e82c1f6-a085-4c72-9da3-8640a32e42ab"
       value="129.6.58.92.21012357"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:ExternalIdentifier"
       id="id_10" registryObject="Document01">
       <rim:Name>
       <rim:LocalizedString value="XDSDocumentEntry.uniqueId"></rim:LocalizedString>
       </rim:Name>
       </rim:ExternalIdentifier>
       </rim:ExtrinsicObject>
       <rim:RegistryPackage id="SubmissionSet01"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:RegistryPackage">
       <rim:Slot name="submissionTime">
       <rim:ValueList>
       <rim:Value>20041225235050</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Name>
       <rim:LocalizedString value="Physical"></rim:LocalizedString>
       </rim:Name>
       <rim:Description>
       <rim:LocalizedString value="Annual physical"></rim:LocalizedString>
       </rim:Description>
       <rim:Classification
       classificationScheme="urn:uuid:a7058bb9-b4e4-4307-ba5b-e3f0ab85e12d"
       classifiedObject="SubmissionSet01" nodeRepresentation=""
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Classification"
       id="id_11">
       <rim:Slot name="authorPerson">
       <rim:ValueList>
       <rim:Value>^Dopplemeyer^Sherry^^^
       </rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Slot name="authorInstitution">
       <rim:ValueList>
       <rim:Value>Cleveland Clinic</rim:Value>
       <rim:Value>Berea Community</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Slot name="authorRole">
       <rim:ValueList>
       <rim:Value>Primary Surgon</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Slot name="authorSpecialty">
       <rim:ValueList>
       <rim:Value>Orthopedic</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       </rim:Classification>
       <rim:Classification
       classificationScheme="urn:uuid:aa543740-bdda-424e-8c96-df4873be8500"
       classifiedObject="SubmissionSet01" nodeRepresentation="History and Physical"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Classification"
       id="id_12">
       <rim:Slot name="codingScheme">
       <rim:ValueList>
       <rim:Value>Connect-a-thon contentTypeCodes
       </rim:Value>
       </rim:ValueList>
       </rim:Slot>
       <rim:Name>
       <rim:LocalizedString value="History and Physical"></rim:LocalizedString>
       </rim:Name>
       </rim:Classification>
       <rim:ExternalIdentifier
       identificationScheme="urn:uuid:96fdda7c-d067-4183-912e-bf5ee74998a8"
       value="129.6.58.92.21012358"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:ExternalIdentifier"
       id="id_13" registryObject="SubmissionSet01">
       <rim:Name>
       <rim:LocalizedString value="XDSSubmissionSet.uniqueId"></rim:LocalizedString>
       </rim:Name>
       </rim:ExternalIdentifier>
       <rim:ExternalIdentifier
       identificationScheme="urn:uuid:554ac39e-e3fe-47fe-b233-965d2a147832"
       value="1.3.6.1.4.1.21367.2009.1.2.182"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:ExternalIdentifier"
       id="id_14" registryObject="SubmissionSet01">
       <rim:Name>
       <rim:LocalizedString value="XDSSubmissionSet.sourceId"></rim:LocalizedString>
       </rim:Name>
       </rim:ExternalIdentifier>
       <rim:ExternalIdentifier
       identificationScheme="urn:uuid:6b5aea1a-874d-4603-a4bc-96a0a7b38446"
       value="fca50fea3a5e41a^^^&1.3.6.1.4.1.21367.2005.3.7&ISO"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:ExternalIdentifier"
       id="id_15" registryObject="SubmissionSet01">
       <rim:Name>
       <rim:LocalizedString value="XDSSubmissionSet.patientId"></rim:LocalizedString>
       </rim:Name>
       </rim:ExternalIdentifier>
       </rim:RegistryPackage>
       <rim:Classification classifiedObject="SubmissionSet01"
       classificationNode="urn:uuid:a54d6aa5-d40d-43f9-88c5-b4633d873bdd"
       id="ID_27168535_1"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Classification"></rim:Classification>
       <rim:Association
       associationType="urn:oasis:names:tc:ebxml-regrep:AssociationType:HasMember"
       sourceObject="SubmissionSet01" targetObject="Document01" id="ID_27168535_2"
       objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Association">
       <rim:Slot name="SubmissionSetStatus">
       <rim:ValueList>
       <rim:Value>Original</rim:Value>
       </rim:ValueList>
       </rim:Slot>
       </rim:Association>
       </rim:RegistryObjectList>
       </lcm:SubmitObjectsRequest>
       <xdsb:Document id="Document01">
       <xop:Include
       href="cid:1.urn:uuid:3B788247A69DDDCBAE1233055309835@apache.org"
       xmlns:xop="http://www.w3.org/2004/08/xop/include" />
       </xdsb:Document>
       </xdsb:ProvideAndRegisterDocumentSetRequest>
       </soapenv:Body>
      </soapenv:Envelope>
      --MIMEBoundaryurn_uuid_3B788247A69DDDCBAE1233055309739
      Content-Type:
      text/plain
      Content-Transfer-Encoding: binary
      Content-ID: <1.urn:uuid:3B788247A69DDDCBAE1233055309835@apache.org>
      
      This is my document.
      
      It is great!
      
      
      --MIMEBoundaryurn_uuid_3B788247A69DDDCBAE1233055309739--



      Somehow the reference to the Attachment is not working.
      The annotated class with the inner-class "document", generated by wsconsume:
      
      /**
       * <p>Java class for ProvideAndRegisterDocumentSetRequestType complex type.
       *
       * <p>The following schema fragment specifies the expected content contained within this class.
       *
       * <pre>
       * <complexType name="ProvideAndRegisterDocumentSetRequestType">
       * <complexContent>
       * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       * <sequence>
       * <element ref="{urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0}SubmitObjectsRequest"/>
       * <sequence minOccurs="0">
       * <element name="Document" maxOccurs="unbounded">
       * <complexType>
       * <simpleContent>
       * <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
       * <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
       * </extension>
       * </simpleContent>
       * </complexType>
       * </element>
       * </sequence>
       * </sequence>
       * </restriction>
       * </complexContent>
       * </complexType>
       * </pre>
       *
       *
       */
      @XmlAccessorType(XmlAccessType.FIELD)
      @XmlType(name = "ProvideAndRegisterDocumentSetRequestType", propOrder = {
       "submitObjectsRequest",
       "document"
      })
      public class ProvideAndRegisterDocumentSetRequestType {
      
       @XmlElement(name = "SubmitObjectsRequest", namespace = "urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0", required = true)
       protected SubmitObjectsRequest submitObjectsRequest;
       @XmlElement(name = "Document")
       protected List<ProvideAndRegisterDocumentSetRequestType.Document> document;
      
       /**
       * Gets the value of the submitObjectsRequest property.
       *
       * @return
       * possible object is
       * {@link SubmitObjectsRequest }
       *
       */
       public SubmitObjectsRequest getSubmitObjectsRequest() {
       return submitObjectsRequest;
       }
      
       /**
       * Sets the value of the submitObjectsRequest property.
       *
       * @param value
       * allowed object is
       * {@link SubmitObjectsRequest }
       *
       */
       public void setSubmitObjectsRequest(SubmitObjectsRequest value) {
       this.submitObjectsRequest = value;
       }
      
       /**
       * Gets the value of the document property.
       *
       * <p>
       * This accessor method returns a reference to the live list,
       * not a snapshot. Therefore any modification you make to the
       * returned list will be present inside the JAXB object.
       * This is why there is not a <CODE>set</CODE> method for the document property.
       *
       * <p>
       * For example, to add a new item, do as follows:
       * <pre>
       * getDocument().add(newItem);
       * </pre>
       *
       *
       * <p>
       * Objects of the following type(s) are allowed in the list
       * {@link ProvideAndRegisterDocumentSetRequestType.Document }
       *
       *
       */
       public List<ProvideAndRegisterDocumentSetRequestType.Document> getDocument() {
       if (document == null) {
       document = new ArrayList<ProvideAndRegisterDocumentSetRequestType.Document>();
       }
       return this.document;
       }
      
      
       /**
       * <p>Java class for anonymous complex type.
       *
       * <p>The following schema fragment specifies the expected content contained within this class.
       *
       * <pre>
       * <complexType>
       * <simpleContent>
       * <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
       * <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
       * </extension>
       * </simpleContent>
       * </complexType>
       * </pre>
       *
       *
       */
       @XmlAccessorType(XmlAccessType.FIELD)
       @XmlType(name = "", propOrder = {
       "value"
       })
       public static class Document {
      
       @XmlValue
       @XmlMimeType("*/*")
       protected DataHandler value;
       @XmlAttribute(required = true)
       @XmlSchemaType(name = "anyURI")
       protected String id;
      
       /**
       * Gets the value of the value property.
       *
       * @return
       * possible object is
       * {@link DataHandler }
       *
       */
       public DataHandler getValue() {
       return value;
       }
      
       /**
       * Sets the value of the value property.
       *
       * @param value
       * allowed object is
       * {@link DataHandler }
       *
       */
       public void setValue(DataHandler value) {
       this.value = value;
       }
      
       /**
       * Gets the value of the id property.
       *
       * @return
       * possible object is
       * {@link String }
       *
       */
       public String getId() {
       return id;
       }
      
       /**
       * Sets the value of the id property.
       *
       * @param value
       * allowed object is
       * {@link String }
       *
       */
       public void setId(String value) {
       this.id = value;
       }
      
       }
      
      }
      



      A call like:
      body.getDocument().size());
      results in 0 documents.

      I hope the code-tags remain readable.

      Thanks in advance!

      -- Michael