1. #31
    Ext User
    Join Date
    Aug 2007
    Posts
    119
    Vote Rating
    0
    sierk is on a distinguished road

      0  

    Default


    Quote Originally Posted by egobits View Post
    @Sierk:
    Is it possible to use your class without the ws_proxy.php? the CURL library is giving us to much trouble on our windows based server

    The errors we still get is because the curl_init() function doesnt work properly.
    Yes you can, but then the webservice must be on same server as your webserver. In this case just remove the wsproxy parameter.

    Sierk

  2. #32
    Ext User brumby007's Avatar
    Join Date
    Dec 2007
    Posts
    150
    Vote Rating
    0
    brumby007 is on a distinguished road

      0  

    Default


    hi everyone, i have some problems in using ext.soappackage
    At first,i deploy gsoap-linux-2.7 in the server to be a webservice server(just running the webserver sample with ./webserver 9000 which under its sample foler).
    Then i open my browser to check if the webservice server is ready(visit the url http://192.168.1.103:9000/calc.htm).You can find my attatchment to see the screenshot,i saw it works fine..it can do a calculate when i input two numbers,and the webservice return the result with the xml format.
    At last,i deploy my test page to the tomcat webserver.But in the firebug,it tells me there is a uncaught exception:XMLHttpRequest.open.
    Is there anything wrong?

    testWebService.jsp
    PHP Code:
    <%@ page contentType="text/html;charset=UTF-8"%>
    <%@ 
    taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <
    html>
     <
    title>Test Web Service</title>
     <
    link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/ext-all.css" />
     <
    body>
     </
    body>
    </
    html>
    <
    script type="text/javascript" src="<%=request.getContextPath()%>/js/ext-base.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/js/ext-all.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/js/ext-lang-zh_CN.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/js/Ext.ux.Soap.js"></script>
    <script>
     var o = {
      //wsproxy : "http://localhost/webservice/ws_proxy.php",
      url : "http://192.168.1.103:9000",
      //disableCaching: false,
      method : "calc",
      params : {
         addRequest : [
          {
            a : 100,
            o: 'a',
            b : 300
          }
         ]
      }
     }
     
     var proxy = new Ext.ux.soap.SoapProxy(o);
     var reader = new Ext.ux.soap.SoapReader(
     [
       {name:'result', mapping:'result'}
     ]
     );
     var store = new Ext.data.Store({
      proxy: proxy,
      reader: reader
     });
     store.load();
     var grid = new Ext.grid.GridPanel({
      store: store,
      columns: [
         {id:'id',header: "addResponse", width: 160, sortable: true, dataIndex: 'addResponse'}
      ],
      viewConfig: {forceFit:true},
      loadMask: true,
      title:'Test'
     });
      view = new Ext.Viewport({
      layout : 'fit',
      items: grid
      }); 
    </script> 
    my wsdl :

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="webserver"
     targetNamespace="http://www.cs.fsu.edu/~engelen/webserver.wsdl"
     xmlns:tns="http://www.cs.fsu.edu/~engelen/webserver.wsdl"
     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
     xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:ns="urn:demowebserver"
     xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
     xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
     xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
     xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
     xmlns="http://schemas.xmlsoap.org/wsdl/">
    <types>
     <schema targetNamespace="urn:demowebserver"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:ns="urn:demowebserver"
      xmlns="http://www.w3.org/2001/XMLSchema"
      elementFormDefault="unqualified"
      attributeFormDefault="unqualified">
      <import namespace="<A href="http://schemas.xmlsoap.org/soap/encoding/"/">http://schemas.xmlsoap.org/soap/encoding/"/>
     </schema>
    </types>
    <message name="addRequest">
     <part name="param-1" type="xsd:double"/>
     <part name="param-2" type="xsd:double"/>
    </message>
    <message name="addResponse">
     <part name="param-3" type="xsd:double"/>
    </message>
    <message name="subRequest">
     <part name="param-4" type="xsd:double"/>
     <part name="param-5" type="xsd:double"/>
    </message>
    <message name="subResponse">
     <part name="param-6" type="xsd:double"/>
    </message>
    <message name="mulRequest">
     <part name="param-7" type="xsd:double"/>
     <part name="param-8" type="xsd:double"/>
    </message>
    <message name="mulResponse">
     <part name="param-9" type="xsd:double"/>
    </message>
    <message name="divRequest">
     <part name="param-10" type="xsd:double"/>
     <part name="param-11" type="xsd:double"/>
    </message>
    <message name="divResponse">
     <part name="param-12" type="xsd:double"/>
    </message>
    <message name="addResponseRequest">
     <part name="param-13" type="xsd:double"/>
    </message>
    <message name="subResponseRequest">
     <part name="param-15" type="xsd:double"/>
    </message>
    <message name="mulResponseRequest">
     <part name="param-17" type="xsd:double"/>
    </message>
    <message name="divResponseRequest">
     <part name="param-19" type="xsd:double"/>
    </message>
    <portType name="webserverPortType">
     <operation name="add">
      <documentation>Service definition of function ns__add</documentation>
      <input message="tns:addRequest"/>
      <output message="tns:addResponse"/>
     </operation>
     <operation name="sub">
      <documentation>Service definition of function ns__sub</documentation>
      <input message="tns:subRequest"/>
      <output message="tns:subResponse"/>
     </operation>
     <operation name="mul">
      <documentation>Service definition of function ns__mul</documentation>
      <input message="tns:mulRequest"/>
      <output message="tns:mulResponse"/>
     </operation>
     <operation name="div">
      <documentation>Service definition of function ns__div</documentation>
      <input message="tns:divRequest"/>
      <output message="tns:divResponse"/>
     </operation>
     <operation name="addResponse">
      <documentation>Service definition of function ns__addResponse_</documentation>
      <input message="tns:addResponseRequest"/>
     </operation>
     <operation name="subResponse">
      <documentation>Service definition of function ns__subResponse_</documentation>
      <input message="tns:subResponseRequest"/>
     </operation>
     <operation name="mulResponse">
      <documentation>Service definition of function ns__mulResponse_</documentation>
      <input message="tns:mulResponseRequest"/>
     </operation>
     <operation name="divResponse">
      <documentation>Service definition of function ns__divResponse_</documentation>
      <input message="tns:divResponseRequest"/>
     </operation>
    </portType>
    <binding name="webserver" type="tns:webserverPortType">
     <SOAP:binding style="rpc" transport="<A href="http://schemas.xmlsoap.org/soap/http"/">http://schemas.xmlsoap.org/soap/http"/>
     <operation name="add">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
       <SOAP:body use="encoded" namespace="urn:demowebserver" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/"/">http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
       <SOAP:body use="encoded" namespace="urn:demowebserver" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/"/">http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
     </operation>
     <operation name="sub">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
       <SOAP:body use="encoded" namespace="urn:demowebserver" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/"/">http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
       <SOAP:body use="encoded" namespace="urn:demowebserver" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/"/">http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
     </operation>
     <operation name="mul">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
       <SOAP:body use="encoded" namespace="urn:demowebserver" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/"/">http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
       <SOAP:body use="encoded" namespace="urn:demowebserver" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/"/">http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
     </operation>
     <operation name="div">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
       <SOAP:body use="encoded" namespace="urn:demowebserver" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/"/">http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
       <SOAP:body use="encoded" namespace="urn:demowebserver" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/"/">http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
     </operation>
     <operation name="addResponse">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
       <SOAP:body use="encoded" namespace="urn:demowebserver" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/"/">http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
     </operation>
     <operation name="subResponse">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
       <SOAP:body use="encoded" namespace="urn:demowebserver" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/"/">http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
     </operation>
     <operation name="mulResponse">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
       <SOAP:body use="encoded" namespace="urn:demowebserver" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/"/">http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
     </operation>
     <operation name="divResponse">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
       <SOAP:body use="encoded" namespace="urn:demowebserver" encodingStyle="<A href="http://schemas.xmlsoap.org/soap/encoding/"/">http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
     </operation>
    </binding>
    <service name="webserver">
     <documentation>gSOAP 2.7.0e generated service definition</documentation>
     <port name="webserver" binding="tns:webserver">
      <SOAP:address location="<A href="http://localhost:8080"/">http://localhost:8080"/>
     </port>
    </service>
    </definitions>

  3. #33
    Ext User brumby007's Avatar
    Join Date
    Dec 2007
    Posts
    150
    Vote Rating
    0
    brumby007 is on a distinguished road

      0  

    Default


    My screen shot here.
    Attached Images

  4. #34
    Ext User brumby007's Avatar
    Join Date
    Dec 2007
    Posts
    150
    Vote Rating
    0
    brumby007 is on a distinguished road

      0  

    Default


    That is the screenshot when i run my client in firefox2.it shows there is an uncaught exception.i test it in ie7 ,it can't work too.
    Can anyone help me?
    Attached Images

  5. #35
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    @brumby007 - I believe the 'same-origin' policy is what's causing you trouble:

    192.168.1.103:80 != 192.168.1.103:9000
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  6. #36
    Ext User brumby007's Avatar
    Join Date
    Dec 2007
    Posts
    150
    Vote Rating
    0
    brumby007 is on a distinguished road

      0  

    Default


    what's your mean?can you say more detail?
    Sorry.

  7. #37
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Your port numbers are different. To qualify as a "same-origin" XHR request, the service ports (9000) must be the same as that by which the main page was served up(80).
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  8. #38
    Ext User
    Join Date
    Aug 2007
    Posts
    119
    Vote Rating
    0
    sierk is on a distinguished road

      0  

    Default


    Quote Originally Posted by hendricd View Post
    Your port numbers are different. To qualify as a "same-origin" XHR request, the service ports (9000) must be the same as that by which the main page was served up(80).
    This means you need a proxy services to run on your webserver to redirect the service call from webserver to webserviceserver. In the example of myself you will find a simple PHP example of a proxy server.

    Sierk

  9. #39
    Ext User brumby007's Avatar
    Join Date
    Dec 2007
    Posts
    150
    Vote Rating
    0
    brumby007 is on a distinguished road

      0  

    Default


    Hi sierk, i am using your example in my apache web server.but there seems some errors were reported by firebug.You can get the screenshot in my attachment.
    Thanks for your reply.
    Attached Images

  10. #40
    Ext User
    Join Date
    Aug 2007
    Posts
    119
    Vote Rating
    0
    sierk is on a distinguished road

      0  

    Default


    Quote Originally Posted by brumby007 View Post
    Hi sierk, i am using your example in my apache web server.but there seems some errors were reported by firebug.You can get the screenshot in my attachment.
    Thanks for your reply.
    Hi looked at the stuff you provide and i think it is in the WSDL you use. We search for the Element tag prefix with a namespace to buildup a name list. Default this is xs:element. In your WSDL is see no elements.

    Sierk

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