Hello Gagan,

Have you tried to send the SOAPAction as an HTTP Header?

Tugdual Grall
http://www.grallandco.com

On 6/7/07, Gagan Sinha <[EMAIL PROTECTED]> wrote:

 Hi



This is the First Web Service I have created. I have followed the
following Steps



   1. Deployed the axis as a web application in Weblogic 8.1 sp2
   2. Created a simple WebService called FirstWebService (appends Hello
   to the passed String and returns the new String) and updated the
   server-config.xml
   3. Also Enabled the SoapMonitor for this webService.
   4. The url
   http://localhost:7001/7001/axis/services/FirstWebservice?wsdlreturns me the 
wsdl file and works fine the eclipse plugin which creates the
   SOAP request and sends back the response using the wsdl file.



----------------------------------------------SOAP
REQUEST----------------------------------------------

<?xml version="1.0" encoding="ISO-8859-1"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/"; xmlns:SOAP-ENC="
http://schemas.xmlsoap.org/soap/encoding/"; xmlns:m="
http://test.webservices.hrblock.com"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="
http://www.w3.org/2001/XMLSchema"; SOAP-ENV:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/";>

    <SOAP-ENV:Body>

        <sayHello xmlns="http://test.webservices.hrblock.com";>

            <poName xsi:type="xsd:string">Gagan

     </poName>

        </sayHello>

    </SOAP-ENV:Body>

</SOAP-ENV:Envelope>





---------------------------SOAP
RESPONSE----------------------------------------------------------------------

<?xml version="1.0" encoding="ISO-8859-1"?>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";>

    <soapenv:Body>

        <ns1:sayHelloResponse soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"; xmlns:ns1="
http://test.webservices.hrblock.com";>

            <sayHelloReturn xsi:type="xsd:string">HelloGagan
</sayHelloReturn>

        </ns1:sayHelloResponse>

    </soapenv:Body>

</soapenv:Envelope>



But when I try to send the request using AJAX XMLHttpRequest it returned a
fault code  "NoSOAPAction".



On Setting the setReqestHeader("SOAPAction","/") . It now Returns ..



<faultcode>soapenv:Server.userException</faultcode><faultstring>
org.xml.sax.SAXParseException: Element type &quot;SOAP-ENV:Envelope&quot;
must be followed by either attribute specifications, &quot;&gt;&quot; or
&quot;/&gt;&quot;.</faultstring>



Any Suggestions on how to get it working.



Thanks in Advance

Regards

Gagan



Reply via email to