2 Replies Latest reply on Feb 4, 2008 2:27 PM by Jeff_Vandenberg

    Trying to parse a Soap Message

      I'm working on creating webservices that will be consumed by Director and working with the client programmer, we've come to recognize the problem, but we don't know how to resolve it.

      Problem: the XMLParser doesn't follow href parameters in tags that refer to subobjects, which result in a #getProp Ref error.

      I have a web service method that will return a list of names and it returns the following XML response:

      <?xml version="1.0" encoding="UTF-8" ?>
      <soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=" http://www.w3.org/2001/XMLSchema" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">
      <getStudentsResponse soapenv:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/">
      <getStudentsReturn href="#id0" />
      <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/" soapenc:arrayType="xsd:anyType[6]" xsi:type="soapenc:Array" xmlns:soapenc=" http://schemas.xmlsoap.org/soap/encoding/">
      <multiRef xsi:type="soapenc:string">Bob B Bobbly</multiRef>
      <multiRef xsi:type="soapenc:string">Andy A Anderson</multiRef>
      <multiRef xsi:type="soapenc:string">Carl C Carlson</multiRef>

      When it hits the getStudentsReturn element and tries to refer to a child node, and obviously fails.

      The server is Tomcat 5.5, using Axis 1.4 for web services. I can post a wsdl if desired.

      The web service is configured for rpc/encoded style.

      What is the way to get out of this particular jam? Neither me nor the client programmer have extensive knowledge of how Director (or the relevant Xtra) handles SOAP messages or parse them. I've stepped through the code and seen the XML parser object render the response into an object tree, but it doesn't respect the href's.

      I can provide follow up to any questions or comments about this problem.


      Jeff Vandenberg
        • 1. Re: Trying to parse a Soap Message
          Level 7
          Hi Jeff,

          While I don't have much experience with web services, I'm about to
          embark on something that involves extensive use of them, so your post
          caught my eye.
          If I understand correctly, the href attribute associated with the
          getStudentsReturn node is supposed to "automatically" link to the
          following multiRef array. Is that correct?
          Assuming it *did* link correctly, how would this manifest itself? Is it
          not a matter of you the parser watching for href tags and resolving them
          yourself? Why would you not simply provide the multiRef nodes as
          children of the getStudentsReturn node? Is there documentation somewhere
          for the href attribute and this form of linking?
          Have you tried using the Flash Asset xtra for parsing, and does it
          behave "correctly"?
          • 2. Re: Trying to parse a Soap Message
            Jeff_Vandenberg Level 1
            It should manifest as an array of strings.

            It's being encoded that way automatically by Axis when it serves the return from the method.

            I would think that it would be a matter of the parser recognizing it properly. The client programmer generated the behaviors using the Web Service Generator movie as detailed on this page: http://www.adobe.com/devnet/director/articles/webservices_04.html

            To the best of my knowledge the Flash Asset Xtra has not been utilized yet.