Loading ...
Sorry, an error occurred while loading the content.

WSDL Complex Types

Expand Messages
  • l_colclough2004
    Hi, hope this isn t too off topic - I m looking for a way to parse WSDL complex types to build a representation of them in memory (using Java). I was trying to
    Message 1 of 3 , Apr 4 2:21 AM
    View Source
    • 0 Attachment
      Hi,

      hope this isn't too off topic - I'm looking for a way to parse WSDL
      complex types to build a representation of them in memory (using Java).

      I was trying to use WSDL2J for this but couldn't seem to get the Types
      information.

      Can anyone recommend anything?

      Thanks

      Lee.
    • Ramkumar Menon
      parse the wsdl to get the Definition object . Types types = definition.getTypes(); The types can have the message type definitions expressed in any schema
      Message 2 of 3 , Apr 4 3:50 AM
      View Source
      • 0 Attachment
        parse the wsdl to get the Definition object .

        Types types = definition.getTypes();

        The types can have the message type definitions expressed in any schema language, which includes XML Schema[XSD].

        The schema(s) cd either be imported through an import statement , or  expressed as an inline schema, that is equivalent to copying and pasting the XSD into the types section.
        These are both captured as wsdl extensibility elements.


        List extElements = types.getExtensibilityElements(); //it is a list bcoz there cd be 
                                                                                      // multiple xsd imports into
                                                                                   //the  <types> srction, or
                                                                // there cd be one or more inline schemas.

        AFAIK, the extElements list cd contain a Map that contains the namepsaceURI mapped to the javax.wsdl.Import  object, in case there is an import. Else there wd be either an implementation specific representation of the xml schema within it. [for isntance, com.foo.bar.Schema object].
        u cd also treat ir as a blackbox and retrieve it as an UnknownExtensibilityElement, and use the getElement() to get the XSD as a DOM element, and perform ur processing on it.

        HTH,
        Ram.


        On 4/4/06, l_colclough2004 <l_colclough2004@...> wrote:
        Hi,

        hope this isn't too off topic - I'm looking for a way to parse WSDL
        complex types to build a representation of them in memory (using Java).

        I was trying to use WSDL2J for this but couldn't seem to get the Types
        information.

        Can anyone recommend anything?

        Thanks

        Lee.





        -----------------------------------------------------------------
        This group is a forum for the discussion of the WSDL specification and its implementation.  Please stay on-topic.




        YAHOO! GROUPS LINKS






        --
        Shift to the left, shift to the right!
        Pop up, push down, byte, byte, byte!

        -Ramkumar Menon
        A typical Macroprocessor
      • l_colclough2004
        Thanks RAM, At the risk of sounding like a total newbie to all this (which I am!), what do I do once I ve got my extElements List? I ve inspected it through
        Message 3 of 3 , May 26, 2006
        View Source
        • 0 Attachment
          Thanks RAM,

          At the risk of sounding like a total newbie to all this (which I am!),
          what do I do once I've got my extElements List? I've inspected it
          through the Eclipse object inspector but cannot see anything that
          resembles the complex type section of my WSDL doc.

          Can anyone give me some further pointers on where to look for more
          info, or what to do next?

          Many thanks

          Lee.


          --- In wsdl@yahoogroups.com, "Ramkumar Menon" <ramkumar.menon@...> wrote:
          >
          > parse the wsdl to get the Definition object .
          >
          > Types types = definition.getTypes();
          >
          > The types can have the message type definitions expressed in any schema
          > language, which includes XML Schema[XSD].
          >
          > The schema(s) cd either be imported through an import statement , or
          > expressed as an inline schema, that is equivalent to copying and
          pasting the
          > XSD into the types section.
          > These are both captured as wsdl extensibility elements.
          >
          >
          > List extElements = types.getExtensibilityElements(); //it is a list bcoz
          > there cd be
          >
          > // multiple xsd imports into
          >
          > //the <types> srction, or
          > // there cd
          be one
          > or more inline schemas.
          >
          > AFAIK, the extElements list cd contain a Map that contains the
          namepsaceURI
          > mapped to the javax.wsdl.Import object, in case there is an import.
          Else
          > there wd be either an implementation specific representation of the xml
          > schema within it. [for isntance, com.foo.bar.Schema object].
          > u cd also treat ir as a blackbox and retrieve it as an
          > UnknownExtensibilityElement, and use the getElement() to get the XSD
          as a
          > DOM element, and perform ur processing on it.
          >
          > HTH,
          > Ram.
          >
          >
          > On 4/4/06, l_colclough2004 <l_colclough2004@...> wrote:
          > >
          > > Hi,
          > >
          > > hope this isn't too off topic - I'm looking for a way to parse WSDL
          > > complex types to build a representation of them in memory (using
          Java).
          > >
          > > I was trying to use WSDL2J for this but couldn't seem to get the Types
          > > information.
          > >
          > > Can anyone recommend anything?
          > >
          > > Thanks
          > >
          > > Lee.
          > >
          > >
          > >
          > >
          > >
          > > -----------------------------------------------------------------
          > > This group is a forum for the discussion of the WSDL specification
          and its
          > > implementation. Please stay on-topic.
          > >
          > >
          > > ------------------------------
          > > YAHOO! GROUPS LINKS
          > >
          > >
          > > - Visit your group "wsdl <http://groups.yahoo.com/group/wsdl>" on
          > > the web.
          > >
          > > - To unsubscribe from this group, send an email to:
          > >
          wsdl-unsubscribe@yahoogroups.com<wsdl-unsubscribe@yahoogroups.com?subject=Unsubscribe>
          > >
          > > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
          > > Service <http://docs.yahoo.com/info/terms/>.
          > >
          > >
          > > ------------------------------
          > >
          >
          >
          >
          > --
          > Shift to the left, shift to the right!
          > Pop up, push down, byte, byte, byte!
          >
          > -Ramkumar Menon
          > A typical Macroprocessor
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.