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 :

Tester un Web Service


Sujet :

Services Web Java

  1. #1
    Nouveau candidat au Club
    Inscrit en
    Juin 2010
    Messages
    2
    Détails du profil
    Informations forums :
    Inscription : Juin 2010
    Messages : 2
    Par défaut Tester un Web Service
    Bonjour,

    Je tiens d'abord à signaler sur je suis débutant dans le domaine des SOA. J'espère aussi que ma demande est placée dans le bon endroit.

    En parcourant sur internet, j'ai pu dénicher quelques exercices afin de m'exercer dans ce domaine. J'ai ainsi Apache ODE, et Eclipse avec le plugin BPEL. J'ai suivi le tutoriel à la lettre sur le lien ci contre: http://www-inf.it-sudparis.eu/~nguye...elloworld.html

    Cependant au moment de tester le Web Service, par Web Services Explorer, j'obtiens au niveau du status ceci:

    IWAB0135E An unexpected error has occurred.
    301
    OK

    Si quelqu'un pourrait m'expliquer où se situe le problème et comment le résoudre, je lui remercie d'avance.

  2. #2
    Nouveau candidat au Club
    Inscrit en
    Juin 2010
    Messages
    2
    Détails du profil
    Informations forums :
    Inscription : Juin 2010
    Messages : 2
    Par défaut
    Finalement, j'ai réglé mon problème en installant un logiciel qui se nomme SoapUI, pour pouvoir tester mon WebService. Cependant j'ai reçu une erreur qui est:

    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
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Body>
          <soapenv:Fault>
             <faultcode>soapenv:Server</faultcode>
             <faultstring>java.lang.NullPointerException</faultstring>
             <detail>
                <Exception>org.apache.axis2.AxisFault: java.lang.NullPointerException
    	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:195)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    	at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
    	at org.apache.ode.axis2.hooks.ODEAxisServiceDispatcher.findService(ODEAxisServiceDispatcher.java:80)
    	at org.apache.axis2.engine.AbstractDispatcher.invoke(AbstractDispatcher.java:91)
    	at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
    	at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
    	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
    	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
    	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
    	... 14 more</Exception>
             </detail>
          </soapenv:Fault>
       </soapenv:Body>
    </soapenv:Envelope>

    Je rajoute les divers codes de mon projet

    Fichier BPEL:
    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
    <!-- HelloWorld BPEL Process [Generated by the Eclipse BPEL Designer] -->
    <bpel:process name="HelloWorld"
             targetNamespace="http://helloworld"
             suppressJoinFailure="yes"
             xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
             xmlns:tns="http://helloworld"
             xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
             >
     
        <!-- Import the client WSDL -->
    	<bpel:import location="HelloWorldArtifacts.wsdl" namespace="http://helloworld" 
    	        importType="http://schemas.xmlsoap.org/wsdl/" />
     
        <!-- ================================================================= -->         
        <!-- PARTNERLINKS                                                      -->
        <!-- List of services participating in this BPEL process               -->
        <!-- ================================================================= -->         
        <bpel:partnerLinks>
            <!-- The 'client' role represents the requester of this service. -->
            <bpel:partnerLink name="client"
                         partnerLinkType="tns:HelloWorld"
                         myRole="HelloWorldProvider"
                         />
        </bpel:partnerLinks>  
     
        <!-- ================================================================= -->         
        <!-- VARIABLES                                                         -->
        <!-- List of messages and XML documents used within this BPEL process  -->
        <!-- ================================================================= -->         
        <bpel:variables>
            <!-- Reference to the message passed as input during initiation -->
            <bpel:variable name="input"
                      messageType="tns:HelloWorldRequestMessage"/>
     
            <!-- 
              Reference to the message that will be returned to the requester
              -->
            <bpel:variable name="output"
                      messageType="tns:HelloWorldResponseMessage"/>
        </bpel:variables>  
     
        <!-- ================================================================= -->         
        <!-- ORCHESTRATION LOGIC                                               -->
        <!-- Set of activities coordinating the flow of messages across the    -->
        <!-- services integrated within this business process                  -->
        <!-- ================================================================= -->         
        <bpel:sequence name="main">
     
            <!-- Receive input from requester. 
                 Note: This maps to operation defined in HelloWorld.wsdl 
                 -->
            <bpel:receive name="receiveInput" partnerLink="client"
                     portType="tns:HelloWorld"
                     operation="process" variable="input"
                     createInstance="yes"/>
     
            <!-- Generate reply to synchronous request -->
            <bpel:assign validate="no" name="Assign">
                <bpel:copy>
                    <bpel:from>
                        <bpel:literal xml:space="preserve"><tns:HelloWorldResponse xmlns:tns="http://helloworld" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <tns:result></tns:result>
    </tns:HelloWorldResponse>
    </bpel:literal>
                    </bpel:from>
                    <bpel:to variable="output" part="payload"></bpel:to>
                </bpel:copy>
                <bpel:copy>
                    <bpel:from part="payload" variable="input">
                        <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:input]]></bpel:query>
                    </bpel:from>
                    <bpel:to part="payload" variable="output">
                        <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
                    </bpel:to>
                </bpel:copy>
            </bpel:assign>
            <bpel:reply name="replyOutput" 
                   partnerLink="client"
                   portType="tns:HelloWorld"
                   operation="process" 
                   variable="output"
                   />
        </bpel:sequence>  
    </bpel:process>
    Fichier 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
    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
    <?xml version="1.0"?>
    <definitions name="HelloWorld"
            targetNamespace="http://helloworld"
            xmlns:tns="http://helloworld"
            xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
            xmlns="http://schemas.xmlsoap.org/wsdl/"
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
     
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         TYPE DEFINITION - List of types participating in this BPEL process 
         The BPEL Designer will generate default request and response types
         but you can define or import any XML Schema type and use them as part 
         of the message types.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->    
        <types>
            <schema attributeFormDefault="unqualified" elementFormDefault="qualified" 
                    targetNamespace="http://helloworld" 
                    xmlns="http://www.w3.org/2001/XMLSchema">
     
                <element name="HelloWorldRequest">
                    <complexType>
                        <sequence>
                            <element name="input" type="string"/>
                        </sequence>
                    </complexType>
                </element>
     
                <element name="HelloWorldResponse">
                    <complexType>
                        <sequence>
                            <element name="result" type="string"/>
                        </sequence>
                    </complexType>
                </element>
            </schema>
        </types>
     
     
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         MESSAGE TYPE DEFINITION - Definition of the message types used as 
         part of the port type defintions
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->    
        <message name="HelloWorldRequestMessage">
            <part name="payload" element="tns:HelloWorldRequest"/>
        </message>
        <message name="HelloWorldResponseMessage">
            <part name="payload" element="tns:HelloWorldResponse"/>
        </message>
     
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         PORT TYPE DEFINITION - A port type groups a set of operations into
         a logical service unit.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->    
     
        <!-- portType implemented by the HelloWorld BPEL process -->
        <portType name="HelloWorld">
            <operation name="process">
                <input  message="tns:HelloWorldRequestMessage" />
                <output message="tns:HelloWorldResponseMessage"/>
            </operation>
        </portType>
     
     
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         PARTNER LINK TYPE DEFINITION
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->    
        <plnk:partnerLinkType name="HelloWorld">
            <plnk:role name="HelloWorldProvider" portType="tns:HelloWorld"/>
        </plnk:partnerLinkType>
     
        <binding name="HelloWorldSOAPBinding" type="tns:HelloWorld">
        	<soap:binding style="document"
        		transport="http://schemas.xmlsoap.org/soap/http" />
        	<operation name="process">
        		<soap:operation soapAction="http://helloworld/process" />
        		<input>
        			<soap:body use="literal" />
        		</input>
        		<output>
        			<soap:body use="literal" />
        		</output>
        	</operation>
        </binding>
        <service name="HelloWorldService">
        	<port name="HelloPort" binding="tns:HelloWorldSOAPBinding">
        		<soap:address location="http://localhost:8080/ode/processes/HelloWorld" />
        	</port>
        </service>
    </definitions>

    J'aimerais comprendre où est mon erreur et comment y remédier
    Merci d'avance aux personnes qui pourront m'aider

Discussions similaires

  1. Réponses: 1
    Dernier message: 07/05/2014, 15h56
  2. Réponses: 13
    Dernier message: 11/02/2014, 17h42
  3. Tester un Web Service
    Par Merchinho dans le forum Glassfish et Payara
    Réponses: 9
    Dernier message: 17/04/2009, 23h41
  4. tester un web service
    Par pointe dans le forum 4D
    Réponses: 2
    Dernier message: 30/06/2008, 10h23

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