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

Re: [soaplite] How is SOAP::Lite going to handle this complex message?

Expand Messages
  • Adhamh Findlay
    Here is what I came up with. It doesn t match the SOAP being generated by Java, but it does work... my $params = SOAP::Data #DialogCompany is the type of
    Message 1 of 6 , Nov 19, 2003
    • 0 Attachment
      Here is what I came up with. It doesn't match the SOAP being generated by
      Java, but it does work...

      my $params =
      SOAP::Data
      #DialogCompany is the type of object I'm passing
      ->type('ns1:DialogCompany')
      ->name('in0' =>
      \SOAP::Data->value(
      SOAP::Data->name('businessName' => $businessName)->type('xsd:string'),
      SOAP::Data->name('zipCode' => $zipCode)->type('xsd:string'),
      SOAP::Data->name('agmtNumber' => $agmtNumber)->type('xsd:string'),
      SOAP::Data->name('countryName' => $countryName)->type('xsd:string'),
      SOAP::Data->name('startDate' => $startDate)->type('xsd:string'),
      SOAP::Data->name('businessAddress1' =>
      $businessAddress1)->type('xsd:string'),
      SOAP::Data->name('businessAddress2' =>
      $businessAddress2)->type('xsd:string'),
      SOAP::Data->name('addressState' => $addressState)->type('xsd:string'),
      SOAP::Data->name('cityName' => $cityName)->type('xsd:string'),
      SOAP::Data->name('partNumber' => $partNumber)->type('xsd:string')
      ));



      On 11/18/03 7:41 PM, "Adhamh Findlay" <afindlay@...> wrote:

      > Hi,
      >
      > I've used SOAP::Lite before for some simple types, now I'm investigating if
      > SOAP::Lite can be used for a complex type... I'm especially worried about
      > multiRefs...
      >
      > In case it matters the SOAP server is based on Axis. I currently have Java
      > clients interacting with the provider...
      >
      > Here is an example of the message that I need to send to the service: (This
      > was grabbed with Axis tcpmon from a client)
      >
      > <?xml version="1.0" encoding="UTF-8"?>
      > <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      > <soapenv:Body>
      > <ns1:createCompany
      > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:ns1="com.apple.aces.DialogSOAP">
      > <in0 href="#id0"/>
      > </ns1:createCompany>
      > <multiRef id="id0" soapenc:root="0"
      > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > xsi:type="ns2:DialogCompany"
      > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:ns2="urn:DialogSOAP">
      > <zipCode xsi:type="xsd:string">78704</zipCode>
      > <startDate xsi:type="xsd:string">2003-08-04 00:00:00.0</startDate>
      > <agmtNumber xsi:type="xsd:string">107280015071064</agmtNumber>
      > <countryName xsi:type="xsd:string">United States</countryName>
      > <businessName xsi:type="xsd:string">YA Testing Company VI</businessName>
      > <businessAddress2 xsi:type="xsd:string" xsi:nil="true"/>
      > <addressState xsi:type="xsd:string">Texas</addressState>
      > <businessAddress1 xsi:type="xsd:string">703 W Annie</businessAddress1>
      > <cityName xsi:type="xsd:string">Austin</cityName>
      > <partNumber xsi:type="xsd:string">D2542Z/A</partNumber>
      > </multiRef>
      > </soapenv:Body>
      > </soapenv:Envelope>
      >
      > Can SOAP::Lite generate this? Is there an example online of something
      > similar?
      >
      > Thanks,
      >
      > Adhamh
      >
      >
      > Yahoo! Groups Sponsor
      >
      > ADVERTISEMENT
      > <http://rd.yahoo.com/SIG=12ct2ku7g/M=267637.4116730.5333196.1261774/D=egroupwe
      > b/S=1705701014:HM/EXP=1069292483/A=1853619/R=0/*http://www.netflix.com/Default
      > ?mqso=60178356&partid=4116730>
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
      > <http://docs.yahoo.com/info/terms/> .
    • Maurice McCabe
      Does anyone have a complete sample of passing a 1D or 2D string array between a .NET client and a SOAPLite server? This would really make my life much simpler
      Message 2 of 6 , Nov 19, 2003
      • 0 Attachment
         
        Does anyone have a complete sample of passing a 1D or 2D string array between a .NET client and a SOAPLite server? This would really make my life much simpler right now.
         
        Thanks,
         
        Maurice
         
      • Maurice McCabe
        I finally figured it out. I am now able to send an array of complex type back to a .NET client from a SOAPLite server. The answer was firmly buried, like a
        Message 3 of 6 , Nov 20, 2003
        • 0 Attachment
          I finally figured it out. I am now able to send an array of complex type back to a .NET client from a SOAPLite server. The answer was firmly buried, like a puzzle, in the list. Thanks to those who have contributed to the list.
           
          Had to 'Literalize' the SOAP message being returned from the SOAPLite server using 'LiteralSerializer' (contributed on list), which inherits from the xmlize() and envelope() methods to filters out everything that breaks a .NET client (including fixing the namespace problem). Great job! This was a life saver.
           
          Then it was simply a matter of building the actual message and returning it. The approach I took (there may be better ways), was to explicitly build the array of complex type from a regular array (or hash) using SOAP::Data and return that.
           
          Works like a champ for me. I haven't completed all testing yet, but the new serializer may be breaking the original perl client I was using. May need to figure how to switch the serializer in and out based on the SOAP toolset being used in the client side (which can be found in the envelope header). But I am done for now.
           
          I now have a WSDL available for connecting to my SOAP server from .NET that returns a complex array/hash. Phew!
           
          I guess in this case the 'truth is out there'. You just have to 'feel the list' out.
           
          Anyone interested in seeing a working example? I can put one together for the list.
           
          SOAPLite is an amazing piece of work and I look forward to seeing this interoperate more smoothly for arrays of complex types with .NET and other toolkits.
           
          Maurice
          -----Original Message-----
          From: Maurice McCabe [mailto:mmccabe@...]
          Sent: Wednesday, November 19, 2003 7:00 PM
          To: soaplist
          Subject: [soaplite] Sample Code for .NET Client/SOAPLite Server passing arrays?

           
          Does anyone have a complete sample of passing a 1D or 2D string array between a .NET client and a SOAPLite server? This would really make my life much simpler right now.
           
          Thanks,
           
          Maurice
           


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



          Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
        • jpeyser
          Yes, a working example would be enlightening. Or else, a list of all the messages that contained the pieces of the puzzle :). Thanks Jonathan ... type ...
          Message 4 of 6 , Nov 20, 2003
          • 0 Attachment
            Yes, a working example would be enlightening. Or else,
            a list of all the messages that contained the pieces of the
            puzzle :).

            Thanks
            Jonathan

            --- In soaplite@yahoogroups.com, "Maurice McCabe" <mmccabe@o...>
            wrote:
            > I finally figured it out. I am now able to send an array of complex
            type
            > back to a .NET client from a SOAPLite server. The answer was firmly
            buried,
            > like a puzzle, in the list. Thanks to those who have contributed to
            the
            > list.
            >
            > Had to 'Literalize' the SOAP message being returned from the
            SOAPLite server
            > using 'LiteralSerializer' (contributed on list), which inherits
            from the
            > xmlize() and envelope() methods to filters out everything that
            breaks a .NET
            > client (including fixing the namespace problem). Great job! This
            was a life
            > saver.
            >
            > Then it was simply a matter of building the actual message and
            returning it.
            > The approach I took (there may be better ways), was to explicitly
            build the
            > array of complex type from a regular array (or hash) using
            SOAP::Data and
            > return that.
            >
            > Works like a champ for me. I haven't completed all testing yet, but
            the new
            > serializer may be breaking the original perl client I was using.
            May need to
            > figure how to switch the serializer in and out based on the SOAP
            toolset
            > being used in the client side (which can be found in the envelope
            header).
            > But I am done for now.
            >
            > I now have a WSDL available for connecting to my SOAP server
            from .NET that
            > returns a complex array/hash. Phew!
            >
            > I guess in this case the 'truth is out there'. You just have
            to 'feel the
            > list' out.
            >
            > Anyone interested in seeing a working example? I can put one
            together for
            > the list.
            >
            > SOAPLite is an amazing piece of work and I look forward to seeing
            this
            > interoperate more smoothly for arrays of complex types with .NET
            and other
            > toolkits.
            >
            > Maurice
            > -----Original Message-----
            > From: Maurice McCabe [mailto:mmccabe@o...]
            > Sent: Wednesday, November 19, 2003 7:00 PM
            > To: soaplist
            > Subject: [soaplite] Sample Code for .NET Client/SOAPLite Server
            passing
            > arrays?
            >
            >
            >
            > Does anyone have a complete sample of passing a 1D or 2D string
            array
            > between a .NET client and a SOAPLite server? This would really make
            my life
            > much simpler right now.
            >
            > Thanks,
            >
            > Maurice
            >
            >
            > Yahoo! Groups Sponsor
            > ADVERTISEMENT
            >
            >
            >
            >
            > To unsubscribe from this group, send an email to:
            > soaplite-unsubscribe@yahoogroups.com
            >
            >
            >
            > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
            Service.
          • Alasdair Allan
            ... Yep, a working example would be good. If you write a good explanation of whats going on here up maybe Bryne can drop it one the new SOAP::Lite website? Is
            Message 5 of 6 , Nov 21, 2003
            • 0 Attachment
              > Anyone interested in seeing a working example? I can put one together for
              > the list.

              Yep, a working example would be good. If you write a good explanation of
              whats going on here up maybe Bryne can drop it one the new SOAP::Lite
              website? Is there a HOWTO section? There probably should be... ;)

              Cheers,
              Al.
              --
              Dr. A. Allan, School of Physics, University of Exeter
            Your message has been successfully submitted and would be delivered to recipients shortly.