13 Replies Latest reply on Apr 25, 2008 9:29 PM by Markus Heidt

    WebService and ConversationId

    Markus Heidt Newbie

      Hello,


      I tried to follow seam-bay but to no avail.


      jboss-seam-2.0.2.CR1



      @Stateless
      @WebService(name="TSCMService", serviceName="TSCMService")
      public class TSCMGate implements TSCMGateRemote {
        @WebMethod
        public boolean logout() {
          identity.instance().logout();
          return !Identity.instance().isLoggedIn();
        }
      
        @WebMethod
        public boolean testLogin() {
          return Identity.instance().isLoggedIn();
        }
      }



      I was putting the standard-jaxws-endpoint-config.xml into the META-INF of the ejb - in parallel to the ejb-jar etc.



      <jaxws-config xmlns="urn:jboss:jaxws-config:2.0" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xmlns:javaee="http://java.sun.com/xml/ns/javaee"
            xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
         <endpoint-config>
            <config-name>Seam WebService Endpoint</config-name>
            <pre-handler-chains>
               <javaee:handler-chain>
                  <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
                  <javaee:handler>
                     <javaee:handler-name>SOAP Request Handler</javaee:handler-name>
                     <javaee:handler-class>org.jboss.seam.webservice.SOAPRequestHandler</javaee:handler-class>
                  </javaee:handler>
               </javaee:handler-chain>
            </pre-handler-chains>
         </endpoint-config>
      </jaxws-config>




      For Testing I was using the Web Services Explorer of  Eclipse.


      login works and delivers:



      <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
        <env:Header>
          <seam:conversationId xmlns:seam="http://www.jboss.org/seam/webservice">3</seam:conversationId> 
        </env:Header>
       <env:Body>
         <loginResponse xmlns:ns2="http://gate.ws.dante_tscm.dai.com/">
          <return>true</return> 
         </loginResponse>
        </env:Body>
      </env:Envelope>



      Now I thought, I just need to take the conversionId and call a request like



      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:q0="http://gate.ws.dante_tscm.dai.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soapenv:Header>
        <seam:conversationId xmlns:seam="http://www.jboss.org/seam/webservice">3</seam:conversationId> 
        </soapenv:Header>
       <soapenv:Body>
        <q0:testLogin /> 
        </soapenv:Body>
        </soapenv:Envelope>



      But this returns false with a new conversionId of 4


      Any help is really appreciated!