Skip to content

feature/707: improve soap 1.1 capture of proxy request/responses #713

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

clx-jlmoreno
Copy link

SOAP-Aware Proxy Implementation Summary

Overview

We've successfully implemented a SOAP-aware proxy for Imposter that properly handles SOAP 1.1 services which use the SOAPAction header to differentiate between operations on the same endpoint.

Implementation Details

1. Enhanced UpstreamService

We created a SoapAwareUpstreamService that extends the existing proxy functionality with SOAP awareness:

  • Extracts the SOAPAction header from incoming requests
  • Generates unique filenames based on the SOAPAction value
  • Saves requests and responses with operation-specific names
  • Creates configuration files for each SOAP operation

2. Configuration Integration

We integrated the SOAP-aware functionality with the existing configuration system:

  • Added a soapMode flag to ImposterConfig
  • Added a --soap command-line parameter to enable SOAP-aware mode
  • Modified the HandlerServiceImpl to use the appropriate service based on the mode

3. Compatibility

The implementation maintains backward compatibility:

  • Standard proxy functionality works as before when --soap is not specified
  • The SOAP-aware proxy is only used when explicitly enabled
  • All existing features continue to work as expected

Benefits

  1. Operation-specific captures: Each SOAP operation gets its own request/response pair saved
  2. Automatic configuration: Generated configuration files include SOAPAction header matching
  3. Organized files: Clear naming convention makes it easy to identify which files correspond to which operations
  4. Seamless integration: Works with existing proxy functionality through a command-line flag

Testing

The implementation has been tested with:

  1. Building the project successfully
  2. Creating a custom Docker image with the changes
  3. Running the container with the SOAP-aware proxy enabled
  4. Verifying the command-line parameters work correctly

Next Steps

  1. Add comprehensive tests for the SOAP-aware proxy functionality
  2. Enhance error handling and edge cases
  3. Add support for SOAP 1.2 which uses Content-Type header instead of SOAPAction
  4. Consider adding more configuration options for file naming and organization

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.

1 participant