This discussion is archived
3 Replies Latest reply: Apr 22, 2009 2:11 AM by 667072 RSS

XML typed buffer and customized XSD

667072 Newbie
Currently Being Moderated
Hi,

I have configured SALT 2.0 to incorporate my customized XSD in the generated WSDL for a Tuxedo service using XML typed buffers. It works well for a single XSD but when I try to use a composite XSD which include 2 other XSD, it doesn't work.

My customized XSD (main.xsd) includes 2 other XSD (request_typeA.xsd and request_typeB.xsd) and all have the same namespace : namespace="http://saltCall".

+(main.xsd ...)+
<xs:include schemaLocation="request_typeA.xsd"></xs:include>
<xs:include schemaLocation="request_typeB.xsd"></xs:include>
+(...)+

The WSDL generated references the "main.xsd" :
+(...)+
     <xsd:import namespace="http://saltCall" schemaLocation="http://myserver:33000/xsd/main.xsd" />
+(...)+

main.xsd is correctly exposed at "http://myserver:33000/xsd/main.xsd".
But no way to obtain "http://myserver:33000/xsd/request_typeA.xsd" or "http://myserver:33000/xsd/request_typeB.xsd", even if both are mentionned in the XSDFILES variables :
XSDFILES=main.xsd,request_typeB.xsd,request_typeA.xsd

How can I have a composite XSD with SALT (via configuration or via a RP)? Or should I always use a single XSD ?     

My configuration :
Tuxedo 9.1 RP098 and SALT 2.0 RP (none)

Regards.
  • 1. Re: XML typed buffer and customized XSD
    651249 Journeyer
    Currently Being Moderated
    Hi,

    Could do you paste the complete xsd files ? We may take a look to see it is a bug or mis-usage.

    Regards,
    Wayne
  • 2. Re: XML typed buffer and customized XSD
    651249 Journeyer
    Currently Being Moderated
    Hi,

    I take a bit deep look. It seems SALT does not allow to use same target name space in multiple xsd files. So you have to merge them in one schema.

    Regards,
    Wayne
  • 3. Re: XML typed buffer and customized XSD
    667072 Newbie
    Currently Being Moderated
    Wayne Chen wrote:
    Could do you paste the complete xsd files ? We may take a look to see it is a bug or mis-usage.
    Hi,

    The main xsd file (main.xsd) :
    <?xml version="1.0" encoding="utf-8" ?>
    <xs:schema attributeFormDefault="unqualified"
      elementFormDefault="qualified"
      targetNamespace="http://saltCall" 
      version="1.0" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns:xs="http://www.w3.org/2001/XMLSchema" 
      xmlns="http://saltCall">
      <xs:include schemaLocation="request_typeA.xsd"></xs:include>
      <xs:include schemaLocation="request_typeB.xsd"></xs:include>
      <xs:element name="response">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="message">
              <xs:complexType>
                <xs:choice>
                  <xs:element name="typeA" type="ResponseTypeA"/>
                  <xs:element name="typeB" type="ResponseTypeB"/>
                </xs:choice>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="request">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="message">
              <xs:complexType>
                <xs:choice>
                  <xs:element name="typeA" type="RequestTypeA"/>
                  <xs:element name="typeB" type="RequestTypeB"/>
                </xs:choice>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    The first included file (request_typeA.xsd) :
    <?xml version="1.0" encoding="utf-8" ?>
    <xs:schema attributeFormDefault="unqualified"
      elementFormDefault="qualified"
      targetNamespace="http://saltCall" 
      version="1.0" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns="http://saltCall">
      <xs:complexType name="ResponseTypeA">
        <xs:all>
          <xs:element name="REF" type="xs:integer" />
          <xs:element minOccurs="0" name="rows">
            <xs:complexType>
              <xs:sequence minOccurs="0" maxOccurs="unbounded">
                <xs:element name="row">
                  <xs:complexType>
                    <xs:all>
                      <xs:element name="USER_INFO">
                        <xs:simpleType>
                          <xs:restriction base="xs:normalizedString">
                            <xs:maxLength value="19" />
                          </xs:restriction>
                        </xs:simpleType>
                      </xs:element>
                      <xs:element name="TIMESTAMP">
                        <xs:simpleType>
                          <xs:restriction base="xs:normalizedString">
                            <xs:maxLength value="26" />
                          </xs:restriction>
                        </xs:simpleType>
                      </xs:element>
                    </xs:all>
                    <xs:attribute name="id" type="xs:unsignedInt" use="required" />
                  </xs:complexType>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:all>
      </xs:complexType>
      <xs:complexType name="RequestTypeA">
        <xs:all>
          <xs:element name="USERID">
            <xs:simpleType>
              <xs:restriction base="xs:normalizedString">
                <xs:maxLength value="30" />
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
          <xs:element minOccurs="0" name="TYPE">
            <xs:simpleType>
              <xs:restriction base="xs:normalizedString">
                <xs:maxLength value="5" />
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
        </xs:all>
      </xs:complexType>
    </xs:schema>
    The second included file (request_typeB.xsd) :
    <?xml version="1.0" encoding="utf-8" ?>
    <xs:schema attributeFormDefault="unqualified"
      elementFormDefault="qualified"
      targetNamespace="http://saltCall" 
      version="1.0" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns="http://saltCall">
      <xs:complexType name="ResponseTypeB">
        <xs:all>
          <xs:element name="COMMENT" type="xs:integer" />
          <xs:element minOccurs="0" name="rows">
            <xs:complexType>
              <xs:sequence minOccurs="0" maxOccurs="unbounded">
                <xs:element name="row">
                  <xs:complexType>
                    <xs:all>
                      <xs:element name="RES">
                        <xs:simpleType>
                          <xs:restriction base="xs:normalizedString">
                            <xs:maxLength value="30" />
                          </xs:restriction>
                        </xs:simpleType>
                      </xs:element>
                      <xs:element name="TIMESTAMP">
                        <xs:simpleType>
                          <xs:restriction base="xs:normalizedString">
                            <xs:maxLength value="26" />
                          </xs:restriction>
                        </xs:simpleType>
                      </xs:element>
                    </xs:all>
                    <xs:attribute name="id" type="xs:unsignedInt" use="required" />
                  </xs:complexType>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:all>
      </xs:complexType>
      <xs:complexType name="RequestTypeB">
        <xs:all>
          <xs:element name="IDENT">
            <xs:simpleType>
              <xs:restriction base="xs:normalizedString">
                <xs:maxLength value="30" />
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
          <xs:element minOccurs="0" name="COMP">
            <xs:simpleType>
              <xs:restriction base="xs:normalizedString">
                <xs:maxLength value="5" />
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
        </xs:all>
      </xs:complexType>
    </xs:schema>
    Regards

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points