0 Replies Latest reply on Oct 29, 2009 8:16 AM by Raja Himanath

    How to pass an object as an input  parameter to web service operations?

    Raja Himanath

      Hello Everyone

       

      I know how to call a webservice from flex. If its a string we can use the text value and pass the value as a parameter to the webservice operation.

      But now I have an complex object ie.object contains internally some other objects and I need to populate all those objects and again put these objects inside the main complex obect.

       

       

       

      My SOAP Reuest is

      - <soapenv:Body>
      - <q1:AcademicHistoryQueryRequest>
      - <q0:AcademicHistoryQuerySpecification>
      - <q0:Identifier type="NetworkID">
      <q0:Value>119650510</q0:Value>
      </q0:Identifier>
      - <q0:Credential type="NetworkID password">
      <q0:Value>secret</q0:Value>
      </q0:Credential>
      </q0:AcademicHistoryQuerySpecification>
      </q1:AcademicHistoryQueryRequest>
      </soapenv:Body>
      </soapenv:Envelope>

       

      Soap Response is

      - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      - <soapenv:Body>
      - <AcademicHistoryProvideReply xmlns:ns2="http://www.openeai.org/AcademicHistoryService/">
      <Result xmlns="http://www.openeai.org/ahs/" action="Query" status="success" />
      - <AcademicHistory xmlns="http://www.openeai.org/ahs/" academicHistoryProvider="org.openeai.services.academichistory.DummyAcademicHistoryProvider" authenticator="org.openeai.services.academichistory.DummyAcademicHistoryProvider">
      - <Student>
      - <Identifier type="NetworkID">
      <Value>119650510</Value>
      </Identifier>
      - <Name>
      <FirstName>Example</FirstName>
      <LastName>Student</LastName>
      </Name>
      </Student>
      <InstitutionName>N2 TEST INSTANCE</InstitutionName>
      - <RequestDatetime>
      <Year>2009</Year>
      <Month>10</Month>
      <Day>29</Day>
      <Hour>6</Hour>
      <Minute>22</Minute>
      <Second>51</Second>
      <SubSecond>310</SubSecond>
      <Timezone>GMT+05:30</Timezone>
      </RequestDatetime>
      - <Course>
      <Year>1994</Year>
      <TermId>199409</TermId>
      <Prefix>BA</Prefix>
      <Number>112</Number>
      <Title>ACCOUNTING 1</Title>
      <Credits>4</Credits>
      <Grade>A+</Grade>
      </Course>
      - <Course>
      <Year>1994</Year>
      <TermId>199409</TermId>
      <Prefix>BA</Prefix>
      <Number>114</Number>
      <Title>MICROCOMPUTER-BUSINESS 1</Title>
      <Credits>4</Credits>
      <Grade>A+</Grade>
      </Course>
      - <Course>
      <Year>1994</Year>
      <TermId>199501</TermId>
      <Prefix>BA</Prefix>
      <Number>113</Number>
      <Title>ACCOUNTING 2</Title>
      <Credits>4</Credits>
      <Grade>A+</Grade>
      </Course>
      - <Course>
      <Year>1994</Year>
      <TermId>199501</TermId>
      <Prefix>BA</Prefix>
      <Number>115</Number>
      <Title>MICROCOMPUTER-BUSINESS 2</Title>
      <Credits>4</Credits>
      <Grade>A+</Grade>
      </Course>
      - <Course>
      <Year>1994</Year>
      <TermId>199409</TermId>
      <Prefix>MM</Prefix>
      <Number>106</Number>
      <Title>MATHEMATICS OF FINANCE</Title>
      <Credits>4</Credits>
      <Grade>A</Grade>
      </Course>
      - <Course>
      <Year>1994</Year>
      <TermId>199505</TermId>
      <Prefix>BA</Prefix>
      <Number>221</Number>
      <Title>ORGANIZATIONAL BEHAVIOUR</Title>
      <Credits>4</Credits>
      <Grade>A</Grade>
      </Course>
      - <Course>
      <Year>1994</Year>
      <TermId>199409</TermId>
      <Prefix>EN</Prefix>
      <Number>170</Number>
      <Title>COLLEGE ENGLISH 2</Title>
      <Credits>3</Credits>
      <Grade>B+</Grade>
      </Course>
      - <Course>
      <Year>1994</Year>
      <TermId>199501</TermId>
      <Prefix>EN</Prefix>
      <Number>180</Number>
      <Title>COLLEGE ENGLISH 3</Title>
      <Credits>3</Credits>
      <Grade>B+</Grade>
      </Course>
      - <Course>
      <Year>1994</Year>
      <TermId>199501</TermId>
      <Prefix>EN</Prefix>
      <Number>180</Number>
      <Title>COLLEGE ENGLISH 3</Title>
      <Credits>3</Credits>
      <Grade>B+</Grade>
      </Course>
      - <Course>
      <Year>1994</Year>
      <TermId>199409</TermId>
      <Prefix>BA</Prefix>
      <Number>111</Number>
      <Title>INTRODUCTION TO BUSINESS</Title>
      <Credits>4</Credits>
      <Grade>B+</Grade>
      </Course>
      - <Course>
      <Year>1994</Year>
      <TermId>199501</TermId>
      <Prefix>BA</Prefix>
      <Number>117</Number>
      <Title>OPERATIONS MANAGEMENT</Title>
      <Credits>4</Credits>
      <Grade>B+</Grade>
      </Course>
      - <Course>
      <Year>1994</Year>
      <TermId>199501</TermId>
      <Prefix>BA</Prefix>
      <Number>116</Number>
      <Title>MARKETING</Title>
      <Credits>4</Credits>
      <Grade>B</Grade>
      </Course>
      - <Course>
      <Year>1995</Year>
      <TermId>199509</TermId>
      <Prefix>OM</Prefix>
      <Number>221</Number>
      <Title>PURCH'G & VALUE ANALYSIS</Title>
      <Credits>4</Credits>
      <Grade>A+</Grade>
      </Course>
      - <Course>
      <Year>1995</Year>
      <TermId>199601</TermId>
      <Prefix>LS</Prefix>
      <Number>200</Number>
      <Title>CANADIAN STUDIES-DIVERSI</Title>
      <Credits>3</Credits>
      <Grade>A</Grade>
      </Course>
      - <Course>
      <Year>1995</Year>
      <TermId>199509</TermId>
      <Prefix>BA</Prefix>
      <Number>222</Number>
      <Title>QUANTITATIVE MANAGEMNT</Title>
      <Credits>4</Credits>
      <Grade>A</Grade>
      </Course>
      - <Course>
      <Year>1995</Year>
      <TermId>199601</TermId>
      <Prefix>MN</Prefix>
      <Number>222</Number>
      <Title>MANAGEMENT PRINCIPLES</Title>
      <Credits>4</Credits>
      <Grade>A</Grade>
      </Course>
      - <Course>
      <Year>1995</Year>
      <TermId>199605</TermId>
      <Prefix>MA</Prefix>
      <Number>222</Number>
      <Title>RETAIL MANAGEMENT</Title>
      <Credits>4</Credits>
      <Grade>A</Grade>
      </Course>
      - <Course>
      <Year>1995</Year>
      <TermId>199605</TermId>
      <Prefix>MA</Prefix>
      <Number>222</Number>
      <Title>RETAIL MANAGEMENT</Title>
      <Credits>4</Credits>
      <Grade>A</Grade>
      </Course>
      - <Course>
      <Year>1995</Year>
      <TermId>199509</TermId>
      <Prefix>EO</Prefix>
      <Number>104</Number>
      <Title>PRINCIPLES OF MICRO-ECON</Title>
      <Credits>3</Credits>
      <Grade>B</Grade>
      </Course>
      - <Course>
      <Year>1995</Year>
      <TermId>199509</TermId>
      <Prefix>EN</Prefix>
      <Number>253</Number>
      <Title>ADV. BUS.COMMUNICATIONS</Title>
      <Credits>3</Credits>
      <Grade>B</Grade>
      </Course>
      - <Course>
      <Year>1995</Year>
      <TermId>199601</TermId>
      <Prefix>JR</Prefix>
      <Number>221</Number>
      <Title>JOB READINESS 1</Title>
      <Credits>1</Credits>
      <Grade>C+</Grade>
      </Course>
      - <Course>
      <Year>1995</Year>
      <TermId>199509</TermId>
      <Prefix>MN</Prefix>
      <Number>221</Number>
      <Title>PERSONNEL MANAGEMENT</Title>
      <Credits>4</Credits>
      <Grade>C+</Grade>
      </Course>
      - <Course>
      <Year>1995</Year>
      <TermId>199601</TermId>
      <Prefix>MA</Prefix>
      <Number>223</Number>
      <Title>PERSONAL SELLING 1</Title>
      <Credits>4</Credits>
      <Grade>C+</Grade>
      </Course>
      </AcademicHistory>
      </AcademicHistoryProvideReply>
      </soapenv:Body>
      </soapenv:Envelope>

       

       

      So I need to create Identifier,Credential objects and put it into AcademicHistoryQuerySpecification and then put the AcademicHistoryQuerySpecification  object in AcademicHistoryQueryRequest. How to do that in Flex?

       

      How to proceed I am not getting an idea. Can anyone help me in this regard?

      Thanks in Advance

      Raja Himanath