Providing more detail, I have debugged in the javascript file. And I tried to
send a soap envelope with the following javascript code, also pasted axis2c
log bellow.

================================================================================
try {
        var soapXml = "<?xml version=\"1.0\" 
encoding=\"UTF-8\"?><soap-env:Envelope
xmlns:soap-env=\"http:\/\/schemas.xmlsoap.org/soap/envelope/\"
xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\";
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\";><soap-env:Body
xmlns:jns0='http://uk.ac.ed.maths.org/xsd'
xmlns:jns1='http://uk.ac.ed.maths.org' ><jns1:optimizePortfolioSSD
xmlns:jns0='http://uk.ac.ed.maths.org/xsd'
xmlns:jns1='http://uk.ac.ed.maths.org' ><jns1:args0
xmlns:jns0='http://uk.ac.ed.maths.org/xsd'
><jns0:symbols>GOOG</jns0:symbols><jns0:symbols>AAPL</jns0:symbols><jns0:symbols>MSFT</jns0:symbols></jns1:args0><jns1:args1>INDEX</jns1:args1><jns1:args2>2012-02-01T00:00:00</jns1:args2><jns1:args3>2012-03-01T00:00:00</jns1:args3></jns1:optimizePortfolioSSD></soap-env:Body></soap-env:Envelope>";
        var req = new XMLHttpRequest();
        req.open("POST","http://localhost:8080/axis2/services/Alm",true);
        req.onreadystatechange = alert(req.readyState);
        req.setRequestHeader("MessageType", "CALL");
        req.setRequestHeader("Content-Type", "text/xml");
        req.setRequestHeader("Content-Length", soapXml.length);
        req.setRequestHeader("SOAPAction","urn:optimizePortfolioSSD");
        req.send(soapXml);
        }
        catch(ex)
        {
                throw ex;
        }
================================================================
Axis2c log

[Sun Mar 18 19:09:18 2012] [debug] apache2_worker.c(238)
http://localhost:8080/axis2/services/Alm
[Sun Mar 18 19:09:18 2012] [debug] apache2_worker.c(280) Client HTTP version
HTTP/1.1
=============================================================
wireshark tcp stream for the request

OPTIONS /axis2/services/Alm HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:11.0) Gecko/20100101
Firefox/11.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Origin: http://172.20.104.190
Access-Control-Request-Method: POST
Access-Control-Request-Headers: content-type,messagetype,soapaction
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.1 501 Method Not Implemented
Date: Sun, 18 Mar 2012 19:16:49 GMT
Server: Apache/2.2.20 (Ubuntu)
Content-Length: 158
Connection: close
Content-Type: text/html

<html><head><title>501 Not Implemented</title></head><body>
Not Implemented
<p>The requested Method is notimplemented on this server.</p></body></html>
=================================================================
Thanks for anyone can provide a comment or hints. 

--
View this message in context: 
http://cxf.547215.n5.nabble.com/help-generated-javascript-client-not-sending-request-properly-tp5575360p5575517.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to