File tree Expand file tree Collapse file tree
phase4-peppol-server-webapp/src/main/java/com/helger/phase4/peppol/server/servlet Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -325,14 +325,23 @@ private static void _initPeppolAS4 ()
325325 // not
326326 Phase4PeppolDefaultReceiverConfiguration .setAPCAChecker (aAPCAChecker );
327327
328- final String sSMPURL = APConfig .getMySmpUrl ();
329328 final String sAPURL = AS4Configuration .getThisEndpointAddress ();
330- if (StringHelper .isNotEmpty (sSMPURL ) && StringHelper . isNotEmpty ( sAPURL ))
329+ if (StringHelper .isNotEmpty (sAPURL ))
331330 {
332331 Phase4PeppolDefaultReceiverConfiguration .setReceiverCheckEnabled (true );
333- final SMPClientReadOnly aSMPClient = new CachingSMPClientReadOnly (URLHelper .getAsURI (sSMPURL ));
334- APConfig .applyHttpProxySettings (aSMPClient .httpClientSettings ());
335- Phase4PeppolDefaultReceiverConfiguration .setSMPClient (aSMPClient );
332+ final String sSMPURL = APConfig .getMySmpUrl ();
333+ if (StringHelper .isNotEmpty (sSMPURL ))
334+ {
335+ // Set specific SMP for checking
336+ final SMPClientReadOnly aSMPClient = new CachingSMPClientReadOnly (URLHelper .getAsURI (sSMPURL ));
337+ APConfig .applyHttpProxySettings (aSMPClient .httpClientSettings ());
338+ Phase4PeppolDefaultReceiverConfiguration .setSMPClient (aSMPClient );
339+ }
340+ else
341+ {
342+ // Use any SMP for checking
343+ Phase4PeppolDefaultReceiverConfiguration .setSMLInfo (eStage .getSMLInfo ());
344+ }
336345 Phase4PeppolDefaultReceiverConfiguration .setAS4EndpointURL (sAPURL );
337346 Phase4PeppolDefaultReceiverConfiguration .setAPCertificate (aAPCert );
338347 LOGGER .info (CAS4 .LIB_NAME +
You can’t perform that action at this time.
0 commit comments