Skip to content

Commit

Permalink
fix: handling attributes on the body tag in the server for both rpc a…
Browse files Browse the repository at this point in the history
…nd document styles

Signed-off-by: Natan Carvalho <[email protected]>
  • Loading branch information
Natan Carvalho committed Jul 23, 2024
1 parent 3329389 commit 792e5eb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ class Server extends Base {

try {
if (binding.style === 'rpc') {
operationName = Object.keys(body)[0];
operationName = (Object.keys(body)[0] === (self.wsdl.options.attributesKey || 'attributes') ?
Object.keys(body)[1] : Object.keys(body)[0]);

self.emit('request', obj, operationName);
if (headers)
Expand All @@ -214,8 +215,8 @@ class Server extends Base {
style: 'rpc'
}, req, callback);
} else { //document style
var messageElemName = (Object.keys(body)[0] === 'attributes' ?
Object.keys(body)[1] : Object.keys(body)[0]);
var messageElemName = (Object.keys(body)[0] === (self.wsdl.options.attributesKey || 'attributes') ?
Object.keys(body)[1] : Object.keys(body)[0]);
var pair = binding.topElements[messageElemName];

var operationName, outputName;
Expand Down

0 comments on commit 792e5eb

Please sign in to comment.