本文整理匯總了Java中com.helger.peppol.smp.ESMPTransportProfile類的典型用法代碼示例。如果您正苦於以下問題:Java ESMPTransportProfile類的具體用法?Java ESMPTransportProfile怎麽用?Java ESMPTransportProfile使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ESMPTransportProfile類屬於com.helger.peppol.smp包,在下文中一共展示了ESMPTransportProfile類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: _getReceiverEndpoint
import com.helger.peppol.smp.ESMPTransportProfile; //導入依賴的package包/類
/**
* @param aRecipientID
* PEPPOL Recipient ID
* @param aDocTypeID
* PEPPOL document type ID
* @param aProcessID
* PEPPOL process ID
* @return The access point URL to be used or <code>null</code>
* @throws OpenAS2Exception
* In case the endpoint address could not be resolved.
*/
@Nullable
private static EndpointType _getReceiverEndpoint (@Nullable final IParticipantIdentifier aRecipientID,
@Nullable final IDocumentTypeIdentifier aDocTypeID,
@Nullable final IProcessIdentifier aProcessID,
@Nonnull final String sMessageID) throws OpenAS2Exception
{
// Get configured client
final SMPClientReadOnly aSMPClient = AS2PeppolServletConfiguration.getSMPClient ();
if (aSMPClient == null)
throw new OpenAS2Exception (sMessageID + " No SMP client configured!");
if (aRecipientID == null || aDocTypeID == null || aProcessID == null)
return null;
try
{
if (s_aLogger.isDebugEnabled ())
{
s_aLogger.debug (sMessageID +
" Looking up the endpoint of recipient " +
aRecipientID.getURIEncoded () +
" at SMP URL '" +
aSMPClient.getSMPHostURI () +
"' for " +
aRecipientID.getURIEncoded () +
" and " +
aDocTypeID.getURIEncoded () +
" and " +
aProcessID.getURIEncoded ());
}
// Query the SMP
return aSMPClient.getEndpoint (aRecipientID, aDocTypeID, aProcessID, ESMPTransportProfile.TRANSPORT_PROFILE_AS2);
}
catch (final Throwable t)
{
throw new OpenAS2Exception (sMessageID +
" Failed to retrieve endpoint of recipient " +
aRecipientID.getURIEncoded (),
t);
}
}