Class EbicsXmlFactory

java.lang.Object
org.kopi.ebics.xml.EbicsXmlFactory

public final class EbicsXmlFactory extends Object
A factory to produce XML object for EBICS requests. This factory is based on xmlbeans object generated from EBICS XML schemas.
See Also:
  • XmlObject
  • Method Details

    • createSignedInfoDocument

      public static SignedInfoDocument createSignedInfoDocument(SignedInfoType signedInfo)
      Creates a new SignedInfoDocument XML object
      Parameters:
      signedInfo - the SignedInfoType element
      Returns:
      the SignedInfoDocument XML object
    • createSignatureType

      public static SignatureType createSignatureType(SignedInfoType signedInfo)
      Creates a new SignatureType XML object
      Parameters:
      signedInfo - the SignedInfoType element
      Returns:
      the SignatureType XML object
    • createSignedInfoType

      public static SignedInfoType createSignedInfoType(CanonicalizationMethodType canonicalizationMethod, SignatureMethodType signatureMethod, ReferenceType[] referenceArray)
      Creates a new SignedInfoType XML object
      Parameters:
      canonicalizationMethod - the CanonicalizationMethod element
      signatureMethod - the SignatureMethod element
      referenceArray - the ReferenceType array element
      Returns:
      the SignedInfoType XML object
    • createSignatureValueType

      public static SignatureValueType createSignatureValueType(byte[] signatureValue)
      Creates a new SignatureValueType XML object
      Parameters:
      signatureValue - the SignatureMethod element
      Returns:
      the SignatureValueType XML object
    • createSignatureMethodType

      public static SignatureMethodType createSignatureMethodType(String algorithm)
      Creates a new SignatureValueType XML object
      Parameters:
      algorithm - the signature algorithm
      Returns:
      the SignatureValueType XML object
    • createCanonicalizationMethodType

      public static CanonicalizationMethodType createCanonicalizationMethodType(String algorithm)
      Creates a new CanonicalizationMethodType XML object
      Parameters:
      algorithm - the canonicalization algorithm
      Returns:
      the CanonicalizationMethodType XML object
    • createReferenceType

      public static ReferenceType createReferenceType(String uri, TransformsType transforms, DigestMethodType digestMethod, byte[] digestValue)
      Creates a new ReferenceType XML object
      Parameters:
      uri - the reference uri
      transforms - the TransformsType element
      digestMethod - the DigestMethodType element
      digestValue - the digest value
      Returns:
      the ReferenceType XML object
    • createTransformsType

      public static TransformsType createTransformsType(TransformType[] transformArray)
      Creates a new TransformsType XML object
      Parameters:
      transformArray - the TransformsType array element
      Returns:
      the TransformsType XML object
    • createTransformType

      public static TransformType createTransformType(String algorithm)
      Creates a new TransformType XML object
      Parameters:
      algorithm - the transformation algorithm
      Returns:
      the TransformType XML object
    • createDigestMethodType

      public static DigestMethodType createDigestMethodType(String algorithm)
      Creates a new DigestMethodType XML object
      Parameters:
      algorithm - the digest method algorithm
      Returns:
      the DigestMethodType XML object
    • createUserSignatureDataDocument

      public static UserSignatureDataDocument createUserSignatureDataDocument(UserSignatureDataSigBookType userSignatureData)
      Creates a new UserSignatureDataDocument XML object
      Parameters:
      userSignatureData - the UserSignatureDataSigBookType element
      Returns:
      the UserSignatureDataDocument XML object
    • createUserSignatureDataSigBookType

      public static UserSignatureDataSigBookType createUserSignatureDataSigBookType(OrderSignatureDataType[] orderSignatureDataArray)
      Creates a new UserSignatureDataSigBookType XML object
      Parameters:
      orderSignatureDataArray - the OrderSignatureDataType array element
      Returns:
      the UserSignatureDataSigBookType XML object
    • createOrderSignatureDataType

      public static OrderSignatureDataType createOrderSignatureDataType(String signatureVersion, String partnerID, String userID, byte[] signatureValue)
      Creates a new OrderSignatureDataType XML object
      Parameters:
      signatureVersion - the signature version
      partnerID - the partner id
      userID - the user id
      signatureValue - the signature value
      Returns:
      the OrderSignatureDataType XML object
    • createSignaturePubKeyOrderDataDocument

      public static SignaturePubKeyOrderDataDocument createSignaturePubKeyOrderDataDocument(SignaturePubKeyOrderDataType signaturePubKeyOrderData)
      Creates a new SignaturePubKeyOrderDataDocument XML object
      Parameters:
      signaturePubKeyOrderData - the SignaturePubKeyOrderDataType element
      Returns:
      the SignaturePubKeyOrderDataDocument XML object
    • createSignaturePubKeyOrderData

      public static SignaturePubKeyOrderDataType createSignaturePubKeyOrderData(SignaturePubKeyInfoType signaturePubKeyInfo, String partnerId, String userId)
      Creates a new SignaturePubKeyOrderDataType XML object
      Parameters:
      signaturePubKeyInfo - the SignaturePubKeyInfoType element
      partnerId - the partner ID
      userId - the user ID
      Returns:
      the SignaturePubKeyOrderDataType XML object
    • createSignaturePubKeyInfoType

      public static SignaturePubKeyInfoType createSignaturePubKeyInfoType(X509DataType x509Data, KeyValueType keyValueType, String signatureVersion)
      Creates a new SignaturePubKeyInfoType XML object
      Parameters:
      x509Data - the X509DataType element
      signatureVersion - the signature version
      pubKeyValue - PubKeyValueType element
      Returns:
      the SignaturePubKeyInfoType XML object
    • createX509DataType

      public static X509DataType createX509DataType(String x509SubjectName, byte[] x509Certificate)
      Creates a new X509DataType XML object
      Parameters:
      x509SubjectName - the subject name
      x509Certificate - the certificate
      Returns:
      the X509DataType XML object
    • createRSAKeyValueType

      public static RSAKeyValueType createRSAKeyValueType(byte[] exponent, byte[] modulus)
      Creates a new RSAKeyValueType XML object
      Parameters:
      exponent - the public exponent of the public key
      modulus - the modulus of the public key
      Returns:
      the RSAKeyValueType XML object
    • createEbicsUnsecuredRequestDocument

      public static EbicsUnsecuredRequestDocument createEbicsUnsecuredRequestDocument(EbicsUnsecuredRequestDocument.EbicsUnsecuredRequest ebicsUnsecuredRequest)
      Creates a new EbicsUnsecuredRequestDocument XML object
      Parameters:
      ebicsUnsecuredRequest - the EbicsUnsecuredRequest element
      Returns:
      the EbicsUnsecuredRequestDocument XML object
    • createEbicsUnsecuredRequest

      Creates a new EbicsUnsecuredRequest XML object
      Parameters:
      header - the Header element
      body - the Body element
      revision - the current revision
      version - the current version
      Returns:
      the EbicsUnsecuredRequest XML object
    • createHeader

      Creates a new Header XML object
      Parameters:
      authenticate - should authenticate?
      mutable - the EmptyMutableHeaderType element
      xstatic - the UnsecuredRequestStaticHeaderType element
      Returns:
      the Header XML object
    • createEmptyMutableHeaderType

      public static EmptyMutableHeaderType createEmptyMutableHeaderType()
      Creates a new EmptyMutableHeaderType XML object
      Returns:
      the EmptyMutableHeaderType XML object
    • createUnsecuredRequestStaticHeaderType

      public static UnsecuredRequestStaticHeaderType createUnsecuredRequestStaticHeaderType(String hostId, String partnerId, String userId, ProductElementType product, OrderDetailsType orderDetails, String securityMedium)
      Creates a new EmptyMutableHeaderType XML object
      Parameters:
      hostId - the host ID
      partnerId - the partner ID
      userId - the user ID
      product - the ProductElementType element
      orderDetails - the OrderDetailsType element
      securityMedium - the security medium
      Returns:
      the EmptyMutableHeaderType XML object
    • creatProductElementType

      public static ProductElementType creatProductElementType(String language, String product)
      Creates a new ProductElementType XML object
      Parameters:
      language - the language
      product - the product name
      Returns:
      the ProductElementType XML object
    • createOrderDetailsType

      public static OrderDetailsType createOrderDetailsType(String orderType)
      Creates a new OrderDetailsType XML object
      Parameters:
      orderType - the order type
      Returns:
      the OrderDetailsType XML object
    • createBody

      Creates a new Body XML object
      Parameters:
      dataTransfer - the DataTransfer element
      Returns:
      the Body XML object
    • createDataTransfer

      Creates a new DataTransfer XML object
      Parameters:
      orderData - the OrderData element
      Returns:
      the DataTransfer XML object
    • createOrderData

      Creates a new OrderData XML object
      Parameters:
      orderData - the order data as byte array
      Returns:
      the OrderData XML object
    • createHIARequestOrderDataDocument

      public static HIARequestOrderDataDocument createHIARequestOrderDataDocument(HIARequestOrderDataType hiaRequestOrderData)
      Creates a new HIARequestOrderDataDocument XML object
      Parameters:
      hiaRequestOrderData - the HIARequestOrderDataType element
      Returns:
      the HIARequestOrderDataDocument XML object
    • createHIARequestOrderDataType

      public static HIARequestOrderDataType createHIARequestOrderDataType(AuthenticationPubKeyInfoType authenticationPubKeyInfo, EncryptionPubKeyInfoType encryptionPubKeyInfo, String partnerId, String userId)
      Creates a new HIARequestOrderDataType XML object
      Parameters:
      authenticationPubKeyInfo - the AuthenticationPubKeyInfoType element
      encryptionPubKeyInfo - the EncryptionPubKeyInfoType element
      partnerId - the partner ID
      userId - the user ID
      Returns:
      the HIARequestOrderDataType XML object
    • createAuthenticationPubKeyInfoType

      public static AuthenticationPubKeyInfoType createAuthenticationPubKeyInfoType(String authenticationVersion, X509DataType x509Data)
      Creates a new AuthenticationPubKeyInfoType XML object
      Parameters:
      authenticationVersion - the authentication version //@param pubKeyValue the PubKeyValueType element
      x509Data - the X509DataType element
      Returns:
      the AuthenticationPubKeyInfoType XML object
    • createEbicsNoPubKeyDigestsRequest

      Creates a new EbicsNoPubKeyDigestsRequest XML object
      Parameters:
      revision - the default revision
      version - the default version
      header - the EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Header element
      body - the EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Body element
      Returns:
      the EbicsNoPubKeyDigestsRequest XML object
    • createDigestsRequestHeader

      public static EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Header createDigestsRequestHeader(boolean authenticate, EmptyMutableHeaderType mutable, NoPubKeyDigestsRequestStaticHeaderType xstatic)
      Creates a new EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Header XML object
      Parameters:
      authenticate - should authenticate?
      mutable - the EmptyMutableHeaderType element
      xstatic - the NoPubKeyDigestsRequestStaticHeaderType element
      Returns:
      the EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Header XML object
    • createNoPubKeyDigestsRequestStaticHeaderType

      public static NoPubKeyDigestsRequestStaticHeaderType createNoPubKeyDigestsRequestStaticHeaderType(String hostId, byte[] nonce, Calendar timestamp, String partnerId, String userId, ProductElementType product, OrderDetailsType orderDetails, String securityMedium)
      Creates a new NoPubKeyDigestsRequestStaticHeaderType XML object
      Parameters:
      hostId - the host ID
      nonce - a random nonce
      timestamp - the current time stamp
      partnerId - the partner ID
      userId - the user ID
      product - the ProductElementType element
      orderDetails - the OrderDetailsType element
      securityMedium - the user security medium
      Returns:
      NoPubKeyDigestsRequestStaticHeaderType
    • createDigestsRequestBody

      Creates a new EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Body XML object
      Returns:
      the EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest.Body XML object
    • createEbicsNoPubKeyDigestsRequestDocument

      public static EbicsNoPubKeyDigestsRequestDocument createEbicsNoPubKeyDigestsRequestDocument(EbicsNoPubKeyDigestsRequestDocument.EbicsNoPubKeyDigestsRequest ebicsNoPubKeyDigestsRequest)
      Creates a new EbicsNoPubKeyDigestsRequestDocument XML object
      Parameters:
      ebicsNoPubKeyDigestsRequest - the EbicsNoPubKeyDigestsRequest element
      Returns:
      the EbicsNoPubKeyDigestsRequestDocument XML object
    • createEbicsRequestDocument

      public static EbicsRequestDocument createEbicsRequestDocument(EbicsRequestDocument.EbicsRequest ebicsRequest)
      Creates a new EbicsRequestDocument XML object
      Parameters:
      ebicsRequest - the EbicsRequest element
      Returns:
      the EbicsRequestDocument XML object
    • createEbicsRequest

      public static EbicsRequestDocument.EbicsRequest createEbicsRequest(int revision, String version, EbicsRequestDocument.EbicsRequest.Header header, EbicsRequestDocument.EbicsRequest.Body body)
      Creates a new EbicsRequest XML object
      Parameters:
      revision - the default revision
      version - the default version
      header - the EbicsRequestDocument.EbicsRequest.Header element
      body - the EbicsRequestDocument.EbicsRequest.Body element
      Returns:
      the EbicsRequest XML object
    • createEbicsRequestHeader

      public static EbicsRequestDocument.EbicsRequest.Header createEbicsRequestHeader(boolean authenticate, MutableHeaderType mutable, StaticHeaderType xstatic)
      Creates a new EbicsRequestDocument.EbicsRequest.Header XML object
      Parameters:
      authenticate - should authenticate?
      mutable - the MutableHeaderType element
      xstatic - the StaticHeaderType element
      Returns:
      the EbicsRequestDocument.EbicsRequest.Header XML object
    • createMutableHeaderType

      public static MutableHeaderType createMutableHeaderType(String transactionPhase, MutableHeaderType.SegmentNumber segmentNumber)
      Creates a new MutableHeaderType XML object
      Parameters:
      transactionPhase - the transaction phase
      segmentNumber - the SegmentNumber element
      Returns:
      the MutableHeaderType XML object
    • createSegmentNumber

      public static MutableHeaderType.SegmentNumber createSegmentNumber(long segmentNumber, boolean lastSegment)
      Creates a new SegmentNumber XML object
      Parameters:
      segmentNumber - the segment number
      lastSegment - is the last segment?
      Returns:
      the SegmentNumber XML object
    • createStaticHeaderType

      public static StaticHeaderType createStaticHeaderType(String hostId, byte[] nonce, int numSegments, String partnerId, StaticHeaderType.Product product, String securityMedium, String userId, Calendar timestamp, StaticHeaderOrderDetailsType orderDetails, StaticHeaderType.BankPubKeyDigests bankPubKeyDigests)
      Creates a new StaticHeaderType XML object
      Parameters:
      hostId - the host ID
      nonce - the random nonce
      numSegments - the segments number
      partnerId - the partner ID
      product - the Product element
      securityMedium - the security medium
      userId - the user Id
      timestamp - the current time stamp
      orderDetails - the StaticHeaderOrderDetailsType element
      bankPubKeyDigests - the BankPubKeyDigests element
      Returns:
      the StaticHeaderType XML object
    • createStaticHeaderType

      public static StaticHeaderType createStaticHeaderType(String hostId, byte[] nonce, String partnerId, StaticHeaderType.Product product, String securityMedium, String userId, Calendar timestamp, StaticHeaderOrderDetailsType orderDetails, StaticHeaderType.BankPubKeyDigests bankPubKeyDigests)
      Creates a new StaticHeaderType XML object
      Parameters:
      hostId - the host ID
      nonce - the random nonce
      partnerId - the partner ID
      product - the Product element
      securityMedium - the security medium
      userId - the user Id
      timestamp - the current time stamp
      orderDetails - the StaticHeaderOrderDetailsType element
      bankPubKeyDigests - the BankPubKeyDigests element
      Returns:
      the StaticHeaderType XML object
    • createStaticHeaderOrderDetailsType

      public static StaticHeaderOrderDetailsType createStaticHeaderOrderDetailsType(String orderId, StaticHeaderOrderDetailsType.AdminOrderType orderType, org.apache.xmlbeans.XmlObject orderParams, org.apache.xmlbeans.SchemaType orderParamsType)
    • createBTUParams

      public static BTUParamsType createBTUParams(String serviceName, String scope, String option, String messageName, String messageVersion, boolean signatureFlag)
    • createBTDParams

      public static BTDParamsType createBTDParams(String serviceName, String scope, String option, String messageName, String messageVersion, String containerType, LocalDate start, LocalDate end)
      Creates the order parameters of an EBICS 3.0 (H005) BTD download order.
      Parameters:
      serviceName - the BTF service code, e.g. EOP
      scope - the rule scope, e.g. CH; may be null
      option - the service option; may be null
      messageName - the message name, e.g. camt.053
      messageVersion - the message version, e.g. 08
      containerType - the container type (XML, ZIP or SVC); may be null
      start - the first calendar day of the requested report period; may be null
      end - the last calendar day of the requested report period; may be null
      Returns:
      the BTDParamsType XML object
    • createStandardOrderParamsType

      public static StandardOrderParamsType createStandardOrderParamsType()
      Creates a new StandardOrderParamsType XML object
      Returns:
      the StandardOrderParamsType XML object
    • createDateRange

      public static StandardOrderParamsType.DateRange createDateRange(Date start, Date end)
      Creates a new DateRange XML object.

      A Date is an instant, the EBICS date range is a pair of calendar days. The calendar day is therefore taken in the timezone of the machine running this code: a Date at UTC midnight becomes the previous day in any zone west of UTC. Prefer createDateRange(LocalDate, LocalDate) — that overload has no timezone in it.

      Parameters:
      start - the start range
      end - the end range
      Returns:
      the DateRange XML object
    • createDateRange

      public static StandardOrderParamsType.DateRange createDateRange(LocalDate start, LocalDate end)
      Creates a new DateRange XML object from two calendar days.
      Parameters:
      start - the first day of the range
      end - the last day of the range
      Returns:
      the DateRange XML object
    • toLocalDate

      public static LocalDate toLocalDate(Date date)
      Reads the calendar day out of an instant, in the timezone of this machine. Only for the Date-based compatibility overloads; anything new should carry a LocalDate.
    • createParameter

      public static ParameterDocument.Parameter createParameter(String name, ParameterDocument.Parameter.Value value)
      Creates a new Parameter XML object
      Parameters:
      name - the parameter name
      value - the parameter value
      Returns:
      the Parameter XML object
    • createValue

      public static ParameterDocument.Parameter.Value createValue(String type, String value)
      Creates a new Value XML object
      Parameters:
      type - the value type
      value - the value
      Returns:
      the Value XML object
    • createProduct

      public static StaticHeaderType.Product createProduct(String language, String value)
      Create the Product XML object
      Parameters:
      language - the product language
      value - the product value
      Returns:
      the Product XML object
    • createBankPubKeyDigests

      Create the BankPubKeyDigests XML object
      Parameters:
      authentication - the Authentication element
      encryption - the Encryption element
      Returns:
      the BankPubKeyDigests XML object
    • createAuthentication

      public static StaticHeaderType.BankPubKeyDigests.Authentication createAuthentication(String version, String algorithm, byte[] value)
      Create the Authentication XML object
      Parameters:
      version - the authentication version
      algorithm - the authentication algorithm
      value - the authentication value
      Returns:
      the Authentication XML object
    • createEncryption

      public static StaticHeaderType.BankPubKeyDigests.Encryption createEncryption(String version, String algorithm, byte[] value)
      Create the Encryption XML object
      Parameters:
      version - the encryption version
      algorithm - the encryption algorithm
      value - the encryption value
      Returns:
      the Encryption XML object
    • createEbicsRequestBody

      public static EbicsRequestDocument.EbicsRequest.Body createEbicsRequestBody(DataTransferRequestType dataTransfer)
      Create the EbicsRequestDocument.EbicsRequest.Body XML object
      Parameters:
      dataTransfer - the DataTransferRequestType element
      Returns:
      the EbicsRequestDocument.EbicsRequest.Body XML object
    • createEbicsRequestBody

      public static EbicsRequestDocument.EbicsRequest.Body createEbicsRequestBody()
      Create the EbicsRequestDocument.EbicsRequest.Body XML object
      Returns:
      the EbicsRequestDocument.EbicsRequest.Body XML object
    • createEbicsRequestBody

      Create the EbicsRequestDocument.EbicsRequest.Body XML object
      Parameters:
      transferReceipt - the TransferReceipt element
      Returns:
      the EbicsRequestDocument.EbicsRequest.Body XML object
    • createDataTransferRequestType

      public static DataTransferRequestType createDataTransferRequestType(DataTransferRequestType.DataEncryptionInfo dataEncryptionInfo, DataTransferRequestType.SignatureData signatureData, String digestValue)
      Create the DataTransferRequestType XML object
      Parameters:
      dataEncryptionInfo - the DataEncryptionInfo element
      signatureData - the SignatureData element
      Returns:
      the DataTransferRequestType XML object
    • createStaticHeaderType

      public static StaticHeaderType createStaticHeaderType(String hostId, byte[] transactionId)
      Create the StaticHeaderType XML object
      Parameters:
      hostId - the host ID
      transactionId - the transaction ID
      Returns:
      the StaticHeaderType XML object
    • createDataTransferRequestType

      public static DataTransferRequestType createDataTransferRequestType(DataTransferRequestType.OrderData orderData)
      Create the DataTransferRequestType XML object
      Parameters:
      orderData - the DataTransferRequestType.OrderData element
      Returns:
      the DataTransferRequestType XML object
    • createTransferRequestTypeOrderData

      public static DataTransferRequestType.OrderData createTransferRequestTypeOrderData(byte[] orderDataValue)
      Create the DataTransferRequestType.OrderData XML object
      Parameters:
      orderDataValue - the order data value
      Returns:
      the DataTransferRequestType.OrderData XML object
    • createDataEncryptionInfo

      public static DataTransferRequestType.DataEncryptionInfo createDataEncryptionInfo(boolean authenticate, DataEncryptionInfoType.EncryptionPubKeyDigest encryptionPubKeyDigest, byte[] transactionKey)
      Create the DataEncryptionInfo XML object
      Parameters:
      authenticate - should authenticate?
      encryptionPubKeyDigest - the EncryptionPubKeyDigest element
      transactionKey - the transaction key
      Returns:
      the the DataEncryptionInfo XML object
    • createEncryptionPubKeyDigest

      public static DataEncryptionInfoType.EncryptionPubKeyDigest createEncryptionPubKeyDigest(String version, String algorithm, byte[] value)
      Create the EncryptionPubKeyDigest XML object
      Parameters:
      version - the encryption version
      algorithm - the encryption algorithm
      value - the encryption value
      Returns:
      the EncryptionPubKeyDigest XML object
    • createEbicsRequestOrderData

      public static DataTransferRequestType.OrderData createEbicsRequestOrderData(byte[] oderData)
      Create the DataTransferRequestType.OrderData XML object
      Parameters:
      oderData - the order data value
      Returns:
      the the DataTransferRequestType.OrderData XML object
    • createSignatureData

      public static DataTransferRequestType.SignatureData createSignatureData(boolean authenticate, byte[] signatureData)
      Create the SignatureData XML object
      Parameters:
      authenticate - should authenticate?
      signatureData - the signature data value
      Returns:
      the SignatureData XML object
    • createTransferReceipt

      public static EbicsRequestDocument.EbicsRequest.Body.TransferReceipt createTransferReceipt(boolean authenticate, int receiptCode)
      Create the TransferReceipt XML object
      Parameters:
      authenticate - should authenticate?
      receiptCode - the receipt code
      Returns:
      the TransferReceipt XML object
    • qualifySubstitutionGroup

      public static org.apache.xmlbeans.XmlObject qualifySubstitutionGroup(org.apache.xmlbeans.XmlObject xobj, QName newInstance, org.apache.xmlbeans.SchemaType newType)
      Qualifies a valid member of a substitution group. This method tries to use the built-in XmlObject.substitute(QName, SchemaType) and if succesful returns a valid substitution which is usable (not disconnected). If it fails, it uses low-level XmlCursor manipulation to qualify the substitution group. Note that if the latter is the case the resulting document is disconnected and should no longer be manipulated. Thus, use it as a final step after all markup is included.

      If newType is null, this method will skip XmlObject.substitute(QName, SchemaType) and directly use XmlCursor. This can be used, if you are sure that the substitute is not in the list of (pre-compiled) valid substitutions (this is the case if a schema uses another schema's type as a base for elements. E.g. om:Observation uses gml:_Feature as the base type).

      Parameters:
      xobj - the abstract element
      newInstance - the new QName of the instance
      newType - the new schemaType. if null, cursors will be used and the resulting object will be disconnected.
      Returns:
      if successful applied XmlObject.substitute(QName, SchemaType) a living object with a type == newType is returned. Otherwise null is returned as you can no longer manipulate the object.
    • createKeyValueType

      public static KeyValueType createKeyValueType(RSAKeyValueType encryptionRsaKeyValue)
    • createPubKeyInfoType

      public static PubKeyInfoType createPubKeyInfoType(X509DataType encryptionX509Data)
    • createEncryptionPubKeyInfoType

      public static EncryptionPubKeyInfoType createEncryptionPubKeyInfoType(String encryptionVersion, X509DataType encryptionX509Data)