Creating Schemas for Services

In this section:

How to:

Reference:

Services require two schemas, one for the request and one for the response. Services always have these two schemas, even if the response is not used by your application.


Top of page

x
Procedure: How to Create Schemas for Services
  1. If you are not connected to a .Net target, connect to one, as described in How to Connect to a Defined Target.
  2. Click the node containing the service (for example, Add) for which you want to generate a schema.

  3. In the right pane, move the pointer over Operations and select Generate Schema.

    A table that lists the created schemas appears in the right pane.

  4. To view the request schema, click the ellipsis symbol that is located in the third column of the Request row. The following image illustrates a request schema.

  5. To view the response schema, click the ellipsis symbol that is located in the third column of the Response row. The following image illustrates a response schema.

The schemas are generated and ready to use. You can use the generated request schema to create a sample XML document to be used by the adapter.


Top of page

x
Reference: Schema Location

iWay Explorer stores the schemas it creates in subdirectories under the iWay home directory of the machine where it is installed. The exact location of the schemas differs depending on whether you deploy iWay Explorer with an iBSP or a JCA configuration.


Top of page

x
Sample Schemas

The following are sample request and response schemas for the add and multiply methods in math.dll.



Example: Sample Request Schema for the Add Method
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Generated by the iBSE 2004-03-15T21:40:07Z -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="add">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="parm" type="xs:int" />
      </xs:sequence>
      <xs:attribute fixed="/math.dll/Math.Math/Add(System.Xml.XmlElement)"
      name="location" type="xs:string" use="optional" />
    </xs:complexType>
  </xs:element>
</xs:schema>


Example: Sample Response Schema for the Add Method
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Generated by the iBSE 2004-03-15T21:40:07Z -->
<xs:schema 
  xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="total" type="xs:int" />
</xs:schema>/


Example: Sample Request Schema for the Multiply Method
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Generated by the iBSE 2004-03-15T21:51:15Z -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Multiply">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="a" type="xs:int" /> 
        <xs:element name="b" type="xs:int" />
      </xs:sequence>
      <xs:attribute name="location" use="optional"
      fixed="/math.dll/Math.Math/Multiply(System.Int32,System.Int32)"/>
    </xs:complexType>
  </xs:element>
</xs:schema>


Example: Sample Response Schema for the Multiply Method
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Generated by the iBSE 2004-03-15T21:51:15Z -->
<xs:schema 
  xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="MultiplyResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="result" type="xs:int"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

iWay Software