Message coming back short

View: New views
3 Messages — Rating Filter:   Alert me  

Message coming back short

by Sam Carleton-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Silverlight 2.0 is calling an Axis2/C 1.6 server requesting a method that takes a string as an in, though it isn't used and returns a complex result.  Here is the most relevant part of the WSDL:

      <xsd:element name="getDefaultSettings">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="in" type="xsd:string"></xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>

      <xsd:element name="getDefaultSettingsResponse">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="defaultSettings" type="tns:DefaultSettings"></xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>

      <xsd:complexType name="DefaultSettings">
        <xsd:sequence>
          <xsd:element name="CompanyName" type="xsd:string"></xsd:element>
          <xsd:element name="EnableFavorites" type="xsd:boolean"></xsd:element>
          <xsd:element name="EnableSlideShow" type="xsd:boolean"></xsd:element>
          <xsd:element name="EventName" type="xsd:string" nillable="true"></xsd:element>
          <xsd:element name="PhoneNumberFormat" type="xsd:string"></xsd:element>
          <xsd:element name="Theme" type="xsd:string"></xsd:element>
          <xsd:element name="ThumbnailSize" type="xsd:int"></xsd:element>
          <xsd:element name="TimeoutAfter" type="xsd:int"></xsd:element>
          <xsd:element name="TimeoutStarts" type="xsd:int"></xsd:element>
          <xsd:element name="UserLang" type="xsd:string"></xsd:element>
        </xsd:sequence>
      </xsd:complexType>

Thanks to TCPMon, the request Envelope is this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">  
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">     
      <getDefaultSettings xmlns="urn:mmpp:parataMgr">        
         <in xmlns="">not used</in>     
      </getDefaultSettings>  
   </s:Body></s:Envelope>

The response is:

   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Body>
         <n:getDefaultSettingsResponse xmlns:n="urn:mmpp:parataMgr">
            <defaultSettings>
               <CompanyName>Miltonstreet Photography</CompanyName>
               <EnableFavorites>true</EnableFavorites>
               <EnableSlideShow>true</EnableSlideShow>
               <EventName>BigEvent</EventName>
               <PhoneNumberFormat>True</PhoneNumberFormat>
               <Theme>Blue</Theme>
            </defaultSettings>
         </n:getDefaultSettingsResponse>
      </soapenv:Body>
   </soapenv:Envelope>

A number of the elements in the defaultSettings are simply missing.  All the elements where not in order originally, so I sorted the WSDL, regenerated the source and recompiled and the same elements are always missing.  Any thoughts on what is going on?

Sam

Re: Message coming back short

by Sam Carleton-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I sorted the WSDL, regenerated the source and recompiled and the same elements
> are always missing.

I was mistaken, it is always the last elements that are lost, which
ever elements come last.

Re: Message coming back short

by Sam Carleton-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I figured it out...

I was not populating the ThumbnailSize element, so everything after that was being truncated.  I would have thought that Axis2/C would have thrown an error or something because it was not set to nullable in the WSDL, but no matter, I am back up and running!

On Mon, Sep 28, 2009 at 10:49 PM, Sam Carleton <scarleton@...> wrote:
> I sorted the WSDL, regenerated the source and recompiled and the same elements
> are always missing.

I was mistaken, it is always the last elements that are lost, which
ever elements come last.