4 Replies Latest reply on Apr 17, 2012 12:28 PM by gimbal2

    how to specify the scope of a Web service

    857116
      Hi all;

      In my research studies, I m working on testing BPEL processes and i'm using Jdeveloper 10 g for creating BPEL processes and web services.

      My advisor tells me that I must specify the scope of the invoked web service "request, application or session" But, I don't know how to define the scope of a web service.

      this is an exemple of a web service wsdl:



      -----

      <?xml version = '1.0' encoding = 'UTF-8'?>
      <!--Generated by the Oracle JDeveloper Web Services WSDL Generator-->
      <!--Date Created: Wed Mar 14 12:43:34 CET 2012-->
      <definitions
      name="LBS"
      targetNamespace="http://lbs/LBS.wsdl"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:tns="http://lbs/LBS.wsdl"
      xmlns:ns1="http://lbs/ILBS.xsd">
      <types>
      <schema
      targetNamespace="http://lbs/ILBS.xsd"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns="http://www.w3.org/2001/XMLSchema"/>
      </types>
      <message name="LBSOperation0Request">
      <part name="input" type="xsd:string"/>
      </message>
      <message name="LBSOperation0Response">
      <part name="return" type="xsd:string"/>
      </message>
      <portType name="LBSPortType">
      <operation name="LBSOperation">
      <input name="LBSOperation0Request" message="tns:LBSOperation0Request"/>
      <output name="LBSOperation0Response" message="tns:LBSOperation0Response"/>
      </operation>
      </portType>
      <binding name="LBSBinding" type="tns:LBSPortType">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="LBSOperation">
      <soap:operation soapAction="" style="rpc"/>
      <input name="LBSOperation0Request">
      <soap:body use="encoded" namespace="LBS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output name="LBSOperation0Response">
      <soap:body use="encoded" namespace="LBS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
      </operation>
      </binding>
      <service name="LBS">
      <port name="LBSPort" binding="tns:LBSBinding">
      <soap:address location="http://manel:8889/HBO-TP-LBS-context-root/LBS"/>
      </port>
      </service>
      </definitions>
      -----


      Could you tell me how to define the scope of a web service.

      Please advice or help ;
        • 1. Re: how to specify the scope of a Web service
          857116
          Hi all,

          I have always the same question :( I havent resolve my problem .

          My question is about defining scope for web service.

          I notice that when multiple clients are invoking the same web service concurrently,
          all of them are using the same web service implementation instance.
          Any instance variable defined in it is shared among all clients and could be changed
          by anyone at anytime.

          Im using oracle application server 10g for deploying web service and Jdevloper for designing them. Does oracle SOA suite provide any mechanism similar to Axis WSDD's "scope", which can
          define a web service's scope to be "request", "session" or "applicatoin"?

          Thanks.

          Regards,
          Epsilonna
          • 2. Re: how to specify the scope of a Web service
            EJP
            I notice that when multiple clients are invoking the same web service concurrently,
            all of them are using the same web service implementation instance.
            Any instance variable defined in it is shared among all clients and could be changed
            by anyone at anytime.
            Correct. So, don't use instance variables. Put per-session stuff into the session.
            • 3. Re: how to specify the scope of a Web service
              857116
              could you explain me more EJP, How and where can I put per-session stuff into the session?
              • 4. Re: how to specify the scope of a Web service
                gimbal2
                I'm a bit confused myself; the session is related to web applications, not necessarily to web services.

                But what confuses me more is that you apparently have a webservice which needs to maintain state. That is a huge red flag and probably a design flaw. What are you storing in those member variables?