-
Notifications
You must be signed in to change notification settings - Fork 141
Legacy service publisher #1604
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
Draft
t-burch
wants to merge
25
commits into
master
Choose a base branch
from
legacy-service-publisher
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Legacy service publisher #1604
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This pull request needs "/ok-to-test" from an authorized committer. |
- Create `WebServiceOASWrapperTest` and `Xsd2OasSchemaTest` classes for testing functionalities. - Implement a basic structure for `Xsd2OasSchemaTest` with a test method named `convert`. - Update `Xsd2OasSchema` to initialize `TYPE_MAPPINGS` with schema instances instead of classes. - Refactor code in `WebServiceOASWrapper` to improve readability and maintainability, such as extracting the port aggregation logic into a separate method.
Implement tests for converting simple and complex XML elements from XSD to OpenAPI schemas. Verify the conversion of elements, sequences, and date formats, ensuring correct schema types and properties are generated.
/ok-to-test |
|
- Add `getBaseUrl` method in `URLUtil` to obtain base URL based on depth. - Update `LegacyServicePublisher` to utilize new `getBaseUrl` method for constructing SOAP envelopes. - Enhance methods for setting SOAP requests and responses to handle both XML and JSON formats. - Add unit tests for `getBaseUrl` method in `URLUtilTest`. - Include WSDL for a sample city service in the project.
- Update response handling to correctly obtain the 'Accept' header from the request. - Remove XML declaration from incoming XML requests for cleaner processing. - Simplify SOAP envelope creation by directly adding JSON input as a body element. - Enhance SOAP body extraction using XML DOM parsing for better reliability. - Adjust JSON to XML conversion to omit XML declaration and set indentation properties.
predic8
requested changes
Feb 16, 2025
core/src/main/java/com/predic8/membrane/core/interceptor/soap/LegacyServicePublisher.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/predic8/membrane/core/interceptor/soap/LegacyServicePublisher.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/predic8/membrane/core/interceptor/soap/LegacyServicePublisher.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/predic8/membrane/core/interceptor/soap/WebServiceOASWrapper.java
Outdated
Show resolved
Hide resolved
@t-burch looks quite good for that short time |
- Add PortMapping class to create OpenAPI definitions from WSDL Port and Service. - Refactor WebServiceOASWrapper to use the new PortMapping for creating API records. - Update LegacyServicePublisher to build SOAP requests and responses more cleanly with helper methods. - Enhance exception handling and XML processing in SOAP body extraction methods.
…egacy-service-publisher
Introduce comprehensive unit tests for `LegacyServicePublisher` to validate XML processing methods, including extracting SOAP body, converting XML to JSON, and appending child elements. Ensure correctness of key operations with assertions covering valid inputs and expected outputs.
…eptions handling - Add assertions in `extractBodyFromSoapValidInputReturnsCleanXml` to verify the extracted XML content. - Implement a new test to validate exception handling for invalid SOAP messages in `extractBodyFromSoapInvalidInputThrowsException`. - Modify the `LegacyServicePublisher` constructor to initialize `documentBuilderFactory` for namespace awareness. - Update the response body handling methods to set the content type correctly based on the response format.
…ation. Update LegacyServicePublisher to utilize resource path in JSON-to-XML conversion. Adjust Proxies XML configuration for consistency and improve WSDL file structure.
- Add `camelToKebab` method to `TextUtil` for string formatting. - Clean up `SpELLablePropertyAware` interface by removing the redundant method. - Update `PortMapping` to use the new `camelToKebab` method for path item formatting. - Enhance `city-service.wsdl` by defining operations and response structures for city data retrieval. - Improve test coverage in `SPeLablePropertyAwareTest` by adding relevant imports.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.