I am new to ExtJS and I am a Flex Developer. I am trying to do a mockup of a page we have in our Flex App. I am trying to do a basic service call to hit our servers (on same domain as the ExtJS App) and add the data into Store, which will then be populated into our dataGrid.
I did the tutorial online, but now I am trying to modify it to use my services from our Flex App. I am able to make the service call, and get a success response; However, it looks like the response is what you get when you paste the URL in your browser (this is a WSDL).
It is not hitting the actual method in the service, and returning data. I did do a simple soapclient.js JS project and was able to get data using that tool, but I do not get data back using Ajax. I think I am doing something simple wrong, but cannot figure it out.
Ext.define('DG.store.PhoneCalls', {
extend: 'Ext.data.Store',
model: 'DG.model.PhoneCall',
autoLoad: true,
proxy: {
type: "ajax",
dataType: 'xml',
contentType: 'text/xml; charset=utf-8',
data: '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Header> <ns0:HeaderID xmlns:ns0="http://urlgoeshere.com/"> <ns0:string>thisisastring</ns0:string> </ns0:HeaderID> </SOAP-ENV:Header> <SOAP-ENV:Body> <tns:getRecaPayments xmlns:tns="http://urlgoeshere.com/"> <arg0>false</arg0> </tns:getRecaPayments> </SOAP-ENV:Body></SOAP-ENV:Envelope>',
url: "https://urlgoeshere.com.com/Payments_UISupport_HTTPRouter/RecaCompFacadeService/RecaCompFacadeService.wsdl",
reader: {
type: 'xml',
root: 'return',
record: 'contents'
},
afterRequest:function(req, res) {
console.log("Result: " + req.operation.response);
}
}
});
When I debug, this is not hitting the method for this service. It returns the entire WSDL response that shows all of the methods available for that service.
In Flex, I have no issue. This app is on the same domain, so that is not the issue. I tried using soap in ExtJS and it didn't work either. I am sure it is a user error here! =)
All I need to do is:
Call this service: https://urlgoeshere.com.com/Payments_UISupport_HTTPRouter/RecaCompFacadeService/RecaCompFacadeService.wsdl
Pass in a false boolean
Hit this method within that service: getRecaPayments
This service returns a bunch of data like this:
<return>
<contents>
<name>Joe</name>
<ssn>111112222</ssn>
</contents>
<contents>
<name>Bob</name>
<ssn>222342222</ssn>
</contents>
<contents>
<name>Jan</name>
<ssn>555443333</ssn>
</contents>
</return>
Here is my model PhoneCall:
Ext.define('DG.model.PhoneCall', {
extend: 'Ext.data.Model',
fields: ['name', 'ssn']
});