Results 1 to 2 of 2

Thread: How to handle extjs soap message from SOAP service?

  1. #1
    Sencha User
    Join Date
    Dec 2015
    Posts
    7

    Default Answered: How to handle extjs soap message from SOAP service?

    First, these codes are soap message generated from the soap web services. and Services deployments are successful.

    ==== Member.java
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlRootElement(name="member")
    @XmlType(name="",propOrder={"id", "passwd", "age", "name"})
    public class Member {

    @XmlElement
    private String id;

    @XmlElement
    private String passwd;

    @XmlElement
    private int age;

    @XmlElement
    private String name;

    And this is response soap message
    ===== SOAP message
    <soap:Envelope xmlnsoap="http://schemas.xmlsoap.org/soap/enve...OAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/>
    <soap:Body><ns2:getMemberResponse
    xmlns:ns2="http://soap.aaa.com/">
    <return>
    <id>aupres</id>
    <passwd>aaa</passwd>
    <age>45</age>
    <name>joseph</name>
    </return>
    <return>
    <id>hwa5383</id>
    <passwd>bbb</passwd>
    <age>40</age>
    <name>jina</name>
    </return>
    <return>
    <id>julian</id>
    <passwd>ccc</passwd>
    <age>15</age>
    <name>joseph's son</name>
    </return>
    </ns2:getMemberResponse>
    </soap:Body>
    </soap:Envelope>

    But I don't know how to extract soap message from the extjs client. Belows are extjs codes
    =======ExtJS client

    Ext.define('member', {
    extend: 'Ext.data.Model',

    fields : [{
    name : 'id',
    type : 'string'
    }, {
    name : 'passwd',
    type : 'string'
    }, {
    name : 'age',
    type : 'int'
    }, {
    name : 'name',
    type : 'string'
    }]

    });

    Ext.onReady(function () {

    var family = Ext.create('Ext.data.Store' , {

    model : 'member',
    autoLoad : true,
    proxy : {
    type : 'soap',
    url : 'CallMemberBean',
    api : {
    read : 'getMember'
    },
    soapAction : {
    read :''
    },
    operationParam : 'operation',
    targetNamespace : 'http://soap.aaa.com/',
    reader : {
    type : 'soap',
    rootProperty : 'member',
    record : 'ns2|return',
    Namespace : 'ns2'
    },
    exception: function(proxy, response, operation){
    Ext.MessageBox.show({
    title: 'REMOTE EXCEPTION',
    msg: operation.getError(),
    icon: Ext.MessageBox.ERROR,
    buttons: Ext.Msg.OK
    });
    }
    },

    listeners: {
    load: function(family, operation, success) {
    if(success) {
    console.log("It works!!!")
    console.log(family.data) // FAILED
    console.log(operation) // FAILED
    family.each(function (user) { // FAILED
    console.log(user) // FAILED
    })
    } else {
    console.log('it failed')
    }
    }
    }

    });

    var onButtonClick = function() {
    family.load()
    };

    The ExtJS client call Java SOAP web service endpoint interface successfully. But how can the soap message be extracted and handled? Your help is needed!
    Best regards


  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

Similar Threads

  1. SOAP Web Service
    By SmyersM in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 10 Apr 2007, 3:40 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •