i want to call a method from my html code (using jquery ajax) to a service having .wsdl as extension, that is going to return data in xml.
my html code is
my wsdl url is http://"localhost":8080/AdvanShelfWS/services/DBConnection?wsdl
when i paste this url in my browser it shows as
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://WebService" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org /2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org /wsdl/soap12/" targetNamespace="http://WebService">
<wsdl:documentation>Please Type your service description here</wsdl:documentation>
<wsdl:types>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://WebService">
<xs:element name="fnSelectAll">
<xs:complexType>
<xs:sequence/>
</xs:complexType>
</xs:element>
<xs:element name="fnSelectAllResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
how would i call this method named "fnSelectAllResponse" what would be the url ? what would be soap request ?
currently my html code is as follows
var wsUrl = "http://"localhost":8080/WS/services/DBConnection.DBConnectionHttpSoap11Endpoint/"
var soapRequest =
'<?xml version="1.0" encoding="utf-8"?> \
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
xmlns:xsd="http://www.w3.org/2001/XMLSchema" \
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> \
<soap:Body> \
<fnSelectAll xmlns="http://localhost:8080/WS/services/DBConnection?wsdl"> \
</fnSelectAll> \
</soap:Body> \
</soap:Envelope>';
$.ajax({
type: "POST",
url: wsUrl,
contentType: "text/xml",
dataType: "xml",
data: soapRequest,
success: function(msg){
alert("bingo");
},
error: function(msg){
alert("error");
},
contentType: "text/xml; charset=\"utf-8\"",
});