Call apache axis web service using jQuery

Call apache axis web service using jQuery

Hi 

       I am trying to call my web service from jquery code. The following parameters I have . Can anyone tell me exactly , How can I call my webservices. This is an apache axis, soap based webservice. I will give my WSDL file also.


  1. URL :  http://localhost:8080/TestServ/services/TestCls

  2. soapaction : var soapaction = "http://codon.com/login";

  3.  soapRequest ='<?xml version="1.0" encoding="utf-8"?>'+'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cod="'+'http://codon.com">'+
  4.    '<soapenv:Header/>'+
  5.    '<soapenv:Body>'+
  6.       '<cod:testMethod>'+
  7.          '<cod:name>XYZ</cod:name>'+
  8.       '</cod:testMethod>'+
  9.    '</soapenv:Body>'+
  10. '</soapenv:Envelope>';



  11. WSDL File :



  12. <wsdl:definitions targetNamespace="http://codon.com"><!--WSDL created by Apache Axis version: 1.4
  13. Built on Apr 22, 2006 (06:55:48 PDT)--><wsdl:types><schema elementFormDefault="qualified" targetNamespace="http://codon.com"><element name="testMethod"><complexType><sequence><element name="name" type="xsd:string"/></sequence></complexType></element><element name="testMethodResponse"><complexType><sequence><element name="testMethodReturn" type="xsd:string"/></sequence></complexType></element><element name="methodone"><complexType><sequence><element name="name" type="xsd:string"/><element name="acc_name" type="xsd:string"/></sequence></complexType></element><element name="methodoneResponse"><complexType><sequence><element name="methodoneReturn" type="xsd:string"/></sequence></complexType></element></schema></wsdl:types><wsdl:message name="methodoneRequest"><wsdl:part element="impl:methodone" name="parameters">

  14.       </wsdl:part></wsdl:message><wsdl:message name="testMethodResponse"><wsdl:part element="impl:testMethodResponse" name="parameters">

  15.       </wsdl:part></wsdl:message><wsdl:message name="testMethodRequest"><wsdl:part element="impl:testMethod" name="parameters">

  16.       </wsdl:part></wsdl:message><wsdl:message name="methodoneResponse"><wsdl:part element="impl:methodoneResponse" name="parameters">

  17.       </wsdl:part></wsdl:message><wsdl:portType name="TestCls"><wsdl:operation name="testMethod"><wsdl:input message="impl:testMethodRequest" name="testMethodRequest">

  18.        </wsdl:input><wsdl:output message="impl:testMethodResponse" name="testMethodResponse">

  19.        </wsdl:output></wsdl:operation><wsdl:operation name="methodone"><wsdl:input message="impl:methodoneRequest" name="methodoneRequest">

  20.        </wsdl:input><wsdl:output message="impl:methodoneResponse" name="methodoneResponse">

  21.        </wsdl:output></wsdl:operation></wsdl:portType><wsdl:binding name="TestClsSoapBinding" type="impl:TestCls"><wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="testMethod"><wsdlsoap:operation soapAction=""/><wsdl:input name="testMethodRequest"><wsdlsoap:body use="literal"/></wsdl:input><wsdl:output name="testMethodResponse"><wsdlsoap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="methodone"><wsdlsoap:operation soapAction=""/><wsdl:input name="methodoneRequest"><wsdlsoap:body use="literal"/></wsdl:input><wsdl:output name="methodoneResponse"><wsdlsoap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="TestClsService"><wsdl:port binding="impl:TestClsSoapBinding" name="TestCls"><wsdlsoap:address location="http://localhost:8080/TestServ/services/TestCls"/></wsdl:port></wsdl:service></wsdl:definitions>

Thats all I have . Can anybody give me exact code for calling my service. I have used javascript and jquery . But I am unable to invoke my service. Please give me an Idea. Thanks in advance