Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    RESTfull data integration

    Hi,

    there is an RestfulDataSourceSample example in the smartgwt showcase. I have created a restfull service and start it as http://localhost:8080/myrestfullservice/rest/response

    I get this response
    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
     <response>
     <data>
     <record>
      <capital>Saved Value</capital> 
      <continent>Saved Value</continent> 
      <countryCode>A1</countryCode> 
      <countryName>USA</countryName> 
      </record>
      </data>
      <status>0</status> 
      </response>
    It is the same xml as this one in "country_add_rest.xml". If I set this url into

    Code:
     countryDS.setAddDataURL("http://localhost:8080/myrestfullservice/rest/response");
    I get allert window with
    "<response xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:type="xsd:Object"><data>Transport error - HTTP code: 0 for URL: http://localhost:8080/myrestfullservice/rest/response</data><status xsi:type="xsd:long">-90</status></response>"

    What do I wrong?

    Thanks in advance.

    #2
    Don't use a fully qualified URL, or it will be assumed to be potentially on another host, which is not normally allowed.

    Comment


      #3
      I've tried with:

      localhost:8080/myrestfullservice/rest/response
      /myrestfullservice/rest/response
      myrestfullservice/rest/response

      but it is don't work.
      What is a fully qualified URL?

      And if I want to use another host, which possibilities I have?

      Comment

      Working...
      X