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

Improve SOAP Response Type Inference for User-Friendly Code #5711

Closed
Nuvindu opened this issue Nov 1, 2023 · 0 comments · Fixed by ballerina-platform/module-ballerina-soap#112

Comments

@Nuvindu
Copy link
Contributor

Nuvindu commented Nov 1, 2023

Description:

Currently, when making SOAP requests with Ballerina, users receive responses in a format that may not be the most user-friendly:

xml|mime:Entity[] response = check soapClient->sendReceive(envelope, "http://tempuri.org/Add");

This approach poses usability issues since users can't directly assign the response into a variable with a specific type.

Proposed Enhancement:

We propose enhancing the SOAP response handling in Ballerina to allow the user to infer the response type based on the type specified for the variable. This change will make the code more user-friendly and intuitive. Users will have the flexibility to define the type of the response variable as follows:

xml response = check soapClient->sendReceive(envelope, "http://tempuri.org/Add");

OR

mime:Entity[] response = check soapClient->sendReceive(envelope, "http://tempuri.org/Add");

This improvement will simplify the code and improve the developer experience by allowing them to work with SOAP responses in a more natural and intuitive manner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant