on 11-07-2013 4:57 AM
Hi,
I am trying to reach an EJB web service using Ajax but i am seeing below error and not able to figure out what can be the cause.
The name of the webservice is EERDelLinesAuditServices and method name is - getDeletedLineItems with two parameters of type String - DateFrom and DateTo.
Below is the code i am using to reach:
var
soapMessage = '<?xml version="1.0" encoding="utf-8"?>'
+
'<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">'
+
'<SOAP-ENV:Body>'
+
'<ns1:getDeletedLineItems xmlns:ns1="urn:EERDelLinesAuditServices">'
+
'<DateFrom xsi:type="xsd:string">2013-10-01</DateFrom>'
+
'<DateTo xsi:type="xsd:string">2013-10-30</DateTo>'
+
'</ns1:getDeletedLineItems>'
+
'</SOAP-ENV:Body>'
+
'</SOAP-ENV:Envelope>' ;
$.ajax({
url : http://xxxxxx.xxxxxxxxxxxx.com:50000/EERDelLinesAuditServices/EERDelLinesAuditServices,
type : "POST",
dataType : "xml",
data : soapMessage,
contentType : "text/xml; charset=\"utf-8\"",
success : function(resp) {
alert("we have a successfull response!" + resp);
},
error: function(error) {
alert(error.responseText);
}
});
However this is returning the error message as:
com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException:
com.sap.SOA.wsr.030106 - No operation found using soap keys
[urn:EERDelLinesAuditServices], [getDeletedLineItems], []. InterfaceMapping
Object class:
com.sap.engine.services.webservices.espbase.mappings.InterfaceMapping.
mappings: {BindingType=Soap,
SEIName=com.xxx.ap.eerdeletedlinesaudit.report.service.EERDelLinesAuditServices,
PortTypeQName={http://xxx.com/ap/eerdeletedlinesaudit/report/service/}EERDelLinesAuditServices,
PortQName={http://xxx.com/ap/eerdeletedlinesaudit/report/service/}EERDelLinesAuditServicesPort,
InterfaceMappingID=3f71e9:14181a7e681:-7071, JAXWSInterface=true,
BindingQName={http://xxx.com/ap/eerdeletedlinesaudit/report/service/}EERDelLinesAuditServicesBinding,
SoapVersion=SOAP11,
ServiceQName={http://xxx.com/ap/eerdeletedlinesaudit/report/service/}EERDelLinesAuditServices}.
My understanding is that, it is successfull in reaching the webserivce successfully but somehow not able to reconginize the operation/ method - getDeletedLineItems which i am not able to figure out why and need help.
Thanks in Advance,
- Vipin.
Hi,
This got figured out in a day and now as was browising through my previous dicussions updating it.
The body section in above wasn' t correct, the best way to figure out what to pass is by using web service navigator and to see how in xml form the input parameters are getting passed, corrected it and it worked.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.