Polymorphic data type

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • andy.wagg@gb.schneider-electric.com

    Polymorphic data type

    I have a .NET web service that defines a complex type in the wsdl. One
    element of this wsdl does not define a type, but expects different
    simple data types to be handled polymorphically .

    <s:complexTyp e name="ItemValue ">
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="Diagnosti cInfo"
    type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="Value" />
    <s:element minOccurs="0" maxOccurs="1" name="Quality"
    type="s0:OPCQua lity" />
    </s:sequence>
    </s:complexType>

    The generated java class for this complex type defines the Value
    attribute as a
    javax.xml.soap. SOAPElement.

    What I can't find is how do I create a SOAPElement to represent a
    simple data type, eg. xsd:int

    Any help appreciatted, Andy

  • Martin Honnen

    #2
    Re: Polymorphic data type



    andy.wagg@gb.sc hneider-electric.com wrote:
    [color=blue]
    > I have a .NET web service that defines a complex type in the wsdl. One
    > element of this wsdl does not define a type, but expects different
    > simple data types to be handled polymorphically .
    >
    > <s:complexTyp e name="ItemValue ">
    > <s:sequence>
    > <s:element minOccurs="0" maxOccurs="1" name="Diagnosti cInfo"
    > type="s:string" />
    > <s:element minOccurs="0" maxOccurs="1" name="Value" />
    > <s:element minOccurs="0" maxOccurs="1" name="Quality"
    > type="s0:OPCQua lity" />
    > </s:sequence>
    > </s:complexType>
    >
    > The generated java class for this complex type defines the Value
    > attribute as a
    > javax.xml.soap. SOAPElement.
    >
    > What I can't find is how do I create a SOAPElement to represent a
    > simple data type, eg. xsd:int[/color]

    You might want to ask or at least crosspost in a Java group if the
    question as I understand it is mainly about using a specific Java API
    for SOAP.

    --

    Martin Honnen

    Comment

    • Andy

      #3
      Re: Polymorphic data type

      Thanks, but I have already tried comp.lang.java. programmer and
      microsoft.publi c.xml.soap with no success. I didn't crosspost as that
      usually seems to upset people.

      Comment

      Working...