Activities implement class operations. In the context of a Web service, an activity can implement an operation of a port type, that can be accessed from the outside world via SOAP calls. The next figure shows how an activity can be assigned to an operation. The activity Apply is assigned to the operation apply.

Figure: Assigning Activity Diagrams to Operations

SOAP Namespaces

All SOAP requests and SOAP responses have generated values for their namespaces. The generated value is a combination of the package-names and the operation name. For example if a port has the name "myPort" and is stored in the model in a package named "package1" directly in the root tree the namespace for the port would be "package1.myPort".
The following example shows the default namespace names for the operation "helloWorldInOut" from our "HelloWorldExample" and the default namespace for the parameter "input":

Figure: Example of Default Namespace Definition

 <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
               xmlns:bridge="http://e2e.ch/bridge"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:ns3="urn:Services.HelloWorldService.Ports.HelloWorldPort"
               xmlns:ns2="urn:Services.HelloWorldService.Classes"
               env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <env:Header>
       <bridge:Trace level="Moderate" maxSize="10"/>
    </env:Header>
    <env:Body>
       <ns3:helloWorldInOut>
          <input xsi:type="ns2:InputClass">
             <aString xsi:type="xsd:string">E2E</aString>
          </input>
       </ns3:helloWorldInOut>
    </env:Body>
</env:Envelope>

Theses values can be overridden by defining tagged values on the objects. The tagged values must be named "namespace" and are valid for: interfaces, operations, classes and packages with stereotype <<Repository>>.
The following example shows the same request as above but with an explicitly set value for the port namespace.

Figure : Example with explicit namespace definition

 <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:ns1="myNamespace.HelloWorldPort"
               xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
               xmlns:bridge="http://e2e.ch/bridge"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:ns3="urn:Services.HelloWorldService.Classes"
               env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <env:Header>
       <bridge:Trace level="Moderate" maxSize="10"/>
    </env:Header>
    <env:Body>
       <ns1:helloWorldInOut>
          <input xsi:type="ns3:InputClass">
             <aString xsi:type="xsd:string">E2E</aString>
          </input>
       </ns1:helloWorldInOut>
    </env:Body>
</env:Envelope>
On this Page:
  • No labels