0 Replies Latest reply on Oct 5, 2009 8:13 AM by xbrotherx

    webService returns correct value but Flex sees it as NULL

    xbrotherx Level 1

      Nice, I just realized that my original post only had the WSDL. Sorry about that. The underlying issue I am having is, the Flex Builder 3 Manage Web Services wizard consumes the wsdl just fine, creates all necessary classes and from there I can instantiate and call the webservice. Using Service Capture I see the SOAP response come back, I can debug in Flex Builder and step through the code and see the response was returned but it gets lost within the SOAPDecoder.as in the decodeBody() method.

       

      Unfortunately, I can not open up a port to allow anyone to try it out. The best I can do is post the SOAP request body and the SOAP response body along with the wsdl.

       

      SOAP Request Body:

      <SOAP-ENV:Envelope xmlns="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

         <SOAP-ENV:Body>

            <intf:startSession xmlns:intf="http://company.com/HeliumWS">

               <intf:username>DEV</intf:username>

            </intf:startSession>

         </SOAP-ENV:Body>

      </SOAP-ENV:Envelope>

       

      SOAP Reponse Body:

      <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

         <env:Body>

            <n1:startSessionResponse env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:n1="http://company.com/HeliumWS">

               <return xmlns:n2="http://www.ruby-lang.org/xmlns/ruby/type/custom" xsi:type="n2:HeliumWS..StartSessionReturn">

                  <sessionID xsi:type="xsd:string">session7a86c52d</sessionID>

               </return>

            </n1:startSessionResponse>

         </env:Body>

      </env:Envelope>

       

       

      WSDL:

       


      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions
      targetNamespace="http://company.com/HeliumWS"
      xmlns:apachesoap="http://xml.apache.org/xml-soap"
      xmlns:impl="http://company.com/HeliumWS"
      xmlns:intf="http://company.com/HeliumWS"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <wsdl:types>
      <schema elementFormDefault="qualified"
      targetNamespace="http://company.com/HeliumWS"
      xmlns="http://www.w3.org/2001/XMLSchema">
      <element name="startSession">
      <complexType>
      <sequence>
      <element name="username" nillable="true" type="xsd:string"/>
      </sequence>
      </complexType>
      </element>
      <element name="startSessionResponse">
      <complexType>
      <sequence>
      <element name="returnValue" type="intf:startSessionReturn"/>
      </sequence>
      </complexType>
      </element>
      <complexType name="startSessionReturn">
      <sequence>
      <element name="sessionID" type="xsd:string"/>
      </sequence>
      </complexType>
      </schema>
      </wsdl:types>
      <wsdl:message name="startSessionRequest">
      <wsdl:part element="impl:startSession" name="parameters"/>
      </wsdl:message>
      <wsdl:message name="startSessionResponse">
      <wsdl:part element="impl:startSessionResponse" name="parameters"/>
      </wsdl:message>
      <wsdl:portType name="MCUBindingImpl">
      <wsdl:operation name="startSession">
      <wsdl:input message="impl:startSessionRequest" name="startSessionRequest"/>
      <wsdl:output message="impl:startSessionResponse" name="startSessionResponse"/>
      </wsdl:operation>
           </wsdl:portType>
         <wsdl:binding name="MCUBindingImplSoapBinding" type="impl:MCUBindingImpl">
      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="startSession">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="startSessionRequest">
      <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="startSessionResponse">
      <wsdlsoap:body use="literal"/>
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="MCUBindingImplService">
      <wsdl:port binding="impl:MCUBindingImplSoapBinding" name="MCUBindingImpl">
      <wsdlsoap:address location="http://10.10.20.82/soap"/>
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>