AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke C# Webservice Daten in ein Datagrid bekommen
Thema durchsuchen
Ansicht
Themen-Optionen

Webservice Daten in ein Datagrid bekommen

Ein Thema von Luckie · begonnen am 7. Mär 2006 · letzter Beitrag vom 8. Mär 2006
Antwort Antwort
Seite 2 von 2     12   
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#11

Re: Webservice Daten in ein Datagrid bekommen

  Alt 8. Mär 2006, 07:02
Die WDSL hat mir das VS erstellt. Und im Moment sehe ich mich nicht in der Lage sie zu korrigieren. Desweiteren ist es nur eine Übung für mich, wie man mit Webservices Arbeitet. Letztendlich muss ich mit einem Webservice aus der Firma kommunizieren, der aber noch nicht existiert. Ein Kollege arbeitet mit dem selben Webservice unter Flex und damit scheint es zu gehen. Könnte mir jemand die WDSL korrigieren? Wäre das viel Arbeit? Und wie bekomme ich dann die korrigierte WDSL ins VS? Ich habe sie bisher über "Webverweis hinzufügen" importiert. Das VS hat mir dann auch gleich eine Komponente erstellt, die man benutzen kann.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#12

Re: Webservice Daten in ein Datagrid bekommen

  Alt 8. Mär 2006, 08:04
Sodele, an der Arbeit.

XML-Code:
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:tns1="http://www.macromedia.com/samples" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://flexapps.macromedia.com/ws/services/RestaurantWS" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:intf="http://flexapps.macromedia.com/ws/services/RestaurantWS" targetNamespace="http://flexapps.macromedia.com/ws/services/RestaurantWS" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.macromedia.com/samples">
      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <xsd:complexType name="RestaurantCategory">
        <xsd:sequence>
          <xsd:element name="categoryId" type="xsd:int" />
          <xsd:element name="name" nillable="true" type="xsd:string" />
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="RestaurantSummary">
        <xsd:sequence>
          <xsd:element name="city" nillable="true" type="xsd:string" />
          <xsd:element name="name" nillable="true" type="xsd:string" />
          <xsd:element name="restaurantId" type="xsd:int" />
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="Restaurant">
        <xsd:sequence>
          <xsd:element name="address" nillable="true" type="xsd:string" />
          <xsd:element name="categories" nillable="true" type="soapenc:Array" />
          <xsd:element name="city" nillable="true" type="xsd:string" />
          <xsd:element name="description" nillable="true" type="xsd:string" />
          <xsd:element name="image" nillable="true" type="xsd:string" />
          <xsd:element name="link" nillable="true" type="xsd:string" />
          <xsd:element name="name" nillable="true" type="xsd:string" />
          <xsd:element name="phone" nillable="true" type="xsd:string" />
          <xsd:element name="rating" type="xsd:int" />
          <xsd:element name="restaurantId" type="xsd:int" />
          <xsd:element name="zip" nillable="true" type="xsd:string" />
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="Review">
        <xsd:sequence>
          <xsd:element name="rating" type="xsd:int" />
          <xsd:element name="restaurantId" type="xsd:int" />
          <xsd:element name="reviewDate" nillable="true" type="xsd:dateTime" />
          <xsd:element name="reviewText" nillable="true" type="xsd:string" />
          <xsd:element name="reviewer" nillable="true" type="xsd:string" />
          <xsd:element name="title" nillable="true" type="xsd:string" />
        </xsd:sequence>
      </xsd:complexType>
    </xsd:schema>
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://flexapps.macromedia.com/ws/services/RestaurantWS">
      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <xsd:complexType name="ArrayOf_xsd_int">
        <xsd:complexContent mixed="false">
          <xsd:restriction base="soapenc:Array">
            <xsd:attribute wsdl:arrayType="xsd:int[]" ref="soapenc:arrayType" />
          </xsd:restriction>
        </xsd:complexContent>
      </xsd:complexType>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="getCategoriesRequest">
    <wsdl:part name="restaurantId" type="xsd:int" />
  </wsdl:message>
  <wsdl:message name="getRestaurantRequest">
    <wsdl:part name="restaurantId" type="xsd:int" />
  </wsdl:message>
  <wsdl:message name="getReviewsRequest">
    <wsdl:part name="restaurantId" type="xsd:int" />
  </wsdl:message>
  <wsdl:message name="getRestaurantResponse">
    <wsdl:part name="getRestaurantReturn" type="tns1:Restaurant" />
  </wsdl:message>
  <wsdl:message name="getCategoriesResponse">
    <wsdl:part name="getCategoriesReturn" type="soapenc:Array" />
  </wsdl:message>
  <wsdl:message name="getRestaurantsRequest" />
  <wsdl:message name="getRestaurantsResponse">
    <wsdl:part name="getRestaurantsReturn" type="soapenc:Array" />
  </wsdl:message>
  <wsdl:message name="addReviewResponse" />
  <wsdl:message name="addReviewRequest">
    <wsdl:part name="review" type="tns1:Review" />
  </wsdl:message>
  <wsdl:message name="getRestaurantsByCategoriesResponse">
    <wsdl:part name="getRestaurantsByCategoriesReturn" type="soapenc:Array" />
  </wsdl:message>
  <wsdl:message name="getReviewsResponse">
    <wsdl:part name="getReviewsReturn" type="soapenc:Array" />
  </wsdl:message>
  <wsdl:message name="getRatingResponse">
    <wsdl:part name="getRatingReturn" type="xsd:int" />
  </wsdl:message>
  <wsdl:message name="getRatingRequest">
    <wsdl:part name="restaurantId" type="xsd:int" />
  </wsdl:message>
  <wsdl:message name="getRestaurantsByCategoriesRequest">
    <wsdl:part name="categories" type="intf:ArrayOf_xsd_int" />
  </wsdl:message>
  <wsdl:portType name="RestaurantService">
    <wsdl:operation name="getCategories" parameterOrder="restaurantId">
      <wsdl:input name="getCategoriesRequest" message="intf:getCategoriesRequest" />
      <wsdl:output name="getCategoriesResponse" message="intf:getCategoriesResponse" />
    </wsdl:operation>
    <wsdl:operation name="getRating" parameterOrder="restaurantId">
      <wsdl:input name="getRatingRequest" message="intf:getRatingRequest" />
      <wsdl:output name="getRatingResponse" message="intf:getRatingResponse" />
    </wsdl:operation>
    <wsdl:operation name="getRestaurants">
      <wsdl:input name="getRestaurantsRequest" message="intf:getRestaurantsRequest" />
      <wsdl:output name="getRestaurantsResponse" message="intf:getRestaurantsResponse" />
    </wsdl:operation>
    <wsdl:operation name="getRestaurantsByCategories" parameterOrder="categories">
      <wsdl:input name="getRestaurantsByCategoriesRequest" message="intf:getRestaurantsByCategoriesRequest" />
      <wsdl:output name="getRestaurantsByCategoriesResponse" message="intf:getRestaurantsByCategoriesResponse" />
    </wsdl:operation>
    <wsdl:operation name="getRestaurant" parameterOrder="restaurantId">
      <wsdl:input name="getRestaurantRequest" message="intf:getRestaurantRequest" />
      <wsdl:output name="getRestaurantResponse" message="intf:getRestaurantResponse" />
    </wsdl:operation>
    <wsdl:operation name="getReviews" parameterOrder="restaurantId">
      <wsdl:input name="getReviewsRequest" message="intf:getReviewsRequest" />
      <wsdl:output name="getReviewsResponse" message="intf:getReviewsResponse" />
    </wsdl:operation>
    <wsdl:operation name="addReview" parameterOrder="review">
      <wsdl:input name="addReviewRequest" message="intf:addReviewRequest" />
      <wsdl:output name="addReviewResponse" message="intf:addReviewResponse" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="RestaurantWSSoapBinding" type="intf:RestaurantService">
    <wsdlsoap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
    <wsdl:operation name="getCategories">
      <wsdlsoap:operation soapAction="" />
      <wsdl:input name="getCategoriesRequest">
        <wsdlsoap:body use="encoded" namespace="http://restaurant.samples" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </wsdl:input>
      <wsdl:output name="getCategoriesResponse">
        <wsdlsoap:body use="encoded" namespace="http://flexapps.macromedia.com/ws/services/RestaurantWS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getRating">
      <wsdlsoap:operation soapAction="" />
      <wsdl:input name="getRatingRequest">
        <wsdlsoap:body use="encoded" namespace="http://restaurant.samples" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </wsdl:input>
      <wsdl:output name="getRatingResponse">
        <wsdlsoap:body use="encoded" namespace="http://flexapps.macromedia.com/ws/services/RestaurantWS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getRestaurants">
      <wsdlsoap:operation soapAction="" />
      <wsdl:input name="getRestaurantsRequest">
        <wsdlsoap:body use="encoded" namespace="http://restaurant.samples" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </wsdl:input>
      <wsdl:output name="getRestaurantsResponse">
        <wsdlsoap:body use="encoded" namespace="http://flexapps.macromedia.com/ws/services/RestaurantWS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getRestaurantsByCategories">
      <wsdlsoap:operation soapAction="" />
      <wsdl:input name="getRestaurantsByCategoriesRequest">
        <wsdlsoap:body use="encoded" namespace="http://restaurant.samples" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </wsdl:input>
      <wsdl:output name="getRestaurantsByCategoriesResponse">
        <wsdlsoap:body use="encoded" namespace="http://flexapps.macromedia.com/ws/services/RestaurantWS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getRestaurant">
      <wsdlsoap:operation soapAction="" />
      <wsdl:input name="getRestaurantRequest">
        <wsdlsoap:body use="encoded" namespace="http://restaurant.samples" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </wsdl:input>
      <wsdl:output name="getRestaurantResponse">
        <wsdlsoap:body use="encoded" namespace="http://flexapps.macromedia.com/ws/services/RestaurantWS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getReviews">
      <wsdlsoap:operation soapAction="" />
      <wsdl:input name="getReviewsRequest">
        <wsdlsoap:body use="encoded" namespace="http://restaurant.samples" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </wsdl:input>
      <wsdl:output name="getReviewsResponse">
        <wsdlsoap:body use="encoded" namespace="http://flexapps.macromedia.com/ws/services/RestaurantWS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="addReview">
      <wsdlsoap:operation soapAction="" />
      <wsdl:input name="addReviewRequest">
        <wsdlsoap:body use="encoded" namespace="http://restaurant.samples" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </wsdl:input>
      <wsdl:output name="addReviewResponse">
        <wsdlsoap:body use="encoded" namespace="http://flexapps.macromedia.com/ws/services/RestaurantWS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="RestaurantServiceService">
    <wsdl:port name="RestaurantWS" binding="intf:RestaurantWSSoapBinding">
      <wsdlsoap:address location="http://flexapps.macromedia.com/ws/services/RestaurantWS" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
Zeile 9 hat er mir markiert und zwar das xsd:import mit dem Hinweis "Importiertes Schema für den Namespace wurde nicht aufgelöst". Ebendso Zeile 11, 28, 53 und 56. Das sind wohl die Arrays. Was kann ich da jetzt tun?
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#13

Re: Webservice Daten in ein Datagrid bekommen

  Alt 8. Mär 2006, 14:29
Also ich weiß nicht, was ich wie in der WDSL Datei ändern/anpassen muss. Leider habe ich zu der WDSL Datei auch keine Dokumentation gefunden oder bei Macromedia irgendwas hilfreiches.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von Interceptor
Interceptor

Registriert seit: 28. Mai 2004
Ort: Würzburg
118 Beiträge
 
Delphi 6 Professional
 
#14

Re: Webservice Daten in ein Datagrid bekommen

  Alt 8. Mär 2006, 14:58
Wieso nimmst du nicht meinen Code als Grundlage?
Wie gesagt, jedes object im Array enthält wiederum nochmal XmlNodes, eleganter wird sich das wohl nicht lösen lassen

Beschädigt ist die WSDL-Datei nämlich nicht, nur die Darstellung im DataGridView ist wohl ein wenig aufwendiger als gewohnt.
Und etwas an der Datei zu ändern würde gegen jeden Sinn eines Webservices sprechen, da die Datei ja auf nem fremden Server gehostet wird.
David
~ Nichts ist wahr, alles ist erlaubt ~
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:54 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz