Michael Bolin wrote:

I'm creating a Mozilla extension that involves making a SOAP code, so
I have some JavaScript code like this:

function doSoap(some params) {
  call = new SOAPCall();
  call.transportURI = "the_url";
  call.encode(some params);
  call.invoke();
}

My extension also has a XUL overlay. When the user fills out the
information for the SOAP call through the XUL overlay and passes it to
the JavaScript, the code works as expected.

However, I would also like to run this JavaScript from an HTML page
that I include in my extension. Thus, I have a page whose URI is
something like:

jar:resource:///chrome/my-extension.jar!/locale/en-US/myPage.html?soapparam=value

But when myPage.html calls doSoap(), I get the following exception
when "call.invoke()" is reached in the script:

Error: uncaught exception: [Exception... "Component returned failure
code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsISOAPCall.invoke]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame ::
jar:resource:///chrome/GoogleDominoes-plugin.jar!/content/google_wsdl.js
:: doGoogleSearch :: line 204" data: no]


Thus, it seems like I have the permissions to call this from the XUL
of my extension, but not the HTML? Could someone help me make this
work from the HTML as well? Or does this have nothing to do with
permissions at all?

If HTML is served from chrome then you should have the same permissions as with XUL served from chrome.


--

        Martin Honnen
        http://JavaScript.FAQTs.com/

_______________________________________________
Mozilla-security mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-security

Reply via email to