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

Spring Java Discussion :

Problèmes ave un exemple SpringWS [Web Services]


Sujet :

Spring Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Avril 2009
    Messages
    48
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Avril 2009
    Messages : 48
    Par défaut Problèmes ave un exemple SpringWS
    Bonjour;
    Mon projet consiste à travailler avec Spring ws, malheureusement c'est la première fois que j'utilise les web services.
    j'ai suivi le tutorial http://hikage.developpez.com/java/tu...ice/spring-ws/mais je retrouve des problèmes:
    1- D'abord dans mon endPoint j'arrive pas à saisir cette partie
    "Traduction traduction = traductionService.traduitTexte(langueOrigine, langueDestination,
    texteOriginal);"
    2- J'ai lu dans le tuto du site http://static.springsource.org/sprin.../tutorial.html que le wsdl sera généré "we don't need to write a WSDL ourselves; Spring-WS can generate one for us based on some conventions", j'ai essayé mais il me génère pas le wsdl.
    3-Finalement, j'ai essayé d'écrire mon ficheir tradution.wsdl je ne sais aps si c'est correct ou pas, bref je vous mets mon code:
    TraductionEndPoint.java:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    package com.hr.ws;
     
    import org.springframework.ws.server.endpoint.AbstractJDomPayloadEndpoint;
    import org.jdom.Element;
    import org.jdom.JDOMException;
    import org.jdom.Namespace;
    import org.jdom.xpath.XPath;
     
    import com.hr.service.TraductionService;
     
    public class TraductionEndpoint extends AbstractJDomPayloadEndpoint {
     
     
    private XPath langueOrigineExpression;
    private XPath langueDestinationExpression;
    private XPath texteExpression;
    private TraductionService traductionService;
     
    public TraductionEndpoint(TraductionService traductionService) throws JDOMException {
    		this.traductionService=traductionService;
    		Namespace namespace = Namespace.getNamespace("traduction", "http://www.hikage.be/schema/traduction");
    		langueOrigineExpression=XPath.newInstance("//traduction:langueOrigine");
    		langueOrigineExpression.addNamespace(namespace);
    		langueDestinationExpression = XPath.newInstance("//traduction:langueDestination");
    		langueDestinationExpression.addNamespace(namespace);
    		texteExpression =XPath.newInstance("//traduction:TraductionRequest/traduction:texte");
    		texteExpression.addNamespace(namespace);
    }
     
     
    protected Element invokeInternal(Element traductionRequest) throws Exception {
           String langueOrigine = langueOrigineExpression.valueOf(traductionRequest);
    	   String langueDestination = langueDestinationExpression.valueOf(traductionRequest);
    	   String texteOriginal = texteExpression.valueOf(traductionRequest);
    	   traductionService.traduitTexte(langueOrigine, langueDestination,texteOriginal);
     
            return null;  
            }
     
     
    	/*
    	// Création de la réponse
    	Namespace namespace = Namespace.getNamespace("traduction", "http://www.hikage.be/schema/traduction");
    	Element root = new Element("TraductionResponse", namespace);
    	Element auteur = new Element("auteur", namespace);
    	auteur.setText(traductionService.getAuteur());
    	Element texteTraduit = new Element("texte", namespace);
    	texteTraduit.setText(traductionService.getTexte());
    	root.addContent(auteur);
    	root.addContent(texteTraduit);
    	return root;
    	}*/
    }
    traduction.wsdl

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
                      xmlns:schema="http://www.hikage.be/schema/traduction"
                      xmlns:tns="http://www.hikage.be/definitions"
                      targetNamespace="http://www.hikage.be/definitions">
        <wsdl:types>
            <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                <xsd:import namespace="http://www.hikage.be/schema/traduction" schemaLocation="traduction.xsd"/>
            </xsd:schema>
        </wsdl:types>
        <wsdl:message name="TraductionRequest">
            <wsdl:part element="schema:TraductionRequest" name="TraductionRequest">
            </wsdl:part>
        </wsdl:message>
        <wsdl:message name="TraductionResponse">
            <wsdl:part element="schema:TraductionResponse" name="TraductionResponse">
            </wsdl:part>
        </wsdl:message>
        <wsdl:portType name="traduction">
            <wsdl:operation name="Holiday">
                <wsdl:input message="tns:TraductionRequest" name="TraductionRequest">
                </wsdl:input>
                <wsdl:output message="tns:TraductionResponse" name="TraductionResponse">
                </wsdl:output>
            </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="traductionBinding" type="tns:traduction">
            <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
            <wsdl:operation name="Holiday">
                <soap:operation soapAction=""/>
                <wsdl:input name="TraductionRequest">
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output name="TraductionResponse">
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="TraductionService">
            <wsdl:port binding="tns:traductionBinding" name="traductionPort">
                <soap:address location="http://localhost:8080/traductionService/"/>
            </wsdl:port>
        </wsdl:service>
    </wsdl:definitions>
    traduction.xsd
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:traduction="http://www.hikage.be/schema/traduction"
    targetNamespace="http://www.hikage.be/schema/traduction" elementFormDefault="qualified">
    <xs:element name="TraductionRequest" type="traduction:TraductionRequestType"/>
    <xs:element name="TraductionResponse" type="traduction:TraductionResponseType"/>
    <xs:complexType name="TraductionRequestType">
    <xs:sequence>
    <xs:element name="langueOrigine" type="xs:string"/>
    <xs:element name="langueDestination" type="xs:string"/>
    <xs:element name="texte" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="TraductionResponseType">
    <xs:sequence>
    <xs:element name="auteur" type="xs:string"/>
    <xs:element name="texte" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    traductionService.java
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    package com.hr.service;
     
     
    public interface TraductionService {
     
            void traduitTexte(String langueOrigine, String langueDestination,String
        		texteOriginal);
     
    }

    Est ce que vous pouvez m'éclairer sur la partie "Création de la réponse" dans mon endPoint et voir sin monwsdl est correct!
    merci

  2. #2
    Membre expérimenté Avatar de aymen83
    Inscrit en
    Décembre 2007
    Messages
    271
    Détails du profil
    Informations forums :
    Inscription : Décembre 2007
    Messages : 271
    Par défaut
    bonjour,
    je pense que ton xsd est valide. Si tu postais la façon que tu utilise pour générer automatiquement le wsdl, on pourra peut etre t'aider?

    mais cela dépend de la version de spring. Je pense que c'est seulement avec la version 1.5 que c'est possible

  3. #3
    Membre averti
    Profil pro
    Inscrit en
    Avril 2009
    Messages
    48
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Avril 2009
    Messages : 48
    Par défaut
    je crée mon .war avec mvn install, une fois le war créée je l'importe dans eclipse, une fois tomcat démarré je tape

    http://localhost:8080/spring-wsTest/traduction.wsdl
    (spring-wsTest est le nom de mon projet)
    g une exception:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
     
    Etat HTTP 500 - 
     
    --------------------------------------------------------------------------------
     
    type Rapport d'exception
     
    message 
     
    description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.
     
    exception 
     
    javax.servlet.ServletException: "Servlet.init()" pour la servlet spring-ws a généré une exception
    	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
    	org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    	org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    	org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    	org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    	java.lang.Thread.run(Unknown Source)
     
     
    cause mère 
     
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'traductionEndpoint' defined in ServletContext resource [/WEB-INF/spring-ws-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.hr.ws.TraductionEndpoint]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.hr.ws.TraductionEndpoint.<init>()
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:451)
    	org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
    	org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
    	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
    	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
    	org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
    	org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
    	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:332)
    	org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:266)
    	org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:236)
    	org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
    	javax.servlet.GenericServlet.init(GenericServlet.java:212)
    	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
    	org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    	org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    	org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    	org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    	java.lang.Thread.run(Unknown Source)
     
     
    cause mère 
     
    org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.hr.ws.TraductionEndpoint]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.hr.ws.TraductionEndpoint.<init>()
    	org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:58)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:752)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:717)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386)
    	org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
    	org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
    	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
    	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
    	org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
    	org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
    	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:332)
    	org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:266)
    	org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:236)
    	org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
    	javax.servlet.GenericServlet.init(GenericServlet.java:212)
    	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
    	org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    	org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    	org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    	org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    	java.lang.Thread.run(Unknown Source)
     
     
    cause mère 
     
    java.lang.NoSuchMethodException: com.hr.ws.TraductionEndpoint.<init>()
    	java.lang.Class.getConstructor0(Unknown Source)
    	java.lang.Class.getDeclaredConstructor(Unknown Source)
    	org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:54)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:752)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:717)
    	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386)
    	org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
    	org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
    	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
    	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
    	org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
    	org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
    	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:332)
    	org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:266)
    	org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:236)
    	org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
    	javax.servlet.GenericServlet.init(GenericServlet.java:212)
    	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
    	org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    	org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    	org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    	org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    	java.lang.Thread.run(Unknown Source)
     
     
    note La trace complète de la cause mère de cette erreur est disponible dans les fichiers journaux de Apache Tomcat/5.5.25.
     
     
    --------------------------------------------------------------------------------
     
    Apache Tomcat/5.5.25

  4. #4
    Membre averti
    Profil pro
    Inscrit en
    Avril 2009
    Messages
    48
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Avril 2009
    Messages : 48
    Par défaut
    voici mon spring-ws-servlet.xml je pense que c'est ici le problème, il arrive pas à créer le bean traductionEndpoint
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
     
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
     
    <bean id="traductionEndpoint" class="com.hr.ws.TraductionEndpoint">
    <property name="traductionService" ref="traductionService"/>
    </bean>
    <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping">
    	<property name="mappings">
    		<props>
    			<prop key="{http://www.hikage.be/schema/traduction}TraductionRequest">traductionEndpoint</prop>
    		</props>
    		</property>
    	<property name="interceptors">
    		<list>
    			<bean
    class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"></bean>
    </list>
    </property>
    </bean>
    <bean id="traduction" class="org.springframework.ws.wsdl.wsdl11.DynamicWsdl11Definition">   
      <property name="builder">
        <bean class="org.springframework.ws.wsdl.wsdl11.builder.XsdBasedSoap11Wsdl4jDefinitionBuilder">
          <property name="schema" value="/WEB-INF/traduction.xsd"/>                                  
          <property name="portTypeName" value="traduction"/>                              
          <property name="locationUri" value="http://localhost:8080/traductionService/"/>       
     
        </bean>
      </property>
    </bean>
     
    </beans>

  5. #5
    Membre expérimenté Avatar de aymen83
    Inscrit en
    Décembre 2007
    Messages
    271
    Détails du profil
    Informations forums :
    Inscription : Décembre 2007
    Messages : 271
    Par défaut
    le problèm pour l'instant est dans ta config.
    1-ton traduction service n'est pas déclarer.
    2- ton traduction est déclarer dans le constructeur alors que ta config utilise property ce qui signifie que tu est en train de' l'injecter avec un setter.

    au lieu de property tu doit utiliser la balise <constructor-arg>

  6. #6
    Membre averti
    Profil pro
    Inscrit en
    Avril 2009
    Messages
    48
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Avril 2009
    Messages : 48
    Par défaut
    merci g enfin généré le fichier traduction.wsdl.
    g ajouté la classe StubtraductionService
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    package com.hr.service;
     
     
     
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    public class StubtraductionService implements TraductionService {
     
    	private static final Log logger = LogFactory.getLog(StubtraductionService.class);
     
    	public void traduitTexte(String langueOrigine, String langueDestination,String
        		texteOriginal){
    		logger.info("Traduction du texte " + texteOriginal + "de la langue" + langueOrigine + " en " + langueDestination );
     
    	}
     
        }
    et voici traduction.wsdl généré:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
     
    <?xml version="1.0" encoding="UTF-8" ?> 
     <wsdl:definitions xmlns:schema="http://www.hikage.be/schema/traduction" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.hikage.be/schema/traduction">
     <wsdl:types>
     <xs:schema xmlns:traduction="http://www.hikage.be/schema/traduction" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.hikage.be/schema/traduction">
      <xs:element name="TraductionRequest" type="traduction:TraductionRequestType" /> 
      <xs:element name="TraductionResponse" type="traduction:TraductionResponseType" /> 
     <xs:complexType name="TraductionRequestType">
    <xs:sequence>
      <xs:element name="langueOrigine" type="xs:string" /> 
      <xs:element name="langueDestination" type="xs:string" /> 
      <xs:element name="texte" type="xs:string" /> 
      </xs:sequence>
      </xs:complexType>
    <xs:complexType name="TraductionResponseType">
    <xs:sequence>
      <xs:element name="auteur" type="xs:string" /> 
      <xs:element name="texte" type="xs:string" /> 
      </xs:sequence>
      </xs:complexType>
      </xs:schema>
      </wsdl:types>
      <wsdl:message name="TraductionRequest">
      <wsdl:part element="schema:TraductionRequest" name="TraductionRequest" /> 
      </wsdl:message>
    <wsdl:message name="TraductionResponse">
      <wsdl:part element="schema:TraductionResponse" name="TraductionResponse" /> 
      </wsdl:message>
     <wsdl:portType name="traduction">
     <wsdl:operation name="Traduction">
      <wsdl:input message="schema:TraductionRequest" name="TraductionRequest" /> 
      <wsdl:output message="schema:TraductionResponse" name="TraductionResponse" /> 
      </wsdl:operation>
      </wsdl:portType>
     <wsdl:binding name="traductionBinding" type="schema:traduction">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> 
    <wsdl:operation name="Traduction">
      <soap:operation soapAction="" /> 
     <wsdl:input name="TraductionRequest">
      <soap:body use="literal" /> 
      </wsdl:input>
     <wsdl:output name="TraductionResponse">
      <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
     <wsdl:service name="traductionService">
     <wsdl:port binding="schema:traductionBinding" name="traductionPort">
      <soap:address location="http://localhost:8080/traductionService/" /> 
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
    mais le problème mnt c que quand je teste mon web service, il m'affiche:
    IWAB0135E An unexpected error has occurred.
    404
    /traductionService/

    Est ce que vous voyez de quoi s'agit-il?

  7. #7
    Membre expérimenté Avatar de aymen83
    Inscrit en
    Décembre 2007
    Messages
    271
    Détails du profil
    Informations forums :
    Inscription : Décembre 2007
    Messages : 271
    Par défaut
    la génération du wsdl est totalement indépendante du service càd tu peux génerer ton wsdl sans meme avoir écrit ton service et son endpoint.

    l'erreur 404 signifie généralement une ressource indisponible qui peut etre par exemple une url mal former vérifie ton url, et ton code.
    et regarde le log c'est souvent là ou se trouve la réponse et non pas la réponse du navigateur

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [FOP] Problème avec les exemples fournis
    Par Androrion dans le forum XML/XSL et SOAP
    Réponses: 10
    Dernier message: 22/08/2006, 14h54
  2. problème ave LEFT JOIN dans MySql
    Par lm0210 dans le forum Requêtes
    Réponses: 3
    Dernier message: 16/05/2006, 19h46
  3. [68k] Problème sur un exemple de code
    Par jib2b dans le forum Autres architectures
    Réponses: 2
    Dernier message: 19/04/2006, 23h10
  4. Problème ave Bulk Insert
    Par bubi dans le forum MS SQL Server
    Réponses: 2
    Dernier message: 24/11/2005, 15h41
  5. Problème ave cl'option "Stop Build"
    Par boulette18 dans le forum MFC
    Réponses: 2
    Dernier message: 03/10/2005, 11h52

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