1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 2001
20 * the Initial Developer. All Rights Reserved.
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #include "nsIServiceManager.h"
40 #include "nsIComponentManager.h"
41 #include "nsSOAPUtils.h"
42 #include "nsSOAPMessage.h"
43 #include "nsSOAPParameter.h"
44 #include "nsSOAPHeaderBlock.h"
45 #include "nsSOAPException.h"
46 #include "nsIDOMDocument.h"
47 #include "nsIDOMAttr.h"
48 #include "nsIDOMParser.h"
49 #include "nsIDOMElement.h"
50 #include "nsIDOMNamedNodeMap.h"
52 static NS_DEFINE_CID(kDOMParserCID
, NS_DOMPARSER_CID
);
53 /////////////////////////////////////////////
56 /////////////////////////////////////////////
58 nsSOAPMessage::nsSOAPMessage()
62 nsSOAPMessage::~nsSOAPMessage()
66 NS_IMPL_ISUPPORTS1(nsSOAPMessage
, nsISOAPMessage
)
67 /* attribute nsIDOMDocument message; */
68 NS_IMETHODIMP
nsSOAPMessage::GetMessageMoz(nsIDOMDocument
* *aMessage
)
70 NS_ENSURE_ARG_POINTER(aMessage
);
72 NS_IF_ADDREF(*aMessage
);
76 NS_IMETHODIMP
nsSOAPMessage::SetMessageMoz(nsIDOMDocument
* aMessage
)
82 /* readonly attribute nsIDOMElement envelope; */
83 NS_IMETHODIMP
nsSOAPMessage::GetEnvelope(nsIDOMElement
* *aEnvelope
)
85 NS_ENSURE_ARG_POINTER(aEnvelope
);
88 nsCOMPtr
<nsIDOMElement
> root
;
89 mMessage
->GetDocumentElement(getter_AddRefs(root
));
91 nsAutoString namespaceURI
;
93 nsresult rc
= root
->GetNamespaceURI(namespaceURI
);
96 rc
= root
->GetLocalName(name
);
99 if (name
.Equals(gSOAPStrings
->kEnvelopeTagName
)
101 Equals(*gSOAPStrings
->kSOAPEnvURI
[nsISOAPMessage::VERSION_1_2
])
103 Equals(*gSOAPStrings
->kSOAPEnvURI
[nsISOAPMessage::VERSION_1_1
]))) {
105 NS_ADDREF(*aEnvelope
);
114 /* readonly attribute PRUint16 version; */
115 NS_IMETHODIMP
nsSOAPMessage::GetVersion(PRUint16
* aVersion
)
117 NS_ENSURE_ARG_POINTER(aVersion
);
119 nsCOMPtr
<nsIDOMElement
> root
;
120 mMessage
->GetDocumentElement(getter_AddRefs(root
));
122 nsAutoString namespaceURI
;
124 nsresult rc
= root
->GetNamespaceURI(namespaceURI
);
127 rc
= root
->GetLocalName(name
);
130 if (name
.Equals(gSOAPStrings
->kEnvelopeTagName
)) {
132 Equals(*gSOAPStrings
->kSOAPEnvURI
[nsISOAPMessage::VERSION_1_2
])) {
133 *aVersion
= nsISOAPMessage::VERSION_1_2
;
135 } else if (namespaceURI
.
136 Equals(*gSOAPStrings
->kSOAPEnvURI
[nsISOAPMessage::VERSION_1_1
])) {
137 *aVersion
= nsISOAPMessage::VERSION_1_1
;
143 *aVersion
= nsISOAPMessage::VERSION_UNKNOWN
;
147 /* Internal method for getting envelope and version */
148 PRUint16
nsSOAPMessage::GetEnvelopeWithVersion(nsIDOMElement
* *aEnvelope
)
151 nsCOMPtr
<nsIDOMElement
> root
;
152 mMessage
->GetDocumentElement(getter_AddRefs(root
));
154 nsAutoString namespaceURI
;
156 root
->GetNamespaceURI(namespaceURI
);
157 root
->GetLocalName(name
);
158 if (name
.Equals(gSOAPStrings
->kEnvelopeTagName
)) {
160 Equals(*gSOAPStrings
->kSOAPEnvURI
[nsISOAPMessage::VERSION_1_2
])) {
162 NS_ADDREF(*aEnvelope
);
163 return nsISOAPMessage::VERSION_1_2
;
164 } else if (namespaceURI
.
165 Equals(*gSOAPStrings
->kSOAPEnvURI
[nsISOAPMessage::VERSION_1_1
])) {
167 NS_ADDREF(*aEnvelope
);
168 return nsISOAPMessage::VERSION_1_1
;
174 return nsISOAPMessage::VERSION_UNKNOWN
;
177 /* readonly attribute nsIDOMElement header; */
178 NS_IMETHODIMP
nsSOAPMessage::GetHeader(nsIDOMElement
* *aHeader
)
180 NS_ENSURE_ARG_POINTER(aHeader
);
181 nsCOMPtr
<nsIDOMElement
> env
;
182 PRUint16 version
= GetEnvelopeWithVersion(getter_AddRefs(env
));
184 nsSOAPUtils::GetSpecificChildElement(nsnull
, env
,
185 *gSOAPStrings
->kSOAPEnvURI
[version
],
186 gSOAPStrings
->kHeaderTagName
,
194 /* readonly attribute nsIDOMElement body; */
195 NS_IMETHODIMP
nsSOAPMessage::GetBody(nsIDOMElement
* *aBody
)
197 NS_ENSURE_ARG_POINTER(aBody
);
198 nsCOMPtr
<nsIDOMElement
> env
;
199 PRUint16 version
= GetEnvelopeWithVersion(getter_AddRefs(env
));
201 nsSOAPUtils::GetSpecificChildElement(nsnull
, env
,
202 *gSOAPStrings
->kSOAPEnvURI
[version
],
203 gSOAPStrings
->kBodyTagName
, aBody
);
210 /* attribute DOMString actionURI; */
211 NS_IMETHODIMP
nsSOAPMessage::GetActionURI(nsAString
& aActionURI
)
213 aActionURI
.Assign(mActionURI
);
217 NS_IMETHODIMP
nsSOAPMessage::SetActionURI(const nsAString
& aActionURI
)
219 mActionURI
.Assign(aActionURI
);
223 /* readonly attribute AString methodName; */
224 NS_IMETHODIMP
nsSOAPMessage::GetMethodName(nsAString
& aMethodName
)
226 nsCOMPtr
<nsIDOMElement
> body
;
227 GetBody(getter_AddRefs(body
));
229 nsCOMPtr
<nsIDOMElement
> method
;
230 nsSOAPUtils::GetFirstChildElement(body
, getter_AddRefs(method
));
232 body
->GetLocalName(aMethodName
);
236 aMethodName
.Truncate();
240 /* readonly attribute AString targetObjectURI; */
241 NS_IMETHODIMP
nsSOAPMessage::
242 GetTargetObjectURI(nsAString
& aTargetObjectURI
)
244 nsCOMPtr
<nsIDOMElement
> body
;
245 GetBody(getter_AddRefs(body
));
247 nsCOMPtr
<nsIDOMElement
> method
;
248 nsSOAPUtils::GetFirstChildElement(body
, getter_AddRefs(method
));
250 nsCOMPtr
<nsISOAPEncoding
> encoding
;
252 nsresult rv
= GetEncodingWithVersion(method
, &version
, getter_AddRefs(encoding
));
256 rv
= method
->GetNamespaceURI(temp
);
259 return encoding
->GetInternalSchemaURI(temp
, aTargetObjectURI
);
262 aTargetObjectURI
.Truncate();
267 nsSOAPMessage::Encode(PRUint16 aVersion
, const nsAString
& aMethodName
,
268 const nsAString
& aTargetObjectURI
,
269 PRUint32 aHeaderBlockCount
,
270 nsISOAPHeaderBlock
** aHeaderBlocks
,
271 PRUint32 aParameterCount
,
272 nsISOAPParameter
** aParameters
)
274 static NS_NAMED_LITERAL_STRING(realEmptySOAPDocStr1
,
275 "<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:enc=\"http://schemas.xmlsoap.org/soap/encoding/\"><env:Header/><env:Body/></env:Envelope>");
276 static NS_NAMED_LITERAL_STRING(realEmptySOAPDocStr2
,
277 "<env:Envelope xmlns:env=\"http://www.w3.org/2001/09/soap-envelope\" xmlns:enc=\"http://www.w3.org/2001/09/soap-encoding\"><env:Header/><env:Body/></env:Envelope>");
278 static const nsAString
*kEmptySOAPDocStr
[] = {
279 &realEmptySOAPDocStr1
, &realEmptySOAPDocStr2
282 if (aVersion
!= nsISOAPMessage::VERSION_1_1
283 && aVersion
!= nsISOAPMessage::VERSION_1_2
)
284 return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE
,"SOAP_BAD_VALUE","Cannot encode message blocks without a valid SOAP version specified.");
286 // Construct the message skeleton
289 nsCOMPtr
<nsIDOMNode
> ignored
;
290 nsCOMPtr
<nsIDOMParser
> parser
= do_CreateInstance(kDOMParserCID
, &rv
);
294 rv
= parser
->ParseFromString(nsPromiseFlatString(*kEmptySOAPDocStr
[aVersion
]).get(),
295 "application/xml", getter_AddRefs(mMessage
));
299 // Declare the default encoding. This should always be non-null, but may be empty string.
301 nsCOMPtr
<nsISOAPEncoding
> encoding
;
302 rv
= GetEncoding(getter_AddRefs(encoding
));
305 nsCOMPtr
<nsIDOMElement
> envelope
;
306 rv
= GetEnvelope(getter_AddRefs(envelope
));
311 rv
= mEncoding
->GetStyleURI(enc
);
314 if (!enc
.IsEmpty()) {
315 rv
= envelope
->SetAttributeNS(*gSOAPStrings
->kSOAPEnvURI
[aVersion
],
316 gSOAPStrings
->kEncodingStyleAttribute
, enc
);
321 // Declare the schema namespaces, taking into account any mappings that are present.
325 temp
.Assign(gSOAPStrings
->kXMLNamespacePrefix
);
326 temp
.Append(gSOAPStrings
->kXSPrefix
);
327 rv
= encoding
->GetExternalSchemaURI(gSOAPStrings
->kXSURI
, temp2
);
330 rv
= envelope
->SetAttributeNS(gSOAPStrings
->kXMLNamespaceNamespaceURI
, temp
, temp2
);
333 temp
.Assign(gSOAPStrings
->kXMLNamespacePrefix
);
334 temp
.Append(gSOAPStrings
->kXSIPrefix
);
335 rv
= encoding
->GetExternalSchemaURI(gSOAPStrings
->kXSIURI
, temp2
);
338 rv
= envelope
->SetAttributeNS(gSOAPStrings
->kXMLNamespaceNamespaceURI
, temp
, temp2
);
342 // Encode and add headers, if any were specified
344 if (aHeaderBlockCount
) {
345 nsCOMPtr
<nsIDOMElement
> parent
;
346 rv
= GetHeader(getter_AddRefs(parent
));
349 nsCOMPtr
<nsISOAPHeaderBlock
> header
;
350 nsCOMPtr
<nsIDOMElement
> element
;
352 nsAutoString namespaceURI
;
354 for (i
= 0; i
< aHeaderBlockCount
; i
++) {
355 header
= aHeaderBlocks
[i
];
357 return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE
,"SOAP_NULL_HEADER","Cannot encode null in header array.");
358 rv
= header
->GetElement(getter_AddRefs(element
));
360 nsCOMPtr
<nsIDOMNode
> node1
;
362 nsCOMPtr
<nsIDOMNode
> node2
;
363 rv
= mMessage
->ImportNode(node1
, PR_TRUE
, getter_AddRefs(node1
));
366 rv
= parent
->AppendChild(node2
, getter_AddRefs(node1
));
369 element
= do_QueryInterface(node1
);
371 rv
= header
->GetNamespaceURI(namespaceURI
);
374 rv
= header
->GetName(name
);
377 nsAutoString actorURI
;
378 rv
= header
->GetActorURI(actorURI
);
381 PRBool mustUnderstand
;
382 rv
= header
->GetMustUnderstand(&mustUnderstand
);
385 rv
= header
->GetEncoding(getter_AddRefs(encoding
));
389 rv
= GetEncoding(getter_AddRefs(encoding
));
393 nsCOMPtr
<nsISchemaType
> schemaType
;
394 rv
= header
->GetSchemaType(getter_AddRefs(schemaType
));
397 nsCOMPtr
<nsIVariant
> value
;
398 rv
= header
->GetValue(getter_AddRefs(value
));
401 rv
= encoding
->Encode(value
, namespaceURI
, name
,
402 schemaType
, nsnull
, parent
,
403 getter_AddRefs(element
));
406 if (!actorURI
.IsEmpty()) {
407 element
->SetAttributeNS(gSOAPStrings
->kSOAPEnvPrefix
,
408 gSOAPStrings
->kActorAttribute
, actorURI
);
412 if (mustUnderstand
) {
413 element
->SetAttributeNS(gSOAPStrings
->kSOAPEnvPrefix
,
414 gSOAPStrings
->kMustUnderstandAttribute
,
415 gSOAPStrings
->kTrueA
);
419 if (mEncoding
!= encoding
) {
421 encoding
->GetStyleURI(enc
);
423 SetAttributeNS(*gSOAPStrings
->kSOAPEnvURI
[aVersion
],
424 gSOAPStrings
->kEncodingStyleAttribute
, enc
);
429 nsCOMPtr
<nsIDOMElement
> body
;
430 rv
= GetBody(getter_AddRefs(body
));
434 // Only produce a call element if mMethodName was non-empty
436 if (!aMethodName
.IsEmpty()) {
438 rv
= encoding
->GetExternalSchemaURI(aTargetObjectURI
, temp
);
439 nsCOMPtr
<nsIDOMElement
> call
;
440 rv
= mMessage
->CreateElementNS(temp
, aMethodName
,
441 getter_AddRefs(call
));
444 nsCOMPtr
<nsIDOMNode
> ignored
;
445 rv
= body
->AppendChild(call
, getter_AddRefs(ignored
));
450 // Encode and add all of the parameters into the body
452 nsCOMPtr
<nsISOAPParameter
> param
;
453 nsCOMPtr
<nsIDOMElement
> element
;
454 nsCOMPtr
<nsISOAPEncoding
> newencoding
;
456 nsAutoString namespaceURI
;
458 for (i
= 0; i
< aParameterCount
; i
++) {
459 param
= aParameters
[i
];
461 return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE
,"SOAP_NULL_PARAMETER","Cannot encode null in parameter array.");
462 rv
= param
->GetElement(getter_AddRefs(element
));
464 nsCOMPtr
<nsIDOMNode
> node1
;
466 nsCOMPtr
<nsIDOMNode
> node2
;
467 rv
= mMessage
->ImportNode(node1
, PR_TRUE
, getter_AddRefs(node2
));
470 rv
= body
->AppendChild(node2
, getter_AddRefs(node1
));
473 element
= do_QueryInterface(node1
);
475 rv
= param
->GetNamespaceURI(namespaceURI
);
478 rv
= param
->GetName(name
);
481 rv
= param
->GetEncoding(getter_AddRefs(newencoding
));
485 newencoding
= encoding
;
487 nsCOMPtr
<nsISchemaType
> schemaType
;
488 rv
= param
->GetSchemaType(getter_AddRefs(schemaType
));
491 nsCOMPtr
<nsIVariant
> value
;
492 rv
= param
->GetValue(getter_AddRefs(value
));
495 rv
= newencoding
->Encode(value
, namespaceURI
, name
,
496 schemaType
, nsnull
, body
,
497 getter_AddRefs(element
));
500 if (encoding
!= newencoding
) {
502 newencoding
->GetStyleURI(enc
);
503 element
->SetAttributeNS(*gSOAPStrings
->kSOAPEnvURI
[aVersion
],
504 gSOAPStrings
->kEncodingStyleAttribute
, enc
);
512 * Internally used to track down the encoding to be used at the headers
513 * or parameters. We know the version is legal, or we couldn't have
514 * found a starting point, so it is used but not checked again. We
515 * also know that since there is a version, there is an encoding.
518 nsSOAPMessage::GetEncodingWithVersion(nsIDOMElement
* aFirst
,
520 nsISOAPEncoding
** aEncoding
)
522 nsCOMPtr
<nsISOAPEncoding
> encoding
;
523 nsresult rv
= GetEncoding(getter_AddRefs(encoding
));
526 rv
= GetVersion(aVersion
);
529 nsCOMPtr
<nsIDOMElement
> element
= aFirst
;
531 // Check for stray encodingStyle attributes. If none found, then
532 // use empty string encoding style.
536 nsCOMPtr
<nsIDOMAttr
> enc
;
537 rv
= element
->GetAttributeNodeNS(*gSOAPStrings
->kSOAPEnvURI
[*aVersion
],
538 gSOAPStrings
->kEncodingStyleAttribute
,
539 getter_AddRefs(enc
));
543 rv
= enc
->GetNodeValue(style
);
548 nsCOMPtr
<nsIDOMNode
> next
;
549 rv
= element
->GetParentNode(getter_AddRefs(next
));
554 rv
= next
->GetNodeType(&type
);
557 if (type
!= nsIDOMNode::ELEMENT_NODE
) {
562 element
= do_QueryInterface(next
);
568 return encoding
->GetAssociatedEncoding(style
, PR_TRUE
, aEncoding
);
571 /* void getHeaderBlocks (out PRUint32 aCount, [array, size_is (aCount), retval] out nsISOAPHeaderBlock aHeaderBlocks); */
573 nsSOAPMessage::GetHeaderBlocks(PRUint32
* aCount
,
574 nsISOAPHeaderBlock
*** aHeaderBlocks
)
576 NS_ENSURE_ARG_POINTER(aHeaderBlocks
);
577 nsISOAPHeaderBlock
** headerBlocks
= nsnull
;
579 *aHeaderBlocks
= nsnull
;
583 nsCOMPtr
<nsIDOMElement
> element
;
584 nsresult rv
= GetHeader(getter_AddRefs(element
));
585 if (NS_FAILED(rv
) || !element
)
587 nsCOMPtr
<nsISOAPEncoding
> encoding
;
589 rv
= GetEncodingWithVersion(element
, &version
, getter_AddRefs(encoding
));
592 nsCOMPtr
<nsIDOMElement
> next
;
594 nsCOMPtr
<nsISOAPHeaderBlock
> header
;
595 nsSOAPUtils::GetFirstChildElement(element
, getter_AddRefs(next
));
597 if (length
== count
) {
598 length
= length
? 2 * length
: 10;
600 (nsISOAPHeaderBlock
* *)nsMemory::Realloc(headerBlocks
,
602 sizeof(*headerBlocks
));
605 header
= do_CreateInstance(NS_SOAPHEADERBLOCK_CONTRACTID
);
607 rv
= NS_ERROR_OUT_OF_MEMORY
;
610 header
->Init(nsnull
, version
);
612 (headerBlocks
)[(count
)] = header
;
613 NS_ADDREF((headerBlocks
)[(count
)]);
616 rv
= header
->SetElement(element
);
619 rv
= header
->SetEncoding(encoding
);
622 nsSOAPUtils::GetNextSiblingElement(element
, getter_AddRefs(next
));
624 if (NS_SUCCEEDED(rv
)) {
627 (nsISOAPHeaderBlock
* *)nsMemory::Realloc(headerBlocks
,
629 sizeof(*headerBlocks
));
633 while (--count
>= 0) {
634 NS_IF_RELEASE(headerBlocks
[count
]);
637 nsMemory::Free(headerBlocks
);
638 headerBlocks
= nsnull
;
641 *aHeaderBlocks
= headerBlocks
;
645 /* void getParameters (in boolean aDocumentStyle, out PRUint32 aCount, [array, size_is (aCount), retval] out nsISOAPParameter aParameters); */
647 nsSOAPMessage::GetParameters(PRBool aDocumentStyle
, PRUint32
* aCount
,
648 nsISOAPParameter
*** aParameters
)
650 NS_ENSURE_ARG_POINTER(aParameters
);
651 nsISOAPParameter
** parameters
= nsnull
;
653 *aParameters
= nsnull
;
656 nsCOMPtr
<nsIDOMElement
> element
;
657 nsresult rv
= GetBody(getter_AddRefs(element
));
658 if (NS_FAILED(rv
) || !element
)
660 nsCOMPtr
<nsIDOMElement
> next
;
661 nsCOMPtr
<nsISOAPParameter
> param
;
662 nsSOAPUtils::GetFirstChildElement(element
, getter_AddRefs(next
));
663 if (!aDocumentStyle
) {
666 return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE
,"SOAP_MISSING_METHOD","Cannot decode rpc-style message due to missing method element.");
667 nsSOAPUtils::GetFirstChildElement(element
, getter_AddRefs(next
));
669 nsCOMPtr
<nsISOAPEncoding
> encoding
;
671 rv
= GetEncodingWithVersion(element
, &version
, getter_AddRefs(encoding
));
675 if (length
== count
) {
676 length
= length
? 2 * length
: 10;
678 (nsISOAPParameter
* *)nsMemory::Realloc(parameters
,
680 sizeof(*parameters
));
683 param
= do_CreateInstance(NS_SOAPPARAMETER_CONTRACTID
);
685 rv
= NS_ERROR_OUT_OF_MEMORY
;
688 parameters
[count
] = param
;
689 NS_ADDREF(parameters
[count
]);
692 rv
= param
->SetElement(element
);
695 rv
= param
->SetEncoding(encoding
);
698 nsSOAPUtils::GetNextSiblingElement(element
, getter_AddRefs(next
));
700 if (NS_SUCCEEDED(rv
)) {
703 (nsISOAPParameter
* *)nsMemory::Realloc(parameters
,
705 sizeof(*parameters
));
709 while (--count
>= 0) {
710 NS_IF_RELEASE(parameters
[count
]);
713 nsMemory::Free(parameters
);
717 *aParameters
= parameters
;
721 /* attribute nsISOAPEncoding encoding; */
722 NS_IMETHODIMP
nsSOAPMessage::GetEncoding(nsISOAPEncoding
* *aEncoding
)
724 NS_ENSURE_ARG_POINTER(aEncoding
);
727 nsresult rc
= GetVersion(&version
);
730 if (version
!= nsISOAPMessage::VERSION_UNKNOWN
) {
731 nsCOMPtr
<nsISOAPEncoding
> encoding
=
732 do_CreateInstance(NS_SOAPENCODING_CONTRACTID
);
734 return NS_ERROR_OUT_OF_MEMORY
;
735 if (version
== nsISOAPMessage::VERSION_1_1
) {
737 GetAssociatedEncoding(gSOAPStrings
->kSOAPEncURI11
,
738 PR_FALSE
, getter_AddRefs(mEncoding
));
742 GetAssociatedEncoding(gSOAPStrings
->kSOAPEncURI
,
743 PR_FALSE
, getter_AddRefs(mEncoding
));
749 *aEncoding
= mEncoding
;
750 NS_IF_ADDREF(*aEncoding
);
754 NS_IMETHODIMP
nsSOAPMessage::SetEncoding(nsISOAPEncoding
* aEncoding
)
756 mEncoding
= aEncoding
;