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

Please help : Soaplite (on unix / perl ) talking to easysoap (MS / NT4 / MFC)

Expand Messages
  • Richard
    Help !! I have two clients - one running via soaplite / perl / unix, the other using the easysoap windows library and a modified interopclient.cpp. Using the
    Message 1 of 4 , Jun 22, 2001
    • 0 Attachment
      Help !!

      I have two clients - one running via soaplite / perl / unix, the
      other using the easysoap windows library and a modified
      interopclient.cpp. Using the MS soap trace utility, the *working*
      perl client performs the following request :

      <?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:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-
      ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema">
      <SOAP-ENV:Body>
      <namesp2:echoInteger xmlns:namesp2="http://10.160.87.182:8080/Demo">
      <c-gensym9 xsi:type="xsd:int">212</c-gensym9>
      </namesp2:echoInteger>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      Using easysoap, I've made modifications to the library to be
      as "compatible" with the first request as possible and it delivers
      the following data :

      <?xml version="1.0" encoding="UTF-8" ?>
      <SOAP-ENV:Envelope xmlns:SOAP-
      ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-
      ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-
      ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <SOAP-ENV:Body>
      <namesp2:echoInteger xmlns:namesp2="http://127.0.0.1:8080/Demo">
      <c-gensym9 xsi:type="xsd:int">464</c-gensym9>
      </namesp2:echoInteger>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      But, the second one fails whilst the first one works !! The error I
      get is as thus :

      <?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:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-
      ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema">
      <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
      <faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode>
      <faultstring xsi:type="xsd:string">SOAPAction shall
      match 'uri#method' if present</faultstring>
      <faultactor xsi:type="xsd:string">http://bath:40000/</faultactor>
      </SOAP-ENV:Fault>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      and for completeness, here's the (working) perl client / server
      code....

      Client (obvious [ $proxy,$uri, use SOAP:: ]bits missed out)

      my $s = SOAP::Lite-> uri($uri) ->proxy($proxy);

      print $s->echoInteger(212)->result,"\n";

      Server side

      my $daemon = SOAP::Transport::HTTP::Daemon (etc etc)

      $daemon->handle;

      sub echoInteger
      {
      my ($class, $i) = @_;
      print "I = $i\n"; # debug
      return $i;
      }


      Like I said perl <-> perl works fine and dandy, just like those nice
      people as soaplite said it would. The problems I'm seeing is just
      when I try to use a non-soaplite product with a soapserver. Please
      help / advise / offer sympathy etc !!

      Thanks in advance,

      Richard
    • Paul Kulchenko
      Hi, Richard! ... SOAP::Lite server will match SOAPAction header against values provided as URI and method name. SOAP::Lite client uses combination
      Message 2 of 4 , Jun 22, 2001
      • 0 Attachment
        Hi, Richard!

        > But, the second one fails whilst the first one works !! The error I
        > <faultstring xsi:type="xsd:string">SOAPAction shall
        > match 'uri#method' if present</faultstring>
        SOAP::Lite server will match SOAPAction header against values
        provided as URI and method name. SOAP::Lite client uses combination
        "URI#method". Looks like easySOAP uses something else. You configure
        your easySOAP client to provide required SOAPAction, or completely
        disable this check on server side with:

        my $daemon = SOAP::Transport::HTTP::Daemon
        ->on_action(sub{})
        .....

        That should help. Let me know if you have any other issues.

        Best wishes, Paul.

        --- Richard <richardagreen@...> wrote:
        > Help !!
        >
        > I have two clients - one running via soaplite / perl / unix, the
        > other using the easysoap windows library and a modified
        > interopclient.cpp. Using the MS soap trace utility, the *working*
        > perl client performs the following request :
        >
        > <?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:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-
        > ENV="http://schemas.xmlsoap.org/soap/envelope/"
        > xmlns:xsd="http://www.w3.org/1999/XMLSchema">
        > <SOAP-ENV:Body>
        > <namesp2:echoInteger
        > xmlns:namesp2="http://10.160.87.182:8080/Demo">
        > <c-gensym9 xsi:type="xsd:int">212</c-gensym9>
        > </namesp2:echoInteger>
        > </SOAP-ENV:Body>
        > </SOAP-ENV:Envelope>
        >
        > Using easysoap, I've made modifications to the library to be
        > as "compatible" with the first request as possible and it delivers
        > the following data :
        >
        > <?xml version="1.0" encoding="UTF-8" ?>
        > <SOAP-ENV:Envelope xmlns:SOAP-
        > ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-
        > ENC="http://schemas.xmlsoap.org/soap/encoding/"
        > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
        > xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-
        > ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        > <SOAP-ENV:Body>
        > <namesp2:echoInteger xmlns:namesp2="http://127.0.0.1:8080/Demo">
        > <c-gensym9 xsi:type="xsd:int">464</c-gensym9>
        > </namesp2:echoInteger>
        > </SOAP-ENV:Body>
        > </SOAP-ENV:Envelope>
        >
        > But, the second one fails whilst the first one works !! The error I
        >
        > get is as thus :
        >
        > <?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:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-
        > ENV="http://schemas.xmlsoap.org/soap/envelope/"
        > xmlns:xsd="http://www.w3.org/1999/XMLSchema">
        > <SOAP-ENV:Body>
        > <SOAP-ENV:Fault>
        > <faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode>
        > <faultstring xsi:type="xsd:string">SOAPAction shall
        > match 'uri#method' if present</faultstring>
        > <faultactor xsi:type="xsd:string">http://bath:40000/</faultactor>
        >
        > </SOAP-ENV:Fault>
        > </SOAP-ENV:Body>
        > </SOAP-ENV:Envelope>
        >
        > and for completeness, here's the (working) perl client / server
        > code....
        >
        > Client (obvious [ $proxy,$uri, use SOAP:: ]bits missed out)
        >
        > my $s = SOAP::Lite-> uri($uri) ->proxy($proxy);
        >
        > print $s->echoInteger(212)->result,"\n";
        >
        > Server side
        >
        > my $daemon = SOAP::Transport::HTTP::Daemon (etc etc)
        >
        > $daemon->handle;
        >
        > sub echoInteger
        > {
        > my ($class, $i) = @_;
        > print "I = $i\n"; # debug
        > return $i;
        > }
        >
        >
        > Like I said perl <-> perl works fine and dandy, just like those
        > nice
        > people as soaplite said it would. The problems I'm seeing is just
        > when I try to use a non-soaplite product with a soapserver. Please
        > help / advise / offer sympathy etc !!
        >
        > Thanks in advance,
        >
        > Richard
        >
        >
        > 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!?
        Get personalized email addresses from Yahoo! Mail
        http://personal.mail.yahoo.com/
      • Richard
        Can t believe I work on this for numerous hours, post it here and then figure out what it is... It s all to do with the const char *default_interop_soapaction
        Message 3 of 4 , Jun 22, 2001
        • 0 Attachment
          Can't believe I work on this for numerous hours, post it here and
          then figure out what it is... It's all to do with the

          const char *default_interop_soapaction = "";

          in the interopclient.cpp code - changing it to "" makes it work fine
          and dandy (or at least for my example anyway).
        • Richard
          Cheers for the super fast reponse (what kind of SLA are you on ?!!) - you re absolutely right. Got it nailed now. Rich.
          Message 4 of 4 , Jun 22, 2001
          • 0 Attachment
            Cheers for the super fast reponse (what kind of SLA are you on ?!!) -
            you're absolutely right. Got it nailed now.

            Rich.
          Your message has been successfully submitted and would be delivered to recipients shortly.