1 Reply Latest reply on Aug 16, 2010 10:41 PM by Radhakrishna Bhat

    Connect to Web Services... and Schema Import

    Mark Ericksen

      Greetings,

       

      I have a WSDL that imports an XSD for use in the web service API.  However when I use Flash Builder's Connect to Web Services feature to auto-generate the service and value objects, all I get is the service object.  The value objects are not created.  It's as if the schema is not imported.  The WSDL and XSD validate fine and are accessible by other means.

       

      Is import supported?  Any other ideas?

       

      -Mark

       

       

      WSDL follows:

       

      <?xml version='1.0' encoding='UTF-8'?>


      <definitions


          xmlns:xs="http://www.w3.org/2001/XMLSchema"


          xmlns="http://schemas.xmlsoap.org/wsdl/"


          xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"


          xmlns:tns="http://com.example.mentormatch.wsdl"


          xmlns:schema="http://com.example.mentormatch.schema"


          targetNamespace="http://com.example.mentormatch.wsdl"


          name="AuthenticationService">


          <types>


              <xs:schema targetNamespace="http://com.example.mentormatch.wsdl" xmlns:schema="http://com.example.mentormatch.schema">


      <xs:import namespace="http://com.example.mentormatch.schema" schemaLocation="http://localhost:8080/MentorMatchServer/schema/mentormatch.xsd" />


                  <xs:element name="StartSession">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element ref="schema:authenticationRequest"/>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>

       


                  <xs:element name="CloseSession">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element ref="schema:actionRequest"/>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
              
                  <xs:element name="CloseSessionResponse">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element ref="schema:serviceResponse"/>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
              
                  <xs:element name="StartSessionResponse">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element ref="schema:serviceResponse"/>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>

       


              </xs:schema>
          </types>
          <message name="StartSession">
              <part name="parameters" element="tns:StartSession" />
          </message>
          <message name="StartSessionResponse">
              <part name="parameters" element="tns:StartSessionResponse" />
          </message>
          <message name="CloseSession">
              <part name="parameters" element="tns:CloseSession" />
          </message>
          <message name="CloseSessionResponse">
              <part name="parameters" element="tns:CloseSessionResponse" />
          </message>
          <portType name="SessionAuthentication">
              <operation name="StartSession">
                  <input message="tns:StartSession" />
                  <output message="tns:StartSessionResponse" />
              </operation>
              <operation name="CloseSession">
                  <input message="tns:CloseSession" />
                  <output message="tns:CloseSessionResponse" />
              </operation>
          </portType>
          <binding name="SessionAuthPortBinding" type="tns:SessionAuthentication">
              <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
              <operation name="StartSession">
                  <soap:operation soapAction="" />
                  <input>
                      <soap:body use="literal" />
                  </input>
                  <output>
                      <soap:body use="literal" />
                  </output>
              </operation>
              <operation name="CloseSession">
                  <soap:operation soapAction="" />
                  <input>
                      <soap:body use="literal" />
                  </input>
                  <output>
                      <soap:body use="literal" />
                  </output>
              </operation>
          </binding>
          <service name="AuthenticationService">
              <port name="SessionAuthPort" binding="tns:SessionAuthPortBinding">
                  <soap:address location="http://localhost:8080/MentorMatchServer/AuthenticationService" />
              </port>
          </service>
      </definitions>

       

       

      XSD follows:

       

       

      <?xml version="1.0" encoding="UTF-8"?>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" elementFormDefault="qualified" attributeFormDefault="unqualified"
                 xmlns="http://com.example.mentormatch.schema"
                 targetNamespace="http://com.example.mentormatch.schema">

       

       

      <!-- Simple Type Definitions -->

       

       

        <xs:simpleType name="idType">
          <xs:restriction base="xs:integer">
            <xs:totalDigits value="15"/>
          </xs:restriction>
        </xs:simpleType>

       

       

        <xs:simpleType name="sessionType">
          <xs:restriction base="xs:token">
            <xs:length value="60"/>
          </xs:restriction>
        </xs:simpleType>

       

       

        <xs:simpleType name="emailType">
          <xs:restriction base="xs:string">
            <xs:whiteSpace value="collapse"/>
            <xs:pattern value="[^@]+@[^@]+\.[^@]+"/>
            <xs:minLength value="8"/>
            <xs:maxLength value="100"/>
          </xs:restriction>
        </xs:simpleType>

       

       

        <xs:simpleType name="usernameType">
          <xs:restriction base="xs:token">
            <xs:minLength value="5"/>
            <xs:maxLength value="20"/>
          </xs:restriction>
        </xs:simpleType>

       

       

        <xs:simpleType name="passwordType">
          <xs:restriction base="xs:string">
            <xs:whiteSpace value="collapse"/>
            <xs:pattern value="[0-9a-zA-Z_\-!@#$;:?\.]*"/>
            <xs:minLength value="4"/>
            <xs:maxLength value="20"/>
          </xs:restriction>
        </xs:simpleType>

       

       

        <xs:simpleType name="tokenType">
          <xs:restriction base="xs:token">
            <xs:minLength value="1"/>
            <xs:maxLength value="20"/>
          </xs:restriction>
        </xs:simpleType>

       

       

        <xs:simpleType name="code2Type">
          <xs:restriction base="xs:token">
            <xs:length value="2"/>
          </xs:restriction>
        </xs:simpleType>

       

       

        <xs:simpleType name="code3Type">
          <xs:restriction base="xs:token">
            <xs:length value="3"/>
          </xs:restriction>
        </xs:simpleType>

       

       

        <xs:simpleType name="labelType">
          <xs:restriction base="xs:string">
            <xs:whiteSpace value="collapse"/>
            <xs:minLength value="1"/>
            <xs:maxLength value="100"/>
          </xs:restriction>
        </xs:simpleType>

       

       

        <xs:simpleType name="textType">
          <xs:restriction base="xs:string">
            <xs:minLength value="0"/>
            <xs:maxLength value="4000"/>
          </xs:restriction>
        </xs:simpleType>

       

       

        <xs:simpleType name="decimalType">
          <xs:restriction base="xs:decimal">
            <xs:fractionDigits value="2"/>
            <xs:totalDigits value="15"/>
          </xs:restriction>
        </xs:simpleType>


        <xs:complexType name="itemType">
          <xs:sequence>
            <xs:any/>
          </xs:sequence>
        </xs:complexType>

       

       

      <!-- Entity Element Definitions -->

       

       

        <xs:element name="mentorParticipant">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="participantId" type="idType"/>
              <xs:element name="areaOfInterest" type="labelType"/>
              <xs:element name="bio" type="textType"/>
              <xs:element name="businessDevelopmentMentor" type="labelType"/>
              <xs:element name="businessDevelopmentProtege" type="labelType"/>
              <xs:element name="configurationControlMentor" type="labelType"/>
              <xs:element name="configurationControlProtege" type="labelType"/>
              <xs:element name="contractsMentor" type="labelType"/>
              <xs:element name="contractsProtege" type="labelType"/>
              <xs:element name="currentPosition" type="labelType"/>
              <xs:element name="cycleLabel" type="labelType"/>
              <xs:element name="embeddedMentor" type="labelType"/>
              <xs:element name="embeddedProtege" type="labelType"/>
              <xs:element name="functionalManagerMentor" type="labelType"/>
              <xs:element name="functionalManagerProtege" type="labelType"/>
              <xs:element name="generalCareerMentor" type="labelType"/>
              <xs:element name="generalCareerProtege" type="labelType"/>
              <xs:element name="hrMentor" type="labelType"/>
              <xs:element name="hrProtege" type="labelType"/>
              <xs:element name="infrastructureSupportMentor" type="labelType"/>
              <xs:element name="infrastructureSupportProtege" type="labelType"/>
              <xs:element name="managerMentor" type="labelType"/>
              <xs:element name="managerProtege" type="labelType"/>
              <xs:element name="marketingMentor" type="labelType"/>
              <xs:element name="marketingProtege" type="labelType"/>
              <xs:element name="modificationById" type="idType"/>
              <xs:element name="modificationDate" type="xs:date"/>
              <xs:element name="otherOneMentor" type="labelType"/>
              <xs:element name="otherOneProtege" type="labelType"/>
              <xs:element name="otherOneSkill" type="labelType"/>
              <xs:element name="otherTwoMentor" type="labelType"/>
              <xs:element name="otherTwoProtege" type="labelType"/>
              <xs:element name="otherTwoSkill" type="labelType"/>
              <xs:element name="otherThreeMentor" type="labelType"/>
              <xs:element name="otherThreeProtege" type="labelType"/>
              <xs:element name="otherThreeSkill" type="labelType"/>
              <xs:element name="preferType" type="labelType"/>
              <xs:element name="processMentor" type="labelType"/>
              <xs:element name="processProtege" type="labelType"/>
              <xs:element name="programManagementMentor" type="labelType"/>
              <xs:element name="programManagementProtege" type="labelType"/>
              <xs:element name="qualityMentor" type="labelType"/>
              <xs:element name="qualityProtege" type="labelType"/>
              <xs:element name="registrationDate" type="xs:date"/>
              <xs:element name="researchAnalysisMentor" type="labelType"/>
              <xs:element name="researchAnalysisProtege" type="labelType"/>
              <xs:element name="securityAdminSupportMentor" type="labelType"/>
              <xs:element name="securityAdminSupportProtege" type="labelType"/>
              <xs:element name="softwareEngineeringMentor" type="labelType"/>
              <xs:element name="softwareEngineeringProtege" type="labelType"/>
              <xs:element name="subcontractsMentor" type="labelType"/>
              <xs:element name="subcontractsProtege" type="labelType"/>
              <xs:element name="systemEngineeringMentor" type="labelType"/>
              <xs:element name="systemEngineeringProtege" type="labelType"/>
              <xs:element name="systemIntegrationMentor" type="labelType"/>
              <xs:element name="systemIntegrationProtege" type="labelType"/>
              <xs:element name="uuid" type="labelType"/>
              <xs:element name="experienceYears" type="labelType"/>
              <xs:element name="employee">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element ref="mentorEmployee"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="goals">
                <xs:complexType>
                  <xs:sequence>
                    <xs:choice minOccurs="0" maxOccurs="unbounded">
                      <xs:element ref="mentorGoal"/>
                    </xs:choice>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>

       



        <xs:element name="mentorEmployee">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="id" type="idType"/>
              <xs:element name="firstName" type="labelType"/>
              <xs:element name="lastName" type="labelType"/>
              <xs:element name="emailAddress" type="labelType"/>
              <xs:element name="telephone" type="labelType"/>
              <xs:element name="workLocation" type="labelType"/>
              <xs:element name="jobTitle" type="labelType"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>

       



        <xs:element name="mentorGoal">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="id" type="idType"/>
              <xs:element name="description" type="textType"/>
              <xs:element name="label" type="textType"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>

       



        <xs:element name="mentorDesiredWorkPartner">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="id" type="idType"/>
               <xs:element name="participant">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element ref="mentorParticipant"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="partner">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element ref="mentorEmployee"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>

       



        <xs:element name="mentorWorkPartner">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="id" type="idType"/>
               <xs:element name="mentor">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element ref="mentorParticipant"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
               <xs:element name="protege">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element ref="mentorParticipant"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="committeePOC">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element ref="mentorEmployee"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>

       



        <!--  Request/Response Element Definitions -->


        <xs:element name="authenticationRequest">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="username" type="usernameType"/>
              <xs:element name="password" type="passwordType"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>

       



        <xs:element name="dataRequest">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="session" type="sessionType"/>
              <xs:element name="type" type="tokenType"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>

       



        <xs:element name="actionRequest">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="session" type="sessionType"/>
              <xs:element name="action" type="tokenType"/>
              <xs:element name="record" type="idType"/>
              <xs:element name="items" type="itemType" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>


        <xs:element name="serviceResponse">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="session" type="sessionType"/>
              <xs:element name="status" type="tokenType"/>
              <xs:element name="message" type="textType" minOccurs="0"/>
              <xs:element name="items" type="itemType" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>

       


      </xs:schema>