IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Services Web Java Discussion :

[SOAP Client] ComplexType


Sujet :

Services Web Java

  1. #1
    Membre régulier Avatar de rgomes
    Homme Profil pro
    IT Developer JAVA Senior
    Inscrit en
    Juin 2004
    Messages
    128
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Suisse

    Informations professionnelles :
    Activité : IT Developer JAVA Senior
    Secteur : Service public

    Informations forums :
    Inscription : Juin 2004
    Messages : 128
    Points : 76
    Points
    76
    Par défaut [SOAP Client] ComplexType
    Bonjour à tous,

    J'utilise un client Apache Soap Client pour accéder au HolidayService tutorial de Spring (deployé sur mon Tomcat local). Je n'arrive pas à passer/récupérer les paramètres (StartDate/EnDate/LastaName...) :

    Call call = new Call(); // org.apache.soap.rpc
    call.setTargetObjectURI("http://mycompany.com/hr/schemas");
    call.setMethodName("HolidayRequest");
    call.setEncodingStyleURI(encodingStyleURI);
    Vector params = new Vector();
    params.addElement(new Parameter("StartDate", String.class, "2008-01-01",
    encodingStyleURI));
    params.addElement(new Parameter("EndDate", String.class, "2008-01-01",
    encodingStyleURI));
    params.addElement(new Parameter("FirstName", String.class, "Joe",
    encodingStyleURI));
    params.addElement(new Parameter("LastName", String.class, "Coll",
    encodingStyleURI));
    call.setParams(params);
    La requête actuelle mal formée :
    Content-Type: text/xml; charset=utf-8
    Content-Transfer-Encoding: 8bit
    Content-ID: <10883428.1208350637074.apache-soap.s00d>
    Content-Length: 641

    <?xml version='1.0' encoding='UTF-8'?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlnssd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:HolidayRequest xmlns:ns1="http://mycompany.com/hr/schemas" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <StartDate xsi:type="xsd:string">2008-01-01</StartDate>
    <EndDate xsi:type="xsd:string">2008-01-01</EndDate>
    <FirstName xsi:type="xsd:string">Joe</FirstName>
    <LastName xsi:type="xsd:string">Coll</LastName>
    </ns1:HolidayRequest>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Devrait être :
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://mycompany.com/hr/schemas">
    <soapenv:Header/>
    <soapenv:Body>
    <sch:HolidayRequest>
    <!--You may enter the following 2 items in any order-->
    <sch:Holiday>
    <sch:StartDate>2008-01-01</sch:StartDate>
    <sch:EndDate>2008-01-01</sch:EndDate>
    </sch:Holiday>
    <sch:Employee>
    <sch:Number>?</sch:Number>
    <sch:FirstName>?</sch:FirstName>
    <sch:LastName>?</sch:LastName>
    </sch:Employee>
    </sch:HolidayRequest>
    </soapenv:Body>
    </soapenv:Envelope>
    On holidayEndPoint, no values are received.
    [Element: <ns1:HolidayRequest [Namespace: http://mycompany.com/hr/schemas]/>]

    Merci par avance pour tout aide.

  2. #2
    oca
    oca est déconnecté
    Membre averti
    Profil pro
    Inscrit en
    Octobre 2004
    Messages
    354
    Détails du profil
    Informations personnelles :
    Âge : 51
    Localisation : Suisse

    Informations forums :
    Inscription : Octobre 2004
    Messages : 354
    Points : 421
    Points
    421
    Par défaut
    Est-ce que tu pourrais nous montrer la wsdl de ton service ?

    Apparament, vu le second exemplde de SOAP, il te manque un niveau...

    StartDate et EndDate devraient faire partie d'une structure Holiday
    Number, FirstName et LastName devraient faire partie d'une structure Employee

    A+

Discussions similaires

  1. [Web Service][SOAP] client php et web service windev
    Par pev15 dans le forum Bibliothèques et frameworks
    Réponses: 7
    Dernier message: 28/05/2010, 13h48
  2. [Web Service][SOAP] Client soap PHP et C#
    Par zulot dans le forum Bibliothèques et frameworks
    Réponses: 1
    Dernier message: 19/04/2007, 10h53
  3. [SOAP] Client d'un webservice sécurisé par SSL
    Par tom91 dans le forum XML/XSL et SOAP
    Réponses: 1
    Dernier message: 24/03/2006, 10h29
  4. [plugin - lomboz] pas de wizard Lomboz SOAP Client
    Par joseph_p dans le forum Eclipse Java
    Réponses: 1
    Dernier message: 29/12/2004, 13h05
  5. [SOAP] : client en PHP, serveur en kylix + .so
    Par RezzA dans le forum XML/XSL et SOAP
    Réponses: 2
    Dernier message: 27/01/2003, 16h53

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo