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

RE: [soaplite] Stuck on a script

Expand Messages
  • Tielman J de Villiers
    Thank You Jim, It put me on the right track -- it s an interop issue with MS .Net servers ... As per the archives of the list:
    Message 1 of 5 , Mar 14, 2002
      Thank You Jim,

      It put me on the right track -- it's an interop issue with MS .Net servers
      ...

      As per the archives of the list:
      http://groups.yahoo.com/group/soapbuilders/message/44

      And per the man pages for SOAP::Lite
      ...
      use fully qualified name for method parameters
      Use "SOAP::Data->name('{http://namespace.here/}Query' => 'biztalk')"
      instead of
      "SOAP::Data->name('Query' => 'biztalk')".
      ...

      So here's a script which works :

      ...
      my $s = SOAP::Lite
      -> uri('http://www.serviceobjects.com/')
      -> proxy('http://64.78.60.122/GeoPinPoint.asmx')
      -> on_action(sub{join '', @_ })
      ;
      my $r = $s->GetLocation(

      SOAP::Data->name('{http://www.serviceobjects.com/}strInput'=>'196.36.199.210
      ')
      );
      ...


      Tielman J de Villiers
      BondNet Pty Ltd

      -----Original Message-----
      From: Jim Dixon [mailto:jdd@...]
      Sent: Thursday, March 14, 2002 12:06 PM
      To: Tielman J de Villiers
      Cc: 'soaplite@yahoogroups.com'
      Subject: Re: [soaplite] Stuck on a script


      On Wed, 13 Mar 2002, Tielman J de Villiers wrote:

      > I am testing a service on SAL Central, but seem to be stuck:
      >
      > According to them this is a sample SOAP post:
      > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      > POST /GeoPinPoint.asmx HTTP/1.1
      > Host: 64.78.60.122
      > Content-Type: text/xml; charset=utf-8
      > Content-Length: length
      > SOAPAction: "http://www.serviceobjects.com/GetLocation"
      >
      > <?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/">
      > <soap:Body>
      > <GetLocation xmlns="http://www.serviceobjects.com/">
      > <strInput>string</strInput>
      > </GetLocation>
      > </soap:Body>
      > </soap:Envelope>
      > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      > This is my Post (from debug):
      > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      > POST http://64.78.60.122/GeoPinPoint.asmx
      > Accept: text/xml
      > Accept: multipart/*
      > Content-Length: 535
      > Content-Type: text/xml; charset=utf-8
      > SOAPAction: "http://www.serviceobjects.com/GetLocation"
      >
      > <?xml version="1.0" encoding="UTF-8"?>
      > <SOAP-ENV:Envelope
      > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > 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:GetLocation xmlns:namesp1="http://www.serviceobjects.com/">
      > <strInput xsi:type="xsd:string">196.4.16.2</strInput>
      > </namesp1:GetLocation>
      > </SOAP-ENV:Body>
      > </SOAP-ENV:Envelope>
      > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      > And this is their answer:
      > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      > HTTP/1.0 500 (Internal Server Error) Internal Server Error.
      > Cache-Control: private
      > Date: Wed, 13 Mar 2002 20:13:34 GMT
      > Via: 1.1 netcache7 (NetCache NetApp/5.2.1D8)
      > Server: Microsoft-IIS/5.0
      > Content-Length: 389
      > Content-Type: text/xml; charset=utf-8
      > Client-Date: Wed, 13 Mar 2002 20:13:37 GMT
      > Client-Peer: 64.78.60.122:80
      >
      > <?xml version="1.0" encoding="utf-8"?>
      > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      > <soap:Body>
      > <soap:Fault>
      > <faultcode>soap:Server</faultcode>
      > <faultstring>Server was unable to process request. --> Object
      > reference not set to an instance of an object.</faultstring> <detail
      > /> </soap:Fault>
      > </soap:Body>
      > </soap:Envelope>
      > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      >
      > Any ideas of where I should start looking??

      I used telnet to post a fixed-up version of the sample SOAP post to the
      server (fixed up by removing line breaks and replacing 'length' with its
      value). This worked. I then added the namesp1 machinery as in "my Post
      (from debug)". This caused the server to generate the same error that you
      report above.

      In other words, 'namesp1' causes the failure.

      --
      Jim Dixon jdd@... tel +44 117 982 0786 mobile +44 797 373 7881
      ---------- THAT'S A CHANGE OF ADDRESS: I'm no longer jdd@... --------
    • Paul Kulchenko
      Hi, Tielman! ... There is probably a small typo: uri should have a trailing slash. strInput element is also expected to be in uri() namespace. This code
      Message 2 of 5 , Mar 18, 2002
        Hi, Tielman!

        > my $s=SOAP::Lite
        > -> uri('http://www.serviceobjects.com')
        > -> proxy('http://64.78.60.122/GeoPinPoint.asmx')
        > -> on_action(sub{'"http://www.serviceobjects.com/GetLocation"'})
        > ;
        > my $r=$s->GetLocation(
        > SOAP::Data->name(strInput=>"196.4.16.2")
        > );
        > Any ideas of where I should start looking??
        There is probably a small typo: uri should have a trailing slash.
        strInput element is also expected to be in uri() namespace. This code
        generates correct XML and works for me:

        my $uri = 'http://www.serviceobjects.com/';
        my $s=SOAP::Lite
        -> uri($uri)
        -> proxy('http://64.78.60.122/GeoPinPoint.asmx')
        -> on_action(sub{'"http://www.serviceobjects.com/GetLocation"'})
        ;
        my $r=$s->GetLocation(
        SOAP::Data->name(strInput=>"196.4.16.2")->uri($uri)
        );
        print $r->result;

        INCOMPATIBILITY section in SOAP::Lite documentation may also be
        helpful.

        Best wishes, Paul.

        --- Tielman J de Villiers <tjdevil@...> wrote:
        > Hi,
        >
        > I am testing a service on SAL Central, but seem to be stuck:
        >
        > According to them this is a sample SOAP post:
        >
        +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        > POST /GeoPinPoint.asmx HTTP/1.1
        > Host: 64.78.60.122
        > Content-Type: text/xml; charset=utf-8
        > Content-Length: length
        > SOAPAction: "http://www.serviceobjects.com/GetLocation"
        >
        > <?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/">
        > <soap:Body>
        > <GetLocation xmlns="http://www.serviceobjects.com/">
        > <strInput>string</strInput>
        > </GetLocation>
        > </soap:Body>
        > </soap:Envelope>
        >
        +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        > This is my Post (from debug):
        >
        +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        > POST http://64.78.60.122/GeoPinPoint.asmx
        > Accept: text/xml
        > Accept: multipart/*
        > Content-Length: 535
        > Content-Type: text/xml; charset=utf-8
        > SOAPAction: "http://www.serviceobjects.com/GetLocation"
        >
        > <?xml version="1.0" encoding="UTF-8"?>
        > <SOAP-ENV:Envelope
        > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
        > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        > 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:GetLocation
        > xmlns:namesp1="http://www.serviceobjects.com/">
        > <strInput xsi:type="xsd:string">196.4.16.2</strInput>
        > </namesp1:GetLocation>
        > </SOAP-ENV:Body>
        > </SOAP-ENV:Envelope>
        >
        +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        > And this is their answer:
        >
        +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        > HTTP/1.0 500 (Internal Server Error) Internal Server Error.
        > Cache-Control: private
        > Date: Wed, 13 Mar 2002 20:13:34 GMT
        > Via: 1.1 netcache7 (NetCache NetApp/5.2.1D8)
        > Server: Microsoft-IIS/5.0
        > Content-Length: 389
        > Content-Type: text/xml; charset=utf-8
        > Client-Date: Wed, 13 Mar 2002 20:13:37 GMT
        > Client-Peer: 64.78.60.122:80
        >
        > <?xml version="1.0" encoding="utf-8"?>
        > <soap:Envelope
        > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
        > <soap:Body>
        > <soap:Fault>
        > <faultcode>soap:Server</faultcode>
        > <faultstring>Server was unable to process request. --> Object
        > reference
        > not set to an instance of an object.</faultstring>
        > <detail />
        > </soap:Fault>
        > </soap:Body>
        > </soap:Envelope>
        >
        +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        >
        > Any ideas of where I should start looking??
        >
        > I'm using SOAP::Lite on a RH linux 7.1 box from a mod_perl script
        > as such:
        >
        > ...
        > my $s=SOAP::Lite
        > -> uri('http://www.serviceobjects.com')
        > -> proxy('http://64.78.60.122/GeoPinPoint.asmx')
        > -> on_action(sub{'"http://www.serviceobjects.com/GetLocation"'})
        > ;
        > my $r=$s->GetLocation(
        > SOAP::Data->name(strInput=>"196.4.16.2")
        > );
        >
        > ...
        >
        > Thank you
        >
        > Tielman J de Villiers
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > 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/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Yahoo! Sports - live college hoops coverage
        http://sports.yahoo.com/
      • Paul Kulchenko
        Hi, Tielman! ... That s correct ... Right. SOAP::Data- name(strInput= 196.36.199.210)- uri( http://www.serviceobjects.com/ ) does the same, and uses
        Message 3 of 5 , Mar 18, 2002
          Hi, Tielman!

          --- Tielman J de Villiers <tjdevil@...> wrote:
          > It put me on the right track -- it's an interop issue with MS .Net
          > servers
          That's correct

          > So here's a script which works :
          > SOAP::Data->name(
          > '{http://www.serviceobjects.com/}strInput'=>'196.36.199.210
          > ')
          Right.

          SOAP::Data->name(strInput=>'196.36.199.210)->uri(
          'http://www.serviceobjects.com/')

          does the same, and uses different (preferable) syntax.

          Best wishes, Paul.


          __________________________________________________
          Do You Yahoo!?
          Yahoo! Sports - live college hoops coverage
          http://sports.yahoo.com/
        Your message has been successfully submitted and would be delivered to recipients shortly.