Skip to content

Commit

Permalink
fix Bean Instatiation Error (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzy11 authored Dec 22, 2021
1 parent a8203b2 commit eeee542
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public abstract class AbstractBioServerClient extends WebServiceGatewaySupport i
// private WebServiceMessageFactory messageFactory;

@Autowired
private ApplicationContext context;
protected ApplicationContext context;

@PostConstruct
public void init() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.springframework.web.client.RestOperations;
import org.springframework.web.client.RestTemplate;
import org.springframework.ws.WebServiceMessageFactory;
import org.springframework.ws.soap.saaj.SaajSoapMessageFactory;

import java.io.BufferedReader;
import java.io.IOException;
Expand All @@ -34,9 +35,8 @@ public class NationalBioServerClient extends AbstractBioServerClient {

private final Log log = LogFactory.getLog(NationalBioServerClient.class);

@Autowired
public NationalBioServerClient(WebServiceMessageFactory messageFactory){
setMessageFactory(messageFactory);
public NationalBioServerClient() {
setMessageFactory(context.getBean("m2sysbiometrics.messageFactory", SaajSoapMessageFactory.class));
}

@Override
Expand Down

0 comments on commit eeee542

Please sign in to comment.