Skip to content

NIFI-3536 Adding GetSOAP processor which supports generically invoking SOAP endpoints#1824

Closed
apsaltis wants to merge 1 commit intoapache:masterfrom
apsaltis:NIFI-3536
Closed

NIFI-3536 Adding GetSOAP processor which supports generically invoking SOAP endpoints#1824
apsaltis wants to merge 1 commit intoapache:masterfrom
apsaltis:NIFI-3536

Conversation

@apsaltis
Copy link
Contributor

This is a follow-on to P/R #1741 that I closed to both rebase off the 1.3.0-SNAPSHOT source and also update the NOTICE in nifi-assembly with the missing artifacts

Thank you for submitting a contribution to Apache NiFi.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically master)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
  • Have you written or updated unit tests to verify your changes?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
  • If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
  • If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

Copy link
Contributor

@pvillard31 pvillard31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @apsaltis, thanks for your contribution. I left some comments and it'll need to be rebased against master.

.displayName("Endpoint URL")
.description("The endpoint url that hosts the web service(s) that should be called.")
.required(true)
.expressionLanguageSupported(false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think expression language should be supported on almost all the properties: with the variable registry, it can be used to externalize values that would be different between environments, also, since this processor can accept incoming flow files, this could be read from the attributes of the flow files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes total sense.

@WritesAttribute(attribute = "getsoap.request.wsdl_url", description = "The request WSDL URL"),
@WritesAttribute(attribute = "getsoap.request.method", description = "The request method"),
@WritesAttribute(attribute = "mime.type", description = "Sets mime type to text/xml")})
@DynamicProperty(name = "The name of a input parameter the needs to be passed to the SOAP method being invoked.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I correct in stating you are referring to the bad grammar used in the value of the name parameter of the DynamicProperty on line 75?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, will get it addressed.

@WritesAttribute(attribute = "mime.type", description = "Sets mime type to text/xml")})
@DynamicProperty(name = "The name of a input parameter the needs to be passed to the SOAP method being invoked.",
value = "The value for this parameter '=' and ',' are not considered valid values and must be escaped . " +
"Note, if the value of parameter needs to be an array the format should be key1=value1,key2=value2. ",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces at the end

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks will fix

.dynamic(false)
.build();

public static final Relationship REL_SUCCESS = new Relationship.Builder()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the processor accepts incoming flow files, wouldn't that make sense to also have a failure relationship? (in particular if some properties are evaluated against attributes of the incoming flow files)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I agree.

if (authHeader != null) {
serviceClient.addHeader(authHeader);
}
getLogger().info("Sending authHeader: " + authHeader);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about logging this at debug level? Otherwise it could be quite verbose when using the processor at a high rate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes total sense.


@BeforeClass
public static void setup() {
mockServer = startClientAndServer(1080);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should dynamically choose a port as we are doing in some other places instead of selecting 1080. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that makes total sense.

@joewitt
Copy link
Contributor

joewitt commented Mar 25, 2021

Closing due to inactivity.

@joewitt joewitt closed this Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants