• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java MicroWriter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.helger.xml.microdom.serialize.MicroWriter的典型用法代码示例。如果您正苦于以下问题:Java MicroWriter类的具体用法?Java MicroWriter怎么用?Java MicroWriter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MicroWriter类属于com.helger.xml.microdom.serialize包,在下文中一共展示了MicroWriter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: sendBodyPayloadSignedMessageSuccessful

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Test
public void sendBodyPayloadSignedMessageSuccessful () throws Exception
{
  final AS4ClientUserMessage aClient = _getMandatoryAttributesSuccessMessage ();
  aClient.setPayload (DOMReader.readXMLDOM (new ClassPathResource (AS4TestConstants.TEST_PAYLOAD_XML)));

  // Keystore
  _setKeyStoreTestData (aClient);

  // Sign specific
  aClient.setCryptoAlgorithmSign (ECryptoAlgorithmSign.RSA_SHA_256);
  aClient.setCryptoAlgorithmSignDigest (ECryptoAlgorithmSignDigest.DIGEST_SHA_256);

  final IMicroDocument aDoc = aClient.sendMessageAndGetMicroDocument (SERVER_URL);
  assertTrue (MicroWriter.getNodeAsString (aDoc).contains (AS4TestConstants.RECEIPT_ASSERTCHECK));
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:17,代码来源:AS4ClientUserMessageTest.java


示例2: sendBodyPayloadSignedEncryptedMessageSuccessful

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Test
public void sendBodyPayloadSignedEncryptedMessageSuccessful () throws Exception
{
  final AS4ClientUserMessage aClient = _getMandatoryAttributesSuccessMessage ();
  aClient.setPayload (DOMReader.readXMLDOM (new ClassPathResource (AS4TestConstants.TEST_PAYLOAD_XML)));

  // Keystore
  _setKeyStoreTestData (aClient);

  // Sign specific
  aClient.setCryptoAlgorithmSign (ECryptoAlgorithmSign.RSA_SHA_256);
  aClient.setCryptoAlgorithmSignDigest (ECryptoAlgorithmSignDigest.DIGEST_SHA_256);

  // Encrypt specific
  aClient.setCryptoAlgorithmCrypt (ECryptoAlgorithmCrypt.AES_128_GCM);

  final IMicroDocument aDoc = aClient.sendMessageAndGetMicroDocument (SERVER_URL);
  assertTrue (MicroWriter.getNodeAsString (aDoc).contains (AS4TestConstants.RECEIPT_ASSERTCHECK));
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:20,代码来源:AS4ClientUserMessageTest.java


示例3: sendOneAttachmentSignedMessageSuccessful

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Test
public void sendOneAttachmentSignedMessageSuccessful () throws Exception
{
  final AS4ClientUserMessage aClient = _getMandatoryAttributesSuccessMessage ();
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_SHORTXML_XML).getAsFile (),
                         CMimeType.APPLICATION_XML);

  // Keystore
  _setKeyStoreTestData (aClient);

  // Sign specific
  aClient.setCryptoAlgorithmSign (ECryptoAlgorithmSign.RSA_SHA_256);
  aClient.setCryptoAlgorithmSignDigest (ECryptoAlgorithmSignDigest.DIGEST_SHA_256);

  final IMicroDocument aDoc = aClient.sendMessageAndGetMicroDocument (SERVER_URL);
  assertTrue (MicroWriter.getNodeAsString (aDoc).contains (AS4TestConstants.RECEIPT_ASSERTCHECK));
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:18,代码来源:AS4ClientUserMessageTest.java


示例4: sendOneAttachmentEncryptedMessageSuccessful

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Test
public void sendOneAttachmentEncryptedMessageSuccessful () throws Exception
{
  final AS4ClientUserMessage aClient = _getMandatoryAttributesSuccessMessage ();
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_SHORTXML_XML).getAsFile (),
                         CMimeType.APPLICATION_XML);

  // Keystore
  _setKeyStoreTestData (aClient);

  // Encrypt specific
  aClient.setCryptoAlgorithmCrypt (ECryptoAlgorithmCrypt.AES_128_GCM);

  final IMicroDocument aDoc = aClient.sendMessageAndGetMicroDocument (SERVER_URL);
  s_aLogger.info (MicroWriter.getNodeAsString (aDoc));
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:17,代码来源:AS4ClientUserMessageTest.java


示例5: sendOneAttachmentSignedEncryptedMessageSuccessful

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Test
public void sendOneAttachmentSignedEncryptedMessageSuccessful () throws Exception
{
  final AS4ClientUserMessage aClient = _getMandatoryAttributesSuccessMessage ();
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_SHORTXML_XML).getAsFile (),
                         CMimeType.APPLICATION_XML);

  // Keystore
  _setKeyStoreTestData (aClient);

  // Sign specific
  aClient.setCryptoAlgorithmSign (ECryptoAlgorithmSign.RSA_SHA_256);
  aClient.setCryptoAlgorithmSignDigest (ECryptoAlgorithmSignDigest.DIGEST_SHA_256);

  // Encrypt specific
  aClient.setCryptoAlgorithmCrypt (ECryptoAlgorithmCrypt.AES_128_GCM);

  final IMicroDocument aDoc = aClient.sendMessageAndGetMicroDocument (SERVER_URL);
  assertTrue (MicroWriter.getNodeAsString (aDoc).contains (AS4TestConstants.RECEIPT_ASSERTCHECK));
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:21,代码来源:AS4ClientUserMessageTest.java


示例6: sendManyAttachmentSignedMessageSuccessful

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Test
public void sendManyAttachmentSignedMessageSuccessful () throws Exception
{
  final AS4ClientUserMessage aClient = _getMandatoryAttributesSuccessMessage ();
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_SHORTXML_XML).getAsFile (),
                         CMimeType.APPLICATION_XML);
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_SHORTXML2_XML).getAsFile (),
                         CMimeType.APPLICATION_XML);
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_TEST_IMG_JPG).getAsFile (),
                         CMimeType.IMAGE_JPG);

  // Keystore
  _setKeyStoreTestData (aClient);

  // Sign specific
  aClient.setCryptoAlgorithmSign (ECryptoAlgorithmSign.RSA_SHA_256);
  aClient.setCryptoAlgorithmSignDigest (ECryptoAlgorithmSignDigest.DIGEST_SHA_256);

  final IMicroDocument aDoc = aClient.sendMessageAndGetMicroDocument (SERVER_URL);
  assertTrue (MicroWriter.getNodeAsString (aDoc).contains (AS4TestConstants.RECEIPT_ASSERTCHECK));
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:22,代码来源:AS4ClientUserMessageTest.java


示例7: sendManyAttachmentEncryptedMessageSuccessful

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Test
public void sendManyAttachmentEncryptedMessageSuccessful () throws Exception
{
  final AS4ClientUserMessage aClient = _getMandatoryAttributesSuccessMessage ();
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_SHORTXML_XML).getAsFile (),
                         CMimeType.APPLICATION_XML);
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_SHORTXML2_XML).getAsFile (),
                         CMimeType.APPLICATION_XML);
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_TEST_IMG_JPG).getAsFile (),
                         CMimeType.IMAGE_JPG);

  // Keystore
  _setKeyStoreTestData (aClient);

  // Encrypt specific
  aClient.setCryptoAlgorithmCrypt (ECryptoAlgorithmCrypt.AES_128_GCM);

  final IMicroDocument aDoc = aClient.sendMessageAndGetMicroDocument (SERVER_URL);
  assertTrue (MicroWriter.getNodeAsString (aDoc).contains (AS4TestConstants.RECEIPT_ASSERTCHECK));
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:21,代码来源:AS4ClientUserMessageTest.java


示例8: sendManyAttachmentSignedEncryptedMessageSuccessful

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Test
public void sendManyAttachmentSignedEncryptedMessageSuccessful () throws Exception
{
  final AS4ClientUserMessage aClient = _getMandatoryAttributesSuccessMessage ();
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_SHORTXML_XML).getAsFile (),
                         CMimeType.APPLICATION_XML);
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_SHORTXML2_XML).getAsFile (),
                         CMimeType.APPLICATION_XML);
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_TEST_IMG_JPG).getAsFile (),
                         CMimeType.IMAGE_JPG);

  // Keystore
  _setKeyStoreTestData (aClient);

  // Sign specific
  aClient.setCryptoAlgorithmSign (ECryptoAlgorithmSign.RSA_SHA_256);
  aClient.setCryptoAlgorithmSignDigest (ECryptoAlgorithmSignDigest.DIGEST_SHA_256);

  // Encrypt specific
  aClient.setCryptoAlgorithmCrypt (ECryptoAlgorithmCrypt.AES_128_GCM);

  final IMicroDocument aDoc = aClient.sendMessageAndGetMicroDocument (SERVER_URL);
  assertTrue (MicroWriter.getNodeAsString (aDoc).contains (AS4TestConstants.RECEIPT_ASSERTCHECK));
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:25,代码来源:AS4ClientUserMessageTest.java


示例9: close

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
public void close () throws IOException
{
  // Get all remaining objects and save them for late reuse
  final ICommonsList <IIndexerWorkItem> aRemainingWorkItems = m_aIndexerWorkQueue.stop ();
  if (aRemainingWorkItems.isNotEmpty ())
  {
    s_aLogger.info ("Persisting " + aRemainingWorkItems.size () + " indexer work items");
    final IMicroDocument aDoc = new MicroDocument ();
    final IMicroElement eRoot = aDoc.appendElement (ELEMENT_ROOT);
    for (final IIndexerWorkItem aItem : aRemainingWorkItems)
      eRoot.appendChild (MicroTypeConverter.convertToMicroElement (aItem, ELEMENT_ITEM));
    if (MicroWriter.writeToFile (aDoc, m_aIndexerWorkItemFile).isFailure ())
      throw new IllegalStateException ("Failed to write IndexerWorkItems to " + m_aIndexerWorkItemFile);
  }

  // Unschedule the job to avoid problems on shutdown. Use the saved instance
  // because GlobalQuartzScheduler.getInstance() would fail because the global
  // scope is already in destruction.
  m_aScheduler.unscheduleJob (m_aTriggerKey);

  // Close Lucene index etc.
  m_aStorageMgr.close ();
}
 
开发者ID:phax,项目名称:peppol-directory,代码行数:24,代码来源:PDIndexerManager.java


示例10: writeSettings

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Nonnull
public ESuccess writeSettings (@Nonnull final ISettings aSettings, @Nonnull @WillClose final OutputStream aOS)
{
  ValueEnforcer.notNull (aSettings, "Settings");
  ValueEnforcer.notNull (aOS, "OutputStream");

  try
  {
    // Inside try so that OS is closed
    ValueEnforcer.notNull (aSettings, "Settings");

    // No event manager invocation on writing
    final SettingsMicroDocumentConverter <T> aConverter = new SettingsMicroDocumentConverter <> (m_aSettingsFactory);
    final IMicroDocument aDoc = new MicroDocument ();
    aDoc.appendChild (aConverter.convertToMicroElement (GenericReflection.uncheckedCast (aSettings),
                                                        getWriteNamespaceURI (),
                                                        getWriteElementName ()));

    // auto-closes the stream
    return MicroWriter.writeToStream (aDoc, aOS, m_aXWS);
  }
  finally
  {
    StreamHelper.close (aOS);
  }
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:27,代码来源:SettingsPersistenceXML.java


示例11: writeMap

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
/**
 * Write the passed map to the passed output stream using the predefined XML
 * layout.
 *
 * @param aMap
 *        The map to be written. May not be <code>null</code>.
 * @param aOS
 *        The output stream to write to. The stream is closed independent of
 *        success or failure. May not be <code>null</code>.
 * @return {@link ESuccess#SUCCESS} when everything went well,
 *         {@link ESuccess#FAILURE} otherwise.
 */
@Nonnull
public static ESuccess writeMap (@Nonnull final Map <String, String> aMap, @Nonnull @WillClose final OutputStream aOS)
{
  ValueEnforcer.notNull (aMap, "Map");
  ValueEnforcer.notNull (aOS, "OutputStream");

  try
  {
    final IMicroDocument aDoc = createMapDocument (aMap);
    return MicroWriter.writeToStream (aDoc, aOS, XMLWriterSettings.DEFAULT_XML_SETTINGS);
  }
  finally
  {
    StreamHelper.close (aOS);
  }
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:29,代码来源:XMLMapHandler.java


示例12: writeList

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
/**
 * Write the passed collection to the passed output stream using the
 * predefined XML layout.
 *
 * @param aCollection
 *        The map to be written. May not be <code>null</code>.
 * @param aOS
 *        The output stream to write to. The stream is closed independent of
 *        success or failure. May not be <code>null</code>.
 * @return {@link ESuccess#SUCCESS} when everything went well,
 *         {@link ESuccess#FAILURE} otherwise.
 */
@Nonnull
public static ESuccess writeList (@Nonnull final Collection <String> aCollection,
                                  @Nonnull @WillClose final OutputStream aOS)
{
  ValueEnforcer.notNull (aCollection, "Collection");
  ValueEnforcer.notNull (aOS, "OutputStream");

  try
  {
    final IMicroDocument aDoc = createListDocument (aCollection);
    return MicroWriter.writeToStream (aDoc, aOS, XMLWriterSettings.DEFAULT_XML_SETTINGS);
  }
  finally
  {
    StreamHelper.close (aOS);
  }
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:30,代码来源:XMLListHandler.java


示例13: testConvertToXML

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Test
public void testConvertToXML ()
{
  final IMicroDocument aDoc = new MicroDocument ();
  final IMicroElement eRoot = aDoc.appendElement ("vatins");
  for (final VATINStructure aStructure : VATINStructureManager.getAllStructures ())
  {
    final IMicroElement eVatin = eRoot.appendElement ("vatin");
    eVatin.setAttribute ("country", aStructure.getCountry ().getCountry ());
    eVatin.setAttribute ("pattern", aStructure.getPattern ());
    for (final String sExample : aStructure.getExamples ())
      eVatin.appendElement ("example").appendText (sExample);
  }
  final String sXML = MicroWriter.getNodeAsString (aDoc);
  assertNotNull (sXML);
}
 
开发者ID:phax,项目名称:ph-masterdata,代码行数:17,代码来源:VATINStructureManagerTest.java


示例14: testMarshal

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Test
public void testMarshal ()
{
  final Locale aLocale = Locale.GERMAN;
  final PostalAddress aAddress = new PostalAddress ();
  aAddress.setStreet ("Cumberlandstraße", aLocale);
  aAddress.setPostalCode ("1140");
  aAddress.setCity ("Vienna", aLocale);
  aAddress.setState ("W", aLocale);
  aAddress.setCountry ("AT", aLocale);
  final IMicroElement aElement = MicroTypeConverter.convertToMicroElement (aAddress, "addr");
  assertNotNull (aElement);
  s_aLogger.info (MicroWriter.getNodeAsString (aElement));

  final PostalAddress aAddress2 = MicroTypeConverter.convertToNative (aElement, PostalAddress.class);
  assertEquals (aAddress, aAddress2);
}
 
开发者ID:phax,项目名称:ph-masterdata,代码行数:18,代码来源:AddressMicroTypeConverterRegistrarTest.java


示例15: readSchema

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
/**
 * Read the schema from the resource supplied in the constructor. First all
 * includes are resolved and than {@link #readSchemaFromXML(IMicroElement)} is
 * called.
 *
 * @return The read {@link PSSchema}.
 * @throws SchematronReadException
 *         If reading fails
 */
@Nonnull
public PSSchema readSchema () throws SchematronReadException
{
  // Resolve all includes as the first action
  final SAXReaderSettings aSettings = new SAXReaderSettings ().setEntityResolver (m_aEntityResolver);

  final IMicroDocument aDoc = SchematronHelper.getWithResolvedSchematronIncludes (m_aResource,
                                                                                  aSettings,
                                                                                  m_aErrorHandler);
  if (aDoc == null || aDoc.getDocumentElement () == null)
    throw new SchematronReadException (m_aResource,
                                       "Failed to resolve includes in Schematron resource " + m_aResource);

  if (SchematronDebug.isShowResolvedSourceSchematron ())
    s_aLogger.info ("Resolved source Schematron:\n" + MicroWriter.getNodeAsString (aDoc));

  return readSchemaFromXML (aDoc.getDocumentElement ());
}
 
开发者ID:phax,项目名称:ph-schematron,代码行数:28,代码来源:PSReader.java


示例16: createPreprocessedSchema

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
/**
 * Pre-process the read schema, using the determined query binding.
 *
 * @param aSchema
 *        The read schema. Never <code>null</code>.
 * @param aQueryBinding
 *        The determined query binding. Never <code>null</code>.
 * @return The pre-processed schema and never <code>null</code>.
 * @throws SchematronException
 *         In case pre-processing fails
 */
@Nonnull
@OverrideOnDemand
public PSSchema createPreprocessedSchema (@Nonnull final PSSchema aSchema,
                                          @Nonnull final IPSQueryBinding aQueryBinding) throws SchematronException
{
  final PSPreprocessor aPreprocessor = createPreprocessor (aQueryBinding);
  final PSSchema aPreprocessedSchema = aPreprocessor.getAsPreprocessedSchema (aSchema);
  if (aPreprocessedSchema == null)
    throw new SchematronPreprocessException ("Failed to preprocess schema " +
                                             aSchema +
                                             " with query binding " +
                                             aQueryBinding);
  if (SchematronDebug.isShowPreprocessedSchematron ())
    s_aLogger.info ("Preprocessed Schematron:\n" +
                    MicroWriter.getNodeAsString (aPreprocessedSchema.getAsMicroElement ()));
  return aPreprocessedSchema;
}
 
开发者ID:phax,项目名称:ph-schematron,代码行数:29,代码来源:PSBoundSchemaCacheKey.java


示例17: sendBodyPayloadMessageSuccessful

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Test
public void sendBodyPayloadMessageSuccessful () throws Exception
{
  final AS4ClientUserMessage aClient = _getMandatoryAttributesSuccessMessage ();
  aClient.setPayload (DOMReader.readXMLDOM (new ClassPathResource (AS4TestConstants.TEST_PAYLOAD_XML)));
  final IMicroDocument aDoc = aClient.sendMessageAndGetMicroDocument (SERVER_URL);
  assertTrue (MicroWriter.getNodeAsString (aDoc).contains (AS4TestConstants.RECEIPT_ASSERTCHECK));
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:9,代码来源:AS4ClientUserMessageTest.java


示例18: sendBodyPayloadEncryptedMessageSuccessful

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Test
public void sendBodyPayloadEncryptedMessageSuccessful () throws Exception
{
  final AS4ClientUserMessage aClient = _getMandatoryAttributesSuccessMessage ();
  aClient.setPayload (DOMReader.readXMLDOM (new ClassPathResource (AS4TestConstants.TEST_PAYLOAD_XML)));

  // Keystore
  _setKeyStoreTestData (aClient);

  // Encrypt specific
  aClient.setCryptoAlgorithmCrypt (ECryptoAlgorithmCrypt.AES_128_GCM);

  final IMicroDocument aDoc = aClient.sendMessageAndGetMicroDocument (SERVER_URL);
  assertTrue (MicroWriter.getNodeAsString (aDoc).contains (AS4TestConstants.RECEIPT_ASSERTCHECK));
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:16,代码来源:AS4ClientUserMessageTest.java


示例19: sendOneAttachmentCompressedSignedEncryptedMessageSuccessful

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Test
public void sendOneAttachmentCompressedSignedEncryptedMessageSuccessful () throws Exception
{
  final AS4ClientUserMessage aClient = _getMandatoryAttributesSuccessMessage ();
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_SHORTXML_XML).getAsFile (),
                         CMimeType.APPLICATION_XML,
                         EAS4CompressionMode.GZIP);
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_SHORTXML2_XML).getAsFile (),
                         CMimeType.APPLICATION_XML,
                         EAS4CompressionMode.GZIP);
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_TEST_IMG_JPG).getAsFile (),
                         CMimeType.IMAGE_JPG,
                         EAS4CompressionMode.GZIP);

  // Keystore
  _setKeyStoreTestData (aClient);

  // Sign specific
  aClient.setCryptoAlgorithmSign (ECryptoAlgorithmSign.RSA_SHA_256);
  aClient.setCryptoAlgorithmSignDigest (ECryptoAlgorithmSignDigest.DIGEST_SHA_256);

  // Encrypt specific
  aClient.setCryptoAlgorithmCrypt (ECryptoAlgorithmCrypt.AES_128_GCM);

  final IMicroDocument aDoc = aClient.sendMessageAndGetMicroDocument (SERVER_URL);
  assertTrue (MicroWriter.getNodeAsString (aDoc).contains (AS4TestConstants.RECEIPT_ASSERTCHECK));
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:28,代码来源:AS4ClientUserMessageTest.java


示例20: sendManyAttachmentCompressedSignedEncryptedMessageSuccessful

import com.helger.xml.microdom.serialize.MicroWriter; //导入依赖的package包/类
@Test
public void sendManyAttachmentCompressedSignedEncryptedMessageSuccessful () throws Exception
{
  final AS4ClientUserMessage aClient = _getMandatoryAttributesSuccessMessage ();
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_SHORTXML_XML).getAsFile (),
                         CMimeType.APPLICATION_XML,
                         EAS4CompressionMode.GZIP);
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_SHORTXML2_XML).getAsFile (),
                         CMimeType.APPLICATION_XML,
                         EAS4CompressionMode.GZIP);
  aClient.addAttachment (new ClassPathResource (AS4TestConstants.ATTACHMENT_TEST_IMG_JPG).getAsFile (),
                         CMimeType.IMAGE_JPG,
                         EAS4CompressionMode.GZIP);

  // Keystore
  _setKeyStoreTestData (aClient);

  // Sign specific
  aClient.setCryptoAlgorithmSign (ECryptoAlgorithmSign.RSA_SHA_256);
  aClient.setCryptoAlgorithmSignDigest (ECryptoAlgorithmSignDigest.DIGEST_SHA_256);

  // Encrypt specific
  aClient.setCryptoAlgorithmCrypt (ECryptoAlgorithmCrypt.AES_128_GCM);

  final IMicroDocument aDoc = aClient.sendMessageAndGetMicroDocument (SERVER_URL);
  assertTrue (MicroWriter.getNodeAsString (aDoc).contains (AS4TestConstants.RECEIPT_ASSERTCHECK));
}
 
开发者ID:phax,项目名称:ph-as4,代码行数:28,代码来源:AS4ClientUserMessageTest.java



注:本文中的com.helger.xml.microdom.serialize.MicroWriter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SchedulerResourceTypes类代码示例发布时间:2022-05-23
下一篇:
Java PojoComponentTuplizer类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap