Axis response deserialization

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brad King

    #1

    Axis response deserialization

    I'm calling an Axis web service (from a .Net client) that returns an array
    of a complex type. The complex type wrapper appears to have been generated
    with all members intact from the wsdl using "add web reference", but the
    response classes never contain any data, whereas I know the response XML
    does have data.

    I have called a similar service which works fine, but the way the return
    type is declared it the WSDL is different. The one that doesn't work uses a
    declaration like this for the complex type "Creative":

    - <schema elementFormDefa ult="qualified" targetNamespace ="urn:X.Y.Z.com "
    xmlns="http://www.w3.org/2001/XMLSchema">
    - <complexType name="Creative" >
    - <sequence>
    <element name="id" type="xsd:int" />
    <element name="adGroupId " type="xsd:int" />
    <element name="headline" nillable="true" type="xsd:strin g" />
    <element name="descripti on1" nillable="true" type="xsd:strin g" />
    <element name="descripti on2" nillable="true" type="xsd:strin g" />
    <element name="destinati onURL" nillable="true" type="xsd:strin g" />
    <element name="displayUR L" nillable="true" type="xsd:strin g" />
    <element name="deleted" type="xsd:boole an" />
    <element name="disapprov ed" type="xsd:boole an" />
    </sequence>
    </complexType>
    </schema>

    thanks for any help on this.


  • John Jenkins

    #2
    Re: Axis response deserialization

    Hi Brad,
    when you say you know the response XML does have data, are you
    looking at the soap passed back over the wire using a trace tool? This could
    point to a problem with Deserialization of the XML into a object instances.
    Have you also tried wrapping the definition of the array of complex types
    into a new vlass?


    "Brad King" <nospam-bradk@channelad visor.com> wrote in message
    news:OCPmZ1baEH A.3596@tk2msftn gp13.phx.gbl...[color=blue]
    > I'm calling an Axis web service (from a .Net client) that returns an array
    > of a complex type. The complex type wrapper appears to have been generated
    > with all members intact from the wsdl using "add web reference", but the
    > response classes never contain any data, whereas I know the response XML
    > does have data.
    >
    > I have called a similar service which works fine, but the way the return
    > type is declared it the WSDL is different. The one that doesn't work uses[/color]
    a[color=blue]
    > declaration like this for the complex type "Creative":
    >
    > - <schema elementFormDefa ult="qualified" targetNamespace ="urn:X.Y.Z.com "
    > xmlns="http://www.w3.org/2001/XMLSchema">
    > - <complexType name="Creative" >
    > - <sequence>
    > <element name="id" type="xsd:int" />
    > <element name="adGroupId " type="xsd:int" />
    > <element name="headline" nillable="true" type="xsd:strin g" />
    > <element name="descripti on1" nillable="true" type="xsd:strin g" />
    > <element name="descripti on2" nillable="true" type="xsd:strin g" />
    > <element name="destinati onURL" nillable="true" type="xsd:strin g" />
    > <element name="displayUR L" nillable="true" type="xsd:strin g" />
    > <element name="deleted" type="xsd:boole an" />
    > <element name="disapprov ed" type="xsd:boole an" />
    > </sequence>
    > </complexType>
    > </schema>
    >
    > thanks for any help on this.
    >
    >[/color]


    Comment

    • Dino Chiesa [Microsoft]

      #3
      Re: Axis response deserialization

      Brad,
      the wire trace will likely show a namespace disagreement.

      If you can get the trace of what works, as well as what does not work, and
      post them both, some people on this group may be able to point out the
      problem.

      -Dino



      "John Jenkins" <john_Jenkins@y ahoo.com> wrote in message
      news:cXWJc.294$ qS6.0@newsfe1-win.ntli.net...[color=blue]
      > Hi Brad,
      > when you say you know the response XML does have data, are you
      > looking at the soap passed back over the wire using a trace tool? This[/color]
      could[color=blue]
      > point to a problem with Deserialization of the XML into a object[/color]
      instances.[color=blue]
      > Have you also tried wrapping the definition of the array of complex types
      > into a new vlass?
      >
      >
      > "Brad King" <nospam-bradk@channelad visor.com> wrote in message
      > news:OCPmZ1baEH A.3596@tk2msftn gp13.phx.gbl...[color=green]
      > > I'm calling an Axis web service (from a .Net client) that returns an[/color][/color]
      array[color=blue][color=green]
      > > of a complex type. The complex type wrapper appears to have been[/color][/color]
      generated[color=blue][color=green]
      > > with all members intact from the wsdl using "add web reference", but the
      > > response classes never contain any data, whereas I know the response XML
      > > does have data.
      > >
      > > I have called a similar service which works fine, but the way the return
      > > type is declared it the WSDL is different. The one that doesn't work[/color][/color]
      uses[color=blue]
      > a[color=green]
      > > declaration like this for the complex type "Creative":
      > >
      > > - <schema elementFormDefa ult="qualified" targetNamespace ="urn:X.Y.Z.com "
      > > xmlns="http://www.w3.org/2001/XMLSchema">
      > > - <complexType name="Creative" >
      > > - <sequence>
      > > <element name="id" type="xsd:int" />
      > > <element name="adGroupId " type="xsd:int" />
      > > <element name="headline" nillable="true" type="xsd:strin g" />
      > > <element name="descripti on1" nillable="true" type="xsd:strin g" />
      > > <element name="descripti on2" nillable="true" type="xsd:strin g" />
      > > <element name="destinati onURL" nillable="true" type="xsd:strin g" />
      > > <element name="displayUR L" nillable="true" type="xsd:strin g" />
      > > <element name="deleted" type="xsd:boole an" />
      > > <element name="disapprov ed" type="xsd:boole an" />
      > > </sequence>
      > > </complexType>
      > > </schema>
      > >
      > > thanks for any help on this.
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Brad King

        #4
        Re: Axis response deserialization

        Thanks, yes namespaces indeed. The return complex type was inadvertantly put
        in it's own namespace by the developer on the Axis server side.

        "Dino Chiesa [Microsoft]" <dinoch@online. microsoft.com> wrote in message
        news:%23ee3NPEb EHA.3988@tk2msf tngp13.phx.gbl. ..[color=blue]
        > Brad,
        > the wire trace will likely show a namespace disagreement.
        >
        > If you can get the trace of what works, as well as what does not work, and
        > post them both, some people on this group may be able to point out the
        > problem.
        >
        > -Dino
        >
        >
        >
        > "John Jenkins" <john_Jenkins@y ahoo.com> wrote in message
        > news:cXWJc.294$ qS6.0@newsfe1-win.ntli.net...[color=green]
        > > Hi Brad,
        > > when you say you know the response XML does have data, are[/color][/color]
        you[color=blue][color=green]
        > > looking at the soap passed back over the wire using a trace tool? This[/color]
        > could[color=green]
        > > point to a problem with Deserialization of the XML into a object[/color]
        > instances.[color=green]
        > > Have you also tried wrapping the definition of the array of complex[/color][/color]
        types[color=blue][color=green]
        > > into a new vlass?
        > >
        > >
        > > "Brad King" <nospam-bradk@channelad visor.com> wrote in message
        > > news:OCPmZ1baEH A.3596@tk2msftn gp13.phx.gbl...[color=darkred]
        > > > I'm calling an Axis web service (from a .Net client) that returns an[/color][/color]
        > array[color=green][color=darkred]
        > > > of a complex type. The complex type wrapper appears to have been[/color][/color]
        > generated[color=green][color=darkred]
        > > > with all members intact from the wsdl using "add web reference", but[/color][/color][/color]
        the[color=blue][color=green][color=darkred]
        > > > response classes never contain any data, whereas I know the response[/color][/color][/color]
        XML[color=blue][color=green][color=darkred]
        > > > does have data.
        > > >
        > > > I have called a similar service which works fine, but the way the[/color][/color][/color]
        return[color=blue][color=green][color=darkred]
        > > > type is declared it the WSDL is different. The one that doesn't work[/color][/color]
        > uses[color=green]
        > > a[color=darkred]
        > > > declaration like this for the complex type "Creative":
        > > >
        > > > - <schema elementFormDefa ult="qualified"[/color][/color][/color]
        targetNamespace ="urn:X.Y.Z.com "[color=blue][color=green][color=darkred]
        > > > xmlns="http://www.w3.org/2001/XMLSchema">
        > > > - <complexType name="Creative" >
        > > > - <sequence>
        > > > <element name="id" type="xsd:int" />
        > > > <element name="adGroupId " type="xsd:int" />
        > > > <element name="headline" nillable="true" type="xsd:strin g" />
        > > > <element name="descripti on1" nillable="true" type="xsd:strin g" />
        > > > <element name="descripti on2" nillable="true" type="xsd:strin g" />
        > > > <element name="destinati onURL" nillable="true" type="xsd:strin g" />
        > > > <element name="displayUR L" nillable="true" type="xsd:strin g" />
        > > > <element name="deleted" type="xsd:boole an" />
        > > > <element name="disapprov ed" type="xsd:boole an" />
        > > > </sequence>
        > > > </complexType>
        > > > </schema>
        > > >
        > > > thanks for any help on this.
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        Working...