use of com.helger.phase4.ebms3header.Ebms3MessageInfo in project phase4 by phax.
the class MockClientMessages method createUserMessageSoapNotSignedNotPModeConform.
@Nonnull
public static Document createUserMessageSoapNotSignedNotPModeConform(@Nonnull final ESoapVersion eSoapVersion, @Nullable final Node aPayload, @Nullable final ICommonsList<WSS4JAttachment> aAttachments) {
// Add properties
final ICommonsList<Ebms3Property> aEbms3Properties = new CommonsArrayList<>();
aEbms3Properties.add(MessageHelperMethods.createEbms3Property("ProcessInst", "PurchaseOrder:123456"));
aEbms3Properties.add(MessageHelperMethods.createEbms3Property("ContextID", "987654321"));
final Ebms3MessageInfo aEbms3MessageInfo = MessageHelperMethods.createEbms3MessageInfo();
final Ebms3PayloadInfo aEbms3PayloadInfo = MessageHelperMethods.createEbms3PayloadInfo(aPayload != null, aAttachments);
final Ebms3CollaborationInfo aEbms3CollaborationInfo = MessageHelperMethods.createEbms3CollaborationInfo("pm-esens-generic-resp", DEFAULT_AGREEMENT, "MyServiceTypes", "QuoteToCollect", "NewPurchaseOrder", "4321");
final Ebms3PartyInfo aEbms3PartyInfo = MessageHelperMethods.createEbms3PartyInfo(CAS4.DEFAULT_INITIATOR_URL, "testt", CAS4.DEFAULT_RESPONDER_URL, "testt");
final Ebms3MessageProperties aEbms3MessageProperties = MessageHelperMethods.createEbms3MessageProperties(aEbms3Properties);
final AS4UserMessage aDoc = AS4UserMessage.create(aEbms3MessageInfo, aEbms3PayloadInfo, aEbms3CollaborationInfo, aEbms3PartyInfo, aEbms3MessageProperties, eSoapVersion).setMustUnderstand(true);
return aDoc.getAsSoapDocument(aPayload);
}
use of com.helger.phase4.ebms3header.Ebms3MessageInfo in project phase4 by phax.
the class MockClientMessages method createEmptyUserMessage.
@Nonnull
@SuppressFBWarnings("NP_NONNULL_PARAM_VIOLATION")
public static Document createEmptyUserMessage(@Nonnull final ESoapVersion eSoapVersion, @Nullable final Node aPayload, @Nullable final ICommonsList<WSS4JAttachment> aAttachments) {
// Add properties
final ICommonsList<Ebms3Property> aEbms3Properties = new CommonsArrayList<>();
final Ebms3Property aEbms3PropertyProcess = new Ebms3Property();
aEbms3Properties.add(aEbms3PropertyProcess);
// Use an empty message info by purpose
final Ebms3MessageInfo aEbms3MessageInfo = MessageHelperMethods.createEbms3MessageInfo();
final Ebms3PayloadInfo aEbms3PayloadInfo = MessageHelperMethods.createEbms3PayloadInfo(aPayload != null, aAttachments);
final Ebms3CollaborationInfo aEbms3CollaborationInfo = MessageHelperMethods.createEbms3CollaborationInfo(null, null, null, "svc", "act", "conv");
final Ebms3PartyInfo aEbms3PartyInfo = MessageHelperMethods.createEbms3PartyInfo("fid", "frole", "tid", "trole");
final Ebms3MessageProperties aEbms3MessageProperties = MessageHelperMethods.createEbms3MessageProperties(aEbms3Properties);
final AS4UserMessage aDoc = AS4UserMessage.create(aEbms3MessageInfo, aEbms3PayloadInfo, aEbms3CollaborationInfo, aEbms3PartyInfo, aEbms3MessageProperties, eSoapVersion).setMustUnderstand(true);
return aDoc.getAsSoapDocument(aPayload);
}
use of com.helger.phase4.ebms3header.Ebms3MessageInfo in project phase4 by phax.
the class MockClientMessages method createUserMessageNotSigned.
@Nonnull
public static AS4UserMessage createUserMessageNotSigned(@Nonnull final ESoapVersion eSoapVersion, @Nullable final Node aPayload, @Nullable final ICommonsList<WSS4JAttachment> aAttachments) {
// Add properties
final ICommonsList<Ebms3Property> aEbms3Properties = new CommonsArrayList<>();
aEbms3Properties.add(MessageHelperMethods.createEbms3Property("ProcessInst", "PurchaseOrder:123456"));
aEbms3Properties.add(MessageHelperMethods.createEbms3Property("ContextID", "987654321"));
aEbms3Properties.add(MessageHelperMethods.createEbms3Property(CAS4.ORIGINAL_SENDER, "C1 OS"));
aEbms3Properties.add(MessageHelperMethods.createEbms3Property(CAS4.FINAL_RECIPIENT, "C4 FR"));
final Ebms3MessageInfo aEbms3MessageInfo = MessageHelperMethods.createEbms3MessageInfo();
final Ebms3PayloadInfo aEbms3PayloadInfo = MessageHelperMethods.createEbms3PayloadInfo(aPayload != null, aAttachments);
final Ebms3CollaborationInfo aEbms3CollaborationInfo = MessageHelperMethods.createEbms3CollaborationInfo("pmode-twoway", DEFAULT_AGREEMENT, "MyServiceTypes", "QuoteToCollect", "NewPurchaseOrder", "4321");
final Ebms3PartyInfo aEbms3PartyInfo = MessageHelperMethods.createEbms3PartyInfo(CAS4.DEFAULT_INITIATOR_URL, "1234", CAS4.DEFAULT_RESPONDER_URL, "5678");
final Ebms3MessageProperties aEbms3MessageProperties = MessageHelperMethods.createEbms3MessageProperties(aEbms3Properties);
final AS4UserMessage aDoc = AS4UserMessage.create(aEbms3MessageInfo, aEbms3PayloadInfo, aEbms3CollaborationInfo, aEbms3PartyInfo, aEbms3MessageProperties, eSoapVersion).setMustUnderstand(true);
return aDoc;
}
use of com.helger.phase4.ebms3header.Ebms3MessageInfo in project phase4 by phax.
the class AS4ErrorMessage method create.
@Nonnull
public static AS4ErrorMessage create(@Nonnull final ESoapVersion eSoapVersion, @Nonnull final Ebms3MessageInfo aEbms3MessageInfo, @Nonnull final ICommonsList<Ebms3Error> aErrorMessages) {
final Ebms3SignalMessage aSignalMessage = new Ebms3SignalMessage();
// Message Info
aSignalMessage.setMessageInfo(aEbms3MessageInfo);
// Error Message
aSignalMessage.setError(aErrorMessages);
return new AS4ErrorMessage(eSoapVersion, aSignalMessage);
}
use of com.helger.phase4.ebms3header.Ebms3MessageInfo in project phase4 by phax.
the class AS4PullRequestMessage method create.
@Nonnull
public static AS4PullRequestMessage create(@Nonnull final ESoapVersion eSoapVersion, @Nonnull final Ebms3MessageInfo aEbms3MessageInfo, @Nullable final String sMPC, @Nullable final List<Object> aAny) {
final Ebms3SignalMessage aSignalMessage = new Ebms3SignalMessage();
// Message Info
aSignalMessage.setMessageInfo(aEbms3MessageInfo);
// PullRequest
if (StringHelper.hasText(sMPC)) {
final Ebms3PullRequest aEbms3PullRequest = new Ebms3PullRequest();
aEbms3PullRequest.setMpc(sMPC);
aSignalMessage.setPullRequest(aEbms3PullRequest);
}
aSignalMessage.setAny(aAny);
return new AS4PullRequestMessage(eSoapVersion, aSignalMessage);
}
Aggregations