1. #1
    Sencha User
    Join Date
    Mar 2011
    Location
    Leicester
    Posts
    68
    Answers
    2
    Vote Rating
    0
    sadagopan is on a distinguished road

      0  

    Default Unanswered: WSDL in Phonegap

    Unanswered: WSDL in Phonegap


    I need to use WSDL Web services for my project .. how use it ? Im developing in phonegap with sencha UI ..

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,809
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Isn't it just XML basically?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Location
    Leicester
    Posts
    68
    Answers
    2
    Vote Rating
    0
    sadagopan is on a distinguished road

      0  

    Default This is my form & i need to retrieve it from the given URL . how can i do it

    This is my form & i need to retrieve it from the given URL . how can i do it


    This is my form & i need to retrieve it from the given URL . how can i do it.

    Ext.setup({
    icon: 'icon.png',
    tabletStartupScreen: 'tablet_startup.png',
    phoneStartupScreen: 'phone_startup.png',
    glossOnIcon: false,
    onReady: function() {


    var form;

    var formBase = {
    // url : 'postUser.php',
    standardSubmit : false,
    items: [{
    xtype: 'fieldset',
    title: 'User Credential ',
    instructions: 'Please enter the information above.',
    defaults: {
    required: true,
    labelAlign: 'center',
    labelWidth: '40%'
    },
    items: [
    {
    xtype: 'textfield',
    name : 'name',
    label: 'User Name',
    useClearIcon: true,
    autoCapitalize : false
    }, {
    xtype: 'passwordfield',
    name : 'password',
    label: 'Password',
    useClearIcon: true
    }, {
    xtype: 'hiddenfield',
    name : 'secret',
    value: 'false'
    }]
    },
    ],

    dockedItems: [
    {
    xtype: 'toolbar',
    dock: 'bottom',
    items: [



    {
    text: 'Reset',
    handler: function() {
    form.reset();
    }
    },
    {
    text: 'Login',
    ui: 'confirm',
    handler: function() {
    if(formBase.user){
    form.updateRecord(formBase.user, true);
    }
    form.submit({
    waitMsg : {message:'connecting to server'},

    url: 'http://krishna.srivatsanuk.com/opensso/identityservices?wsdl',
    method: 'POST',
    success: function(name,password) {
    alert('form submitted successfully!');
    }
    });
    }
    }
    ]
    }
    ]
    };

    if (Ext.is.Phone) {
    formBase.fullscreen = true;
    } else {
    Ext.apply(formBase, {
    autoRender: true,
    floating: true,
    modal: true,
    centered: true,
    hideOnMaskTap: false,
    height: 385,
    width: 480
    });
    }

    form = new Ext.form.FormPanel(formBase);
    form.show();
    }
    });

  4. #4
    Sencha User
    Join Date
    Jan 2012
    Posts
    25
    Vote Rating
    0
    mcaple is on a distinguished road

      0  

    Default


    As an alternative, I decorate the WebService method to use Json and it works really well, such as

    [WebMethod]
    [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
    public void mFunction(string param1, string callback)
    {
    ....


    string jsonString = objectval.ToJSON();

    HttpContext.Current.Response.Write(callback + "(" + jsonString + ");");
    }

  5. #5
    Sencha User
    Join Date
    Mar 2011
    Location
    Leicester
    Posts
    68
    Answers
    2
    Vote Rating
    0
    sadagopan is on a distinguished road

      0  

    Default Thank you

    Thank you


    Thank you for the reply . Is it possible to form.submit() can call a normal java script function ,that is in index.html ( where this form.js is loaded ) ? because my project use only wsdl

  6. #6
    Sencha User
    Join Date
    Jan 2012
    Posts
    25
    Vote Rating
    0
    mcaple is on a distinguished road

      0  

    Default


    Taking the sample I mention your javascript can now use something like

    Ext.data.JsonP.request({
    url: 'http://someserver/someservice/Service1.asmx/mFunction',
    callbackKey: 'callback',
    params: {
    param1: values.param1,
    callback: 'success'
    },
    success: function(result) {
    .....
    .....
    }});

  7. #7
    Sencha User
    Join Date
    Mar 2011
    Location
    Leicester
    Posts
    68
    Answers
    2
    Vote Rating
    0
    sadagopan is on a distinguished road

      0  

    Default error because of Url encode ()

    error because of Url encode ()


    I tried the same but it throws an error because of the URL encode () .


    Ext.setup({
    icon: 'icon.png',
    tabletStartupScreen: 'tablet_startup.png',
    phoneStartupScreen: 'phone_startup.png',
    glossOnIcon: false,
    onReady: function() {


    var form;
    var values;
    var formBase = {

    standardSubmit : false,
    items: [{
    xtype: 'fieldset',
    title: 'User Credential ',
    instructions: 'Please enter the information above.',
    defaults: {
    required: true,
    labelAlign: 'center',
    labelWidth: '40%'
    },
    items: [
    {
    xtype: 'textfield',
    name : 'name',
    label: 'User Name',
    useClearIcon: true,
    autoCapitalize : false
    }, {
    xtype: 'passwordfield',
    name : 'password',
    label: 'Password',
    useClearIcon: true
    }, {
    xtype: 'hiddenfield',
    name : 'secret',
    value: 'false'
    }]
    },
    ],

    dockedItems: [
    {
    xtype: 'toolbar',
    dock: 'bottom',
    items: [



    {
    text: 'Reset',
    handler: function() {
    form.reset();
    }
    },

    {
    text: 'Login',
    ui: 'confirm',

    handler: function() {
    values = form.getValues();
    form.submit({
    waitMsg : {message:'connecting to server'},

    url: 'http://krishna.srivatsanuk.com:8080/opensso/identityservices/IdentityServices?WSDL',
    callbackKey: 'callback',
    params: {
    param1: values.param1,
    param2:values.param2,
    callback: 'success'
    },
    success: function() {
    alert('form submitted successfully!');
    }
    });
    }
    }
    ]
    }
    ]
    };


    if (Ext.is.Phone) {
    formBase.fullscreen = true;
    } else {
    Ext.apply(formBase, {
    autoRender: true,
    floating: true,
    modal: true,
    centered: true,
    hideOnMaskTap: false,
    height: 385,
    width: 480
    });
    }

    form = new Ext.form.FormPanel(formBase);
    form.show();
    }
    });

  8. #8
    Sencha User
    Join Date
    Mar 2011
    Location
    Leicester
    Posts
    68
    Answers
    2
    Vote Rating
    0
    sadagopan is on a distinguished road

      0  

    Default


    Its SOAP based WSDL

  9. #9
    Sencha User
    Join Date
    Mar 2012
    Location
    Pensacola, FL
    Posts
    5
    Vote Rating
    1
    crystalsknowledge is on a distinguished road

      1  

    Default wsdl with Sencha Touch 2

    wsdl with Sencha Touch 2


    Here is what worked for me and I knew nothing about WCF, soap, wsdl or sencha touch. I hope it helps you.

    getUser : function() {
    form = this.getLoginForm();
    userID = form.getValues().userID,
    password = form.getValues().password,



    userIsOnline = true,
    validUser = false,
    url = '[Place Web Service Url here ]',

    soapMessage = '<?xml version=\"1.0\"?>',
    soapMessage += '<soapenv:Envelope>',
    soapMessage += '<soapenv:Header/>',
    soapMessage += '<soapenv:Body>',
    soapMessage +='[The meat and potatoes of your soap request goes here]'
    soapMessage += '</soapenv:Body>',
    soapMessage += '</soapenv:Envelope>',

    soapAction = '[Soap Action Url goes here]',


    Ext.Ajax.request({
    url: url,
    method: 'POST',
    withCredentials: true,
    useDefaultXhrHeader: false,
    headers: {
    "Content-Type": "text/xml",
    "SOAPAction": soapAction
    },
    xmlData : soapMessage,

    success: function(response) {
    xmlData = response.responseText;
    if(xmlData){
    xmlDoc=response.responseXML
    x = xmlDoc.getElementsByTagName("[Tag goes here]")[0];
    y=x.childNodes[0];
    txt=y.nodeValue;
    if(txt){
    alert('XML : ' + txt);

    //If authenticated grant access

    }else{
    alert('false');
    }
    }else{
    alert('What happened');
    }

    },
    faliure: function (response){
    alert(response);
    }
    });

    }
    I knew nothing about WCF wsdl and very little about sencha touch 2. So take what you can use and leave the rest. What really helped me was downloading SoapUI http://www.soapui.org. It helped me to learn more about the web service I was trying to consume and I was able to make calls. So I used the same soap request from soapUI to make my soap request in my app.

    Also jsonP is more practical to use but I could not get that to work. When using ajax request the cross domain error occurs in chrome but not in safari or on the iphone.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi