Need schema location and namespace of xsd

Hi ,

I want to import xsd into another xsd. But i don't know how can i get schema location n namaespace of that xsd.

Like the below one we have in our app, same way i need to create for other app.

 <xsd:import namespace="">types.sample.com/.../v1" schemaLocation="%2Jhttp%9A%1F%2Ftypes.sample.com%2Frasportal%2Fv1%7DTestLoggingDefault.xsd" />

Please suggets your inputs.

  Discussion posts and replies are publicly visible

  • Are you saying that you want to refer to one CDT within another CDT (i.e. for nesting multiple CDTs together)? If so, the easiest way is to just add the nested CDT directly to your XSD - a single XSD file can refer to multiple CDTs.

    So you could set up your XSD something like this:

    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:com:appian:types:PDL" targetNamespace="urn:com:appian:types:PDL">
      <xsd:complexType name="PDL_CDT1">
        <xsd:sequence>
          <xsd:element name="id" nillable="true" type="xsd:int">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Id @GeneratedValue</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="name" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element maxOccurs="unbounded" minOccurs="0" name="nested" type="tns:PDL_CDT2">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@OneToMany(cascade=CascadeType.ALL, indexed=false)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="PDL_CDT2">
        <xsd:sequence>
          <xsd:element name="id" nillable="true" type="xsd:int">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Id @GeneratedValue</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="name" nillable="true" type="xsd:string">
            <xsd:annotation>
              <xsd:appinfo source="appian.jpa">@Column(length=255)</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:schema>

  • I just created xsd from scratch from designer itslef , earlier i was trying to upload that .

    Anyways do you have any idea how we get the url for any type of url like below format mentioned

    'type!{http://****.****.**.com:76532/suite/types/}TestLogDefaultRule'

  • 0
    Appian Employee
    in reply to sauravk

    I can't quite tell what your question is, so I rephrased your question in two ways, hopefully one of these is correct:

    1. How do I know what to put for the namespace: http://****.****.**.com:76532/suite/types/?

    That is just the namespace provided in the CDT. To be honest, the namespace isn't that important in Appian. We usually recommend setting the namespace to be the default Appian namespace with your application prefix appended like I did above: targetNamespace="urn:com:appian:types:PDL"

    2. How do I call the type in an expression?

    Just add "type!' in the expression rule designer and you should see it autocomplete to show a list of CDTs. When you select the CDT, it adds the namespace and name. You can also find the namespace by going to the CDT in the Appian Designer and expanding the properties section at the top.