Skip to content
New issue

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

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

Already on GitHub? # to your account

added possibility to add action to content-type header #1073

Merged

Conversation

bonanzakrak
Copy link
Contributor

@bonanzakrak bonanzakrak commented Jun 5, 2019

I have added support to add soapAction to Content-Type header.

For example:
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=ROBJ_method_soapaction

It allows to set Content-Type to 'application/soap+xml; charset=utf-8'; action=Action

Added option param: addHeadersAction that allows to turn this on/off.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 93.378% when pulling 39ddcd3 on bonanzakrak:soap-12-action-in-header-content-type into 7c832ed on vpulim:master.

if (!this.wsdl.options.forceSoap12Headers) {
if (this.wsdl.options.forceSoap12Headers) {
headers['Content-Type'] = 'application/soap+xml; charset=utf-8';
if (this.wsdl.options.addHeadersAction) {
Copy link
Contributor

@gbar gbar Jun 5, 2019

Choose a reason for hiding this comment

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

According to specification from https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=ROBJ_method_soapaction action param should be added within forceSoap12Headers flag, not some additional one as because it is required in 1.2 version

@jsdevel jsdevel merged commit 80f4157 into vpulim:master Jun 5, 2019
@jsdevel
Copy link
Collaborator

jsdevel commented Jun 5, 2019

thanks!

@@ -94,6 +94,8 @@ export interface IWsdlBaseOptions {
wsdl_options?: { [key: string]: any };
/** set proper headers for SOAP v1.2. */
forceSoap12Headers?: boolean;
/** set content type header action for SOAP v1.2 */
addHeadersAction?: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@gbar can you follow up with a PR to add this to the README please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will add that when I get home. Will create another PR with that

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants