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

Re: [soaplite] Re: Passing parameter from SOAP::Lite client to .Net server.

Expand Messages
  • Randy J. Ray
    ... You can specify an on_action handler when you create the client object. This is responsible for creating the string that will go into the SOAPAction
    Message 1 of 5 , May 1, 2003
    • 0 Attachment
      > If I use exactly the same namespace (with "/" at the end) I get
      > soap:Client, System.Web.Services.Protocols.SoapException: Server did
      > not recognize the value of HTTP Header SOAPAction:
      > http://sig.com//Test.
      > (note two slashes).
      >
      > If I remove the slash in the perl code (uri("http://xyz.com")), this
      > does get to the correct service, but since the namespace is
      > different, the parameters are not mapped.

      You can specify an on_action handler when you create the client object. This
      is responsible for creating the string that will go into the SOAPAction
      header. When the on_action() callback is invoked, it is passed two arguments,
      URI and METHOD, in that order.

      So, in your case, this would probably work:

      my $SOAP = SOAP::Lite->new
      [ ... ]
      ->on_action(sub { join('', @_) })
      [ ... ];

      In your code, you were inserting a / between URI and METHOD in the on_action
      block.

      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@...
    Your message has been successfully submitted and would be delivered to recipients shortly.