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

RE: [soapbuilders] .NET interop - am i going nuts???

Expand Messages
  • Alex DeJarnatt
    We re using the managed stream-based System.Xml.XmlTextReader in the .net framework. It allows you to do something like this: reader.ReadStartElement(); while
    Message 1 of 7 , Mar 6, 2002
    • 0 Attachment

      We’re using the managed stream-based System.Xml.XmlTextReader in the .net framework.  It allows you to do something like this:

      reader.ReadStartElement();

      while (reader.NodeType != NodeType.EndElement) {

        reader.MoveToNext();

      }

      reader.ReadEndElement();

       

      you can see where we might have a bug… ;)

       

      -----Original Message-----
      From: Graham Glass [mailto:graham@...]
      Sent:
      Tuesday, March 05, 2002 5:10 PM
      To: soapbuilders@yahoogroups.com
      Subject: RE: [soapbuilders] .NET interop - am i going nuts???

       

      Hi Alex,

       

      Thanks for the info. This makes it easier to work around the issue.

      I’m surprised that this is the reason though, because most XML parser APIs would shield you from this kind of detail.

      Does the .NET SOAP stack use the regular MS XML parser, or are you using something different?

       

      Cheers,

      Graham

       

      -----Original Message--- --
      From: Alex DeJarnatt [mailto:alexdej@...]
      Sent:
      Monday, March 04, 2002 8:23 PM
      To: soapbuilders@yahoogroups.com
      Subject: RE: [soapbuilders] .NET interop - am i going nuts???

       

      We’re mishandling the empty element:

      <id2 id='id2' soapenc:root='0' xsi:type='soapenc:Array' soapenc:arrayType='xsd:anyType[0]'/>

       

      if you do

      <id2 id='id2' soapenc:root='0' xsi:type='soapenc:Array' soapenc:arrayType='xsd:anyType[0]'></id2>

      instead it’ll work.

       

      Thanks

      alex

       

      -----Original Message-----
      From: Graham Glass [mailto:graham@...]
      Sent:
      Wednesday, February 27, 2002 3:30 PM
      To: soapbuilders@yahoogroups.com
      Subject: RE: [soapbuilders] .NET interop - am i going nuts???

       

      Hi Alex,

       

      Thanks for your quick response!

       

      If you have any insight into the specific circumstance under which this manifests, it would be useful, because that might allow us to alter the GLUE on-the-wire format until the issue is resolved.

       

      Cheers,

      Graham

       

      -----Original Message-----
      From: Alex DeJarnatt [mailto:alexdej@...]
      Sent:
      Wednesday, February 27, 2002 5:17 PM
      To: soapbuilders@yahoogroups.com
      Subject: RE: [soapbuilders] .NET interop - am i going nuts???

       

      Graham, congratulations! You’ve found a bug in ASP.NET web services.  I’ve entered it into our database and a fix will be available in a future release.  I haven’t fully investigated the issue yet but it appears to affect 0-length encoded arrays.

      Thanks much

      alex

       

      -----Original Message-----
      From: Graham Glass [mailto:graham@...]
      Sent: Wednesday, February 27, 2002 1:29 PM
      To: soapbuilders@yahoogroups.com
      Subject: [soapbuilders] .NET interop - am i going nuts???

       

      Hi guys,

       

      I’m encountering a weird interoperability bug with .NET that is making me question my sanity!

      Maybe someone can help?

       

      I’m using a method called “foo” to send a Vector, which is defined as a struct that contains an array of xsd:anyType, to .NET, which in turn just echoes back the Vector.

       

      If I send a structure that contains a single empty Vector, everything works great. If I sent a structure that contains two vectors, each with an element in it, it works great. However, if I send a structure that contains an empty vector followed by a vector that contains something, .NET seems to deserialize it incorrectly and place a reference to one into the other.

       

       

      Here’s a trace of what I’m seeing.

       

      First, here’s the one that works fine, where the first vector contains “cat” and the second vector contains “dog”:

       

      LOG.SOAP: request to http://192.168.1.107/WebService7/Service1.asmx

        <?xml version='1.0' encoding='UTF-8'?>

        <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd

      ='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/

      envelope/' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' soap:encodi

      ngStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:ns5='http://www.themin

      delectric.com/package/examples.checkfree2/' xmlns:ns6='http://www.themindelectri

      c.com/collections/'>

          <soap:Body>

            <n:echo xmlns:n='http://tempuri.org/'>

              <foo href='#id0'/>

            </n:echo>

            <id0 id='id0' soapenc:root='0' xsi:type='ns5:Foo'>

              <vector1 href='#id1'/>

              <vector2 href='#id3'/>

            </id0>

            <id1 id='id1' soapenc:root='0' xsi:type='ns6:Vector'>

              <objects href='#id2'/>

            </id1>

            <id2 id='id2' soapenc:root='0' xsi:type='soapenc:Array' soapenc:arrayType='xsd:anyType[1]'>

              <i xsi:type='xsd:string'>cat</i>

            </id2>

            <id3 id='id3' soapenc:root='0' xsi:type='ns6:Vector'>

              <objects href='#id4'/>

            </id3>

            <id4 id='id4' soapenc:root='0' xsi:type='soapenc:Array' soapenc:arrayType='xsd:anyType[1]'>

              <i xsi:type='xsd:string'>dog</i>

            </id4>

          </soap:Body>

        </soap:Envelope>

       

      LOG.SOAP: response from http://192.168.1.107/WebService7/Service1.asmx

        <?xml version="1.0" encoding="utf-8"?>

        <soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:so

      apenc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://tempuri.org/

      ' xmlns:types='http://tempuri.org/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-

      instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>

          <soap:Body soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>

            <types:echoResponse>

              <echoResult href='#id1'/>

            </types:echoResponse>

            <q1:Foo id='id1' xsi:type='q1:Foo' xmlns:q1='http://www.themindelectric.com/package/examples.checkfree2/'>

              <vector1 href='#id2'/>

              <vector2 href='#id3'/>

            </q1:Foo>

            <q2:Vector id='id2' xsi:type='q2:Vector' xmlns:q2='http://www.themindelectric.com/collections/'>

              <objects href='#id4'/>

            </q2:Vector>

            <q3:Vector id='id3' xsi:type='q3:Vector' xmlns:q3='http://www.themindelectric.com/collections/'>

              <objects href='#id5'/>

            </q3:Vector>

            <soapenc:Array id='id4' soapenc:arrayType='xsd:anyType[1]'>

              <Item xsi:type='xsd:string'>cat</Item>

            </soapenc:Array>

            <soapenc:Array id='id5' soapenc:arrayType='xsd:anyType[1]'>

              <Item xsi:type='xsd:string'>dog</Item>

            </soapenc:Array>

          </soap:Body>

        </soap:Envelope>

       

      vector1 = [cat]

      vector2 = [dog]

       

      Now here’s the one which blows up. The difference is that the first vector is empty.

       

      LOG.SOAP: request to http://192.168.1.107/WebService7/Service1.asmx

        <?xml version='1.0' encoding='UTF-8'?>

        <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd

      ='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/

      envelope/' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' soap:encodi

      ngStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:ns5='http://www.themin

      delectric.com/package/examples.checkfree2/' xmlns:ns6='http://www.themindelectri

      c.com/collections/'>

          <soap:Body>

            <n:echo xmlns:n='http://tempuri.org/'>

              <foo href='#id0'/>

            </n:echo>

            <id0 id='id0' soapenc:root='0' xsi:type='ns5:Foo'>

              <vector1 href='#id1'/>

              <vector2 href='#id3'/>

            </id0>

            <id1 id='id1' soapenc:root='0' xsi:type='ns6:Vector'>

              <objects href='#id2'/>

            </id1>

            <id2 id='id2' soapenc:root='0' xsi:type='soapenc:Array' soapenc:arrayType='xsd:anyType[0]'/> // EMPTY ARRAY

            <id3 id='id3' soapenc:root='0' xsi:type='ns6:Vector'>

              <objects href='#id4'/>

            </id3>

            <id4 id='id4' soapenc:root='0' xsi:type='soapenc:Array' soapenc:arrayType='xsd:anyType[1]'>

              <i xsi:type='xsd:string'>dog</i>

            </id4>

          </soap:Body>

        </soap:Envelope>

       

      LOG.SOAP: response from http://192.168.1.107/WebService7/Service1.asmx

        <?xml version="1.0" encoding="utf-8"?>

        <soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:so

      apenc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://tempuri.org/

      ' xmlns:types='http://tempuri.org/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-

      instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>

          <soap:Body soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>

            <types:echoResponse>

              <echoResult href='#id1'/>

            </types:echoResponse>

            <q1:Foo id='id1' xsi:type='q1:Foo' xmlns:q1='http://www.themindelectric.com/package/examples.checkfree2/'>

              <vector1 href='#id2'/>

              <vector2 href='#id3'/>

            </q1:Foo>

            <q2:Vector id='id2' xsi:type='q2:Vector' xmlns:q2='http://www.themindelectric.com/collections/'>

              <objects href='#id4'/>

            </q2:Vector>

            <q3:Vector id='id3' xsi:type='q3:Vector' xmlns:q3='http://www.themindelectric.com/collections/'>

              <objects href='#id5'/>

            </q3:Vector>

            <soapenc:Array id='id4' soapenc:arrayType='xsd:anyType[2]'>

              <Item href='#id3'/>

              <Item href='#id5'/>

            </soapenc:Array>

            <soapenc:Array id='id5' soapenc:arrayType='xsd:anyType[1]'>

              <Item xsi:type='xsd:string'>dog</Item>

            </soapenc:Array>

          </soap:Body>

        </soap:Envelope>

       

      vector1 = [[dog], [Ljava.lang.Object;@38e059]

      vector2 = [dog]

       

      This is driving me crazy! Can anyone see something I’m doing wrong? Or is this an issue with .NET?

      I’ve tried lots of things, like removing the soapenc:root attribute, removing the xsi:type=soapenc:Array, but nothing seems to work.

       

      The funny part is that .NET <-> .NET works fine, but I noticed that .NET always seems to move the empty arrays to the end.

       

      Cheers,

      Graham

       

       

       

      -----------------------------------------------------------------
      This group is a forum for builders of SOAP implementations to discuss implementation and interoperability issues.  Please stay on-topic.

      To unsubscribe from this group, send an email to:
      soapbuilders-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

       

      -----------------------------------------------------------------
      This group is a forum for builders of SOAP implementations to discuss implementation and interoperability issues.  Please stay on-topic.

      To unsubscribe from this group, send an email to:
      soapbuilders-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

       

      -----------------------------------------------------------------
      This group is a forum for builders of SOAP implementations to discuss implementation and interoperability issues.  Please stay on-topic.

      To unsubscribe from this group, send an email to:
      soapbuilders-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



      -----------------------------------------------------------------
      This group is a forum for builders of SOAP implementations to discuss implementation and interoperability issues.  Please stay on-topic.

      To unsubscribe from this group, send an email to:
      soapbuilders-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



      -----------------------------------------------------------------
      This group is a forum for builders of SOAP implementations to discuss implementation and interoperability issues.  Please stay on-topic.

      To unsubscribe from this group, send an email to:
      soapbuilders-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
    Your message has been successfully submitted and would be delivered to recipients shortly.