Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTTP Headers to Web Service Listener #6339

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions client/src/com/mirth/connect/connectors/ws/WebServiceListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public ConnectorProperties getProperties() {
properties.setClassName(classNameField.getText());
properties.setServiceName(serviceNameField.getText());
properties.setSoapBinding(Binding.fromDisplayName((String) versionComboBox.getSelectedItem()));
properties.setHttpHeaders(httpHeadersField.getText());

return properties;
}
Expand All @@ -71,6 +72,7 @@ public void setProperties(ConnectorProperties properties) {
updateClassNameRadio();

serviceNameField.setText(props.getServiceName());
httpHeadersField.setText(props.getHttpHeaders());

updateWSDL();
}
Expand Down Expand Up @@ -149,6 +151,7 @@ private void initComponents() {
methodLabel = new JLabel("Method:");
webServiceLabel = new JLabel("Web Service:");
classNameLabel = new JLabel("Service Class Name:");
httpHeadersLabel = new JLabel("HTTP Headers:");

serviceNameField = new MirthTextField();
serviceNameField.setToolTipText("The name to give to the web service.");
Expand Down Expand Up @@ -205,6 +208,9 @@ public void actionPerformed(ActionEvent evt) {

classNameField = new MirthTextField();
classNameField.setToolTipText("<html>The fully qualified class name of the web service that should be hosted.<br>If this is a custom class, it should be added in a custom jar so it is loaded with Mirth Connect.</html>");

httpHeadersField = new MirthTextField();
httpHeadersField.setToolTipText("Displays the HTTP Headers of incoming calls.");
}

private void initLayout() {
Expand All @@ -230,6 +236,9 @@ private void initLayout() {

add(methodLabel);
add(methodField, "w 250!, wrap");

add(httpHeadersLabel);
add(httpHeadersField, "w 250!, wrap");
}

private void serviceNameFieldKeyReleased(KeyEvent evt) {
Expand Down Expand Up @@ -269,4 +278,7 @@ private void classNameCustomRadioActionPerformed() {

private JLabel methodLabel;
private JTextField methodField;

private JLabel httpHeadersLabel;
private MirthTextField httpHeadersField;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ public interface IWebServiceReceiver extends ISourceConnector {

public void setServer(HttpServer server);

public Map<String, List<String>> getHttpHeaders();
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ public interface WebServiceConfiguration {
public void configureReceiver(IWebServiceReceiver connector) throws Exception;

public void configureDispatcher(IWebServiceDispatcher connector, ConnectorProperties connectorProperties, Map<String, Object> requestContext) throws Exception;
}

public void configureHttpHeaders(IWebServiceReceiver connector) throws Exception;
}
Loading