getOrderForm()

OrderForm getOrderForm(int packageId)

This method returns information about the order form and plans for a specific package. Use this method to get detailed information about a specific order form.

Parameters

packageId
Format: integer
Purpose: Specifies the package ID. The package ID is located in the Package ID field of the Package tab when you view the package in Smile, and is also specified in the XML document returned by the getAvailableOrderForms() method.

Results

This method returns an OrderForm XML document that lists the fields in the package order form, and the plans in the package.

There are no messages defined by this method.

Example: A returned OrderForm XML document

This example shows an OrderForm XML document for a subscription package. The package contains four plans and the order form contains four fields (username, phone lines, given name and family name).

<OrderForm xmlns="http://xml.inomial.com/smile/2.xsd">
  <Package>192</Package>
  <Name>ADSL With VOIP Lines</Name>
  <OrderFormType>Subscription</OrderFormType>
  <PackagePlans>
    <PackagePlan>
      <PackagePlan>812</PackagePlan>
      <Name>ADSL1 8000/384</Name>
    </PackagePlan>
    <PackagePlan>
      <PackagePlan>89</PackagePlan>
      <Name>ADSL1 256/64</Name>
    </PackagePlan>
    <PackagePlan>
      <PackagePlan>93</PackagePlan>
      <Name>ADSL1 1500/256</Name>
    </PackagePlan>
    <PackagePlan>
      <PackagePlan>95</PackagePlan>
      <Name>ADSL1 512/512</Name>
    </PackagePlan>
  </PackagePlans>
  <OrderFormDescription>
    <Form>
      <Name>ADSL - Order Form</Name>
      <FormProperties/>
      <Attributes>
        <Attribute>
          <Required>true</Required>
          <Label>Username</Label>
          <Visibility>VisibleAndEditable</Visibility>
          <AttributeType>
            <AttributeType>92</AttributeType>
            <Name>username</Name>
            <Label>Username</Label>
            <SmileObjectXMLType type="String"/>
            <AttributeTypeProperties>
              <Object/>
            </AttributeTypeProperties>
          </AttributeType>
        </Attribute>
        <Attribute>  
          <Required>true</Required>
          <Label>Phone Lines</Label>
          <Visibility>VisibleAndEditable</Visibility>
          <AttributeType>
            <AttributeType>91</AttributeType>
            <Name>phoneLines</Name>
            <Label>Phone Lines</Label>
            <SmileObjectXMLType type="Integer"/>
            <AttributeTypeProperties>
              <Object/>
            </AttributeTypeProperties>
          </AttributeType>
        </Attribute>
        <Attribute>
          <Required>true</Required>
          <Label>Contact's Given Name</Label>
          <Visibility>VisibleAndEditable</Visibility>
          <AttributeType>
            <AttributeType>90</AttributeType>
            <Name>contactGiven</Name>
            <Label>Contact's Given Name</Label>
            <SmileObjectXMLType type="String"/>
            <AttributeTypeProperties>
              <Object/>
            </AttributeTypeProperties>
          </AttributeType>
        </Attribute>
        <Attribute>
          <Required>true</Required>
          <Label>Contact's Family Name</Label>
          <Visibility>VisibleAndEditable</Visibility>
          <AttributeType>
            <AttributeType>89</AttributeType>
            <Name>contactFamily</Name>
            <Label>Contact's Family Name</Label>
            <SmileObjectXMLType type="String"/>
            <AttributeTypeProperties>
              <Object/>
            </AttributeTypeProperties>
          </AttributeType>
        </Attribute>  
      </Attributes>
    </Form>
  </OrderFormDescription>
</OrderForm>

Faults

OrderException

This fault is returned when the package does not exist or does not have an order form, or the caller does not have permission to order the package.

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.GetOrderForm packageID
packageID
Purpose: Specifies the package ID number.
Note: For more information about the Java client and the options it accepts, see Java client syntax.