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

SOAP::Lite interoperability with .NET using hrefs

Expand Messages
  • Andy Kelk
    Hi, I have searched the list and can t find an exact answer to my question. I have completed a SOAP::Lite server that works fine when I feed it from a
    Message 1 of 9 , Feb 5, 2003
    • 0 Attachment
      Hi,

      I have searched the list and can't find an exact answer to my question.

      I have completed a SOAP::Lite server that works fine when I feed it from
      a SOAP::Lite client and from a hand-written XML file. I've now written a
      WSDL file and have now created a client using vb.NET

      It all runs fine in terms of not throwing any exceptions. But it doesn't
      recognise the data. The issue seems to be with references to arrays. The
      XML which SOAP::Lite (as a client) produces is something like:


      <SOAP-ENV:Envelope
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema">
      <SOAP-ENV:Body>
      <namesp1:VendaCreateProduct xmlns:namesp1="urn:VendaProducts"
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <skuElements
      xmlns:namesp1="http://schemas.xmlsoap.org/soap/encoding/"
      xsi:type="namesp1:skuArray" namesp1:arrayType="namesp1:skuElement[1]">
      <skuElement xsi:type="namesp1:skuElement">
      .........
      </skuElement>
      </skuElements>
      </namesp1:VendaCreateProduct>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>


      This works fine.

      The XML created by .Net is:


      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:tns="urn:VendaProducts"
      xmlns:types="urn:VendaProducts/encodedTypes"
      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/">
      <tns:VendaCreateProduct>
      <skuElements href="#id1" />
      </tns:VendaCreateProduct>
      <soapenc:Array id="id1" soapenc:arrayType="tns:skuElement[1]">
      <Item href="#id2" />
      </soapenc:Array>
      <tns:skuElement id="id2" xsi:type="tns:skuElement">
      .........
      </tns:skuElement>

      When running it this way, my code does not pick up any contents of the
      array skuElements.
      Is this a problem with how my WSDL file is written? Does .Net always do
      this with arrays? Can SOAP::Lite understand these?

      Any help would be much appreciated.

      Thanks

      Andy


      --
      Andy Kelk
      Head of Integration, Venda
      andy@...
    • Andy Kelk
      As a follow up to my own message, I can get the data to be recognised if I get VB.net to use literal style with wrapped ParameterStyle.
      Message 2 of 9 , Feb 5, 2003
      • 0 Attachment
        As a follow up to my own message, I can get the data to be recognised if
        I get VB.net to use literal style with "wrapped" ParameterStyle.

        <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <soap:Body>
        <VendaCreateProduct xmlns="urn:VendaProducts">
        <skuElements>
        <skuElement>
        ....
        </skuElement>
        </skuElements>
        </VendaCreateProduct xmlns="urn:VendaProducts">
        </soap:Body>
        </soap:Envelope>

        This is not what I want, however, as the datatypes are lost and I have
        no arrays defined.

        It seems that the initial XML that .Net produces is valid but that the
        hrefs are confusing SOAP::Lite. Is there any way I can get around this?

        Thanks

        Andy


        --
        Andy Kelk
        Head of Integration, Venda
        andy@...
      • Andy Kelk
        Hi, Does anyone have any ideas on this at all? I ve pretty much hit a wall and am about to give up with it. I think I might have to investigate other SOAP
        Message 3 of 9 , Feb 10, 2003
        • 0 Attachment
          Hi,

          Does anyone have any ideas on this at all?

          I've pretty much hit a wall and am about to give up with it. I think I
          might have to investigate other SOAP implementations and see if I can
          get them to work with .Net




          --
          Andy Kelk
          Head of Integration, Venda
          andy@...

          > -----Original Message-----
          > From: Andy Kelk
          > Sent: 05 February 2003 16:27
          > To: soaplite@yahoogroups.com
          > Subject: RE: [soaplite] SOAP::Lite interoperability with .NET
          > using hrefs
          >
          >
          > As a follow up to my own message, I can get the data to be
          > recognised if I get VB.net to use literal style with
          > "wrapped" ParameterStyle.
          >
          > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
          > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
          > <soap:Body>
          > <VendaCreateProduct xmlns="urn:VendaProducts">
          > <skuElements>
          > <skuElement>
          > ....
          > </skuElement>
          > </skuElements>
          > </VendaCreateProduct xmlns="urn:VendaProducts">
          > </soap:Body>
          > </soap:Envelope>
          >
          > This is not what I want, however, as the datatypes are lost
          > and I have no arrays defined.
          >
          > It seems that the initial XML that .Net produces is valid but
          > that the hrefs are confusing SOAP::Lite. Is there any way I
          > can get around this?
          >
          > Thanks
          >
          > Andy
          >
          >
          > --
          > Andy Kelk
          > Head of Integration, Venda
          > andy@...
          >
          > ------------------------ Yahoo! Groups Sponsor
          > ---------------------~--> Get 128 Bit SSL Encryption!
          > http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA> /W6uqlB/TM
          >
          >
          > --------------------------------------------------------------
          > -------~->
          >
          > To unsubscribe from this group, send an email to:
          > soaplite-unsubscribe@yahoogroups.com
          >
          >
          >
          > Your use of Yahoo! Groups is subject to
          > http://docs.yahoo.com/info/terms/
          >
          >
          >
        • msanesh <anesh@hotmail.com>
          I don t have direct relation with what you are trying, but I had a similar problem. I had soaplite client talking to apache axis server. The apache axis server
          Message 4 of 9 , Feb 10, 2003
          • 0 Attachment
            I don't have direct relation with what you are trying, but I had a
            similar problem.

            I had soaplite client talking to apache axis server. The apache
            axis server was sending back multi refs (hrefs) which could not be
            understood by soaplite. However there was a way to turnoff mutirefs
            in apache axis and that fixed my problem. I do not know how to turn
            it off in .net.

            Anesh.

            --- In soaplite@yahoogroups.com, "Andy Kelk" <andy@v...> wrote:
            > Hi,
            >
            > Does anyone have any ideas on this at all?
            >
            > I've pretty much hit a wall and am about to give up with it. I
            think I
            > might have to investigate other SOAP implementations and see if I
            can
            > get them to work with .Net
            >
            >
            >
            >
            > --
            > Andy Kelk
            > Head of Integration, Venda
            > andy@v...
            >
            > > -----Original Message-----
            > > From: Andy Kelk
            > > Sent: 05 February 2003 16:27
            > > To: soaplite@yahoogroups.com
            > > Subject: RE: [soaplite] SOAP::Lite interoperability with .NET
            > > using hrefs
            > >
            > >
            > > As a follow up to my own message, I can get the data to be
            > > recognised if I get VB.net to use literal style with
            > > "wrapped" ParameterStyle.
            > >
            > > <soap:Envelope
            xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
            > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            > > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            > > <soap:Body>
            > > <VendaCreateProduct xmlns="urn:VendaProducts">
            > > <skuElements>
            > > <skuElement>
            > > ....
            > > </skuElement>
            > > </skuElements>
            > > </VendaCreateProduct xmlns="urn:VendaProducts">
            > > </soap:Body>
            > > </soap:Envelope>
            > >
            > > This is not what I want, however, as the datatypes are lost
            > > and I have no arrays defined.
            > >
            > > It seems that the initial XML that .Net produces is valid but
            > > that the hrefs are confusing SOAP::Lite. Is there any way I
            > > can get around this?
            > >
            > > Thanks
            > >
            > > Andy
            > >
            > >
            > > --
            > > Andy Kelk
            > > Head of Integration, Venda
            > > andy@v...
            > >
            > > ------------------------ Yahoo! Groups Sponsor
            > > ---------------------~--> Get 128 Bit SSL Encryption!
            > > http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA> /W6uqlB/TM
            > >
            > >
            > > --------------------------------------------------------------
            > > -------~->
            > >
            > > To unsubscribe from this group, send an email to:
            > > soaplite-unsubscribe@yahoogroups.com
            > >
            > >
            > >
            > > Your use of Yahoo! Groups is subject to
            > > http://docs.yahoo.com/info/terms/
            > >
            > >
            > >
          • Randy J. Ray
            (Apologies to Andy for the duplication, I forgot to Cc soaplite) ... Similar to the response I gave a few days ago concerning arrays, the style .Net is
            Message 5 of 9 , Feb 10, 2003
            • 0 Attachment
              (Apologies to Andy for the duplication, I forgot to Cc soaplite)

              > Does anyone have any ideas on this at all?
              >
              > I've pretty much hit a wall and am about to give up with it. I think I
              > might have to investigate other SOAP implementations and see if I can
              > get them to work with .Net

              Similar to the response I gave a few days ago concerning arrays, the style
              .Net is expecting to see structures in is not the same as what SOAP::Lite
              defaults to. In general, you would need to plug in a routine to serialize your
              data, and you would be best-served by having the hashref be blessed, so that
              you can associate this with a specific class, and not just all hashrefs.

              See the SOAP::Serializer heading in the SOAP::Lite manual page. I realize this
              isn't as helpful as you may have hoped, but I haven't done a lot of .Net
              stuff, either. Some, but not a lot.

              Randy
              --
              rjray@... http://www.rjray.org http://www.svsm.org

              Any spammers auto-extracting addresses from this message will definitely want
              to include uce@... and report@...
            • Duncan Cameron
              ... I had a play-around with the xml you showed in your original post and SOAP::Lite doesn t seem to have a problem with hrefs. ================== my $xml =
              Message 6 of 9 , Feb 10, 2003
              • 0 Attachment
                On 2003-02-10 Andy Kelk wrote:
                >Hi,
                >
                >Does anyone have any ideas on this at all?
                >
                >I've pretty much hit a wall and am about to give up with it. I think I
                >might have to investigate other SOAP implementations and see if I can
                >get them to work with .Net
                >
                >
                >
                >
                >--
                >Andy Kelk
                >Head of Integration, Venda
                >andy@...
                >
                >> -----Original Message-----
                >> From: Andy Kelk
                >> Sent: 05 February 2003 16:27
                >> To: soaplite@yahoogroups.com
                >> Subject: RE: [soaplite] SOAP::Lite interoperability with .NET
                >> using hrefs
                >>
                >>
                >> As a follow up to my own message, I can get the data to be
                >> recognised if I get VB.net to use literal style with
                >> "wrapped" ParameterStyle.
                >>
                >> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
                >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                >> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                >> <soap:Body>
                >> <VendaCreateProduct xmlns="urn:VendaProducts">
                >> <skuElements>
                >> <skuElement>
                >> ....
                >> </skuElement>
                >> </skuElements>
                >> </VendaCreateProduct xmlns="urn:VendaProducts">
                >> </soap:Body>
                >> </soap:Envelope>
                >>
                >> This is not what I want, however, as the datatypes are lost
                >> and I have no arrays defined.
                >>
                >> It seems that the initial XML that .Net produces is valid but
                >> that the hrefs are confusing SOAP::Lite. Is there any way I
                >> can get around this?
                >>
                >> Thanks
                >>
                >> Andy
                >>
                I had a play-around with the xml you showed in your original post and SOAP::Lite
                doesn't seem to have a problem with hrefs.
                ==================
                my $xml = <<'END';
                <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
                xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
                xmlns:tns="urn:VendaProducts"
                xmlns:types="urn:VendaProducts/encodedTypes"
                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/">
                <tns:VendaCreateProduct>
                <skuElements href="#id1" />
                </tns:VendaCreateProduct>
                <soapenc:Array id="id1" soapenc:arrayType="tns:skuElement[3]">
                <Item href="#id2" />
                <Item href="#id3" />
                <Item href="#id4" />
                </soapenc:Array>
                <tns:skuElement id="id2" xsi:type="tns:skuElement">24</tns:skuElement>
                <tns:skuElement id="id3" xsi:type="tns:skuElement">36</tns:skuElement>
                <tns:skuElement id="id4" xsi:type="tns:skuElement">48</tns:skuElement>
                </soap:Body>
                </soap:Envelope>
                END

                my $ds = SOAP::Deserializer->new;

                my $som = $ds->deserialize($xml);
                my $sku = $som->dataof("/Envelope/Body/VendaCreateProduct/skuElements");
                print "@{$sku->value}";
                ==================
                this prints:-

                24 36 48

                but I had to create a custom deserializer for the skuEelement. Did you create one
                when you sent your orignal post?

                Regards,
                Duncan Cameron
              • Martin Hajduch
                ... i have to confirm this i have axis server returning an array of complex types as hrefs and i haven t encountered any problems (with hrefs) on the client
                Message 7 of 9 , Feb 11, 2003
                • 0 Attachment
                  > I had a play-around with the xml you showed in your original post and SOAP::Lite
                  > doesn't seem to have a problem with hrefs.

                  i have to confirm this
                  i have axis server returning an array of complex types as hrefs and i haven't encountered
                  any problems (with hrefs) on the client side (SOAP::Lite)
                  i'm even not using my own deserializer

                  regards,
                  martin
                • Andy Kelk
                  Hi all, Thanks ever so much for all of the replies. It certainly gave me some new ammo to fire at the problem and I have now found a solution. I have
                  Message 8 of 9 , Feb 11, 2003
                  • 0 Attachment
                    Hi all,

                    Thanks ever so much for all of the replies. It certainly gave me some
                    new ammo to fire at the problem and I have now found a solution. I have
                    succesfully had a .Net client interact and perform its desired actions
                    with the SOAP::Lite server.

                    Thanks once again to all who helped out. :-)

                    Andy


                    --
                    Andy Kelk
                    Head of Integration, Venda
                    andy@...
                  • Kevin M. Goess
                    ... Passing a struct, one of whose members is an array, back and forth between SOAP::Lite and dotNet (a c# class in a dll). Something like this $d = { trkNum
                    Message 9 of 9 , Apr 10 8:46 AM
                    • 0 Attachment
                      On Thursday 10 April 2003 01:04 am, you wrote:
                      > > Andy, can you share the secret with us? I'm trying to get
                      > > through the same
                      > > problem and it would be so helpful to see some source code.
                      >
                      > I will certainly do my best. What exactly is the problem you're having?

                      Passing a struct, one of whose members is an array, back and forth between
                      SOAP::Lite and dotNet (a c# class in a dll). Something like this

                      $d = { trkNum => "123",
                      authCred => "fubar",
                      charges => [2,6,9]
                      };

                      Using Randy Ray's example
                      (http://www.perl.com/pub/a/2003/03/26/perlanddotnet.html) of
                      serialize_complex_type() I was able to send the struct back and forth using

                      Use=System.Web.Services.Description.SoapBindingUse.Literal

                      but that doesn't work for sending the array from dotNET to SOAP::Lite because
                      the type information isn't included. Changing from 'Literal' to 'Encoded'
                      gets the array from dotNet to SOAP::Lite just fine but then dotNet doesn't
                      find any data in the response. My current hyposthesis is that I'm missing
                      some type information in the SOAP::Lite response, but nothing I've tried has
                      yielded good results and since my understanding of SOAP is still a little
                      shallow I'm really just groping in the dark, so I thought if I had a working
                      example I could work backwards from it.

                      I really appreciate your offer of help. I can post as much source code or xml
                      as you care to look at, or look at yours--what do you think would be most
                      productive?


                      --
                      Kevin M. Goess
                      Software Engineer
                      Ensenda, Inc.
                      (415) 247-6779
                    Your message has been successfully submitted and would be delivered to recipients shortly.