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

SOAP::Lite server, VB .NET client only returns the first return value

Expand Messages
  • ebincar
    Hi, i have a SOAP::Lite service (currently it does not do much since i m testing this). The only method that is implemented is called AuthenticationRequest .
    Message 1 of 1 , Apr 17, 2007

      i have a SOAP::Lite service (currently it does not do much since i'm
      testing this). The only method that is implemented is called
      "AuthenticationRequest". It takes two parameters, username and
      passwords and returns 4 parameters. (And it really does this, i have
      verified the response by using ethereal).

      The problem is with the Visual Basic .NET program that is supposed to
      use the SOAP::Lite service. All works fine, the VB program makes the
      request, sends the two parameters username and password which are
      received by the SOAP::Lite server, and the VB script receives the
      response. The first return value (statusmessage) gets returned OK, but
      none of the other return values get interpreted by .NET and are
      returned empty to my program.

      I would be most grateful if anyone have any experience in this field
      to share with me!

      See below for the wsdl, the SOAP::Lite program and the VB-stuff.


      The SOAP::Lite server:

      package PPic_MS_crap_net_interface;

      #use strict;
      use Encode;

      sub AuthenticationRequest {
      my( $self, $username, $password) = @_;

      print STDERR "AuthenticationRequest: username=".$username.",

      #Encode::from_to( $text, "iso-8859-1", "utf16");

      my $status="OKIDOKI";
      my $errormessage = "Nothing wrong";
      my $session_key = "abc123";
      my $session_lifetime = "1200";

      my $r_status = SOAP::Data->new( type => 'xsd:string',
      name => 'status', value => $status, 'uri' =>
      my $r_errormessage = SOAP::Data->new( type => 'xsd:string', name =>
      'errormessage', value => $errormessage, 'uri' =>
      my $r_session_key = SOAP::Data->new( type => 'xsd:string', name =>
      'session_key', value => $session_key, 'uri' =>
      my $r_session_lifetime = SOAP::Data->new( type => 'xsd:string', name
      => 'session_key', value => $session_key, 'uri' =>

      return( $r_status, $r_errormessage, $r_session_key,

      package main;

      use SOAP::Lite +debug => all;
      $SOAP::Constants::DO_NOT_USE_CHARSET = 1;

      use SOAP::Transport::HTTP;

      BEGIN {
      package SOAP::Serializer;
      sub gen_ns { '' }

      ->dispatch_to( 'PPic_MS_crap_net_interface')


      The WSDL:
      <?xml version="1.0" encoding="UTF-8"?>

      <definitions name="PPic_MS_crap_net_interface"

      <message name="AuthenticationRequest_msg">
      <part name="username" type="xsd:string"/>
      <part name="password" type="xsd:string"/>
      <message name="AuthenticationRequestResponse">
      <part name="statusmessage" type="xsd:string"/>
      <part name="errormessage" type="xsd:string"/>
      <part name="session_key" type="xsd:string"/>
      <part name="session_lifetime" type="xsd:string"/>

      <portType name="AuthenticationRequest_PortType">
      <operation name="AuthenticationRequest">
      <input message="tns:AuthenticationRequest_msg"/>
      <output message="tns:AuthenticationRequestResponse"/>

      <binding name="PPic_Binding" type="tns:AuthenticationRequest_PortType">
      <soap:binding style="rpc"

      <operation name="AuthenticationRequest">
      namespace="urn:PPic_MS_crap_net_interface" use="encoded"/>
      namespace="urn:PPic_MS_crap_net_interface" use="encoded"/>


      <service name="PPic_MS_crap_net_Service">
      <documentation>PPic MS Crap Net Interface</documentation>
      <port binding="tns:PPic_Binding" name="PPic_MS_crap_net_Port">


      The VB code:

      Dim Auth_Req As New xxx.PPic_MS_crap_net_Service
      Dim status As String
      Dim errormessage As String = ""
      Dim session_key As String = ""
      Dim session_lifetime As String = ""

      Dim cred As NetworkCredential = New NetworkCredential
      cred.UserName = "test"
      cred.Password = "test"
      Auth_Req.Credentials = cred
      status = Auth_Req.AuthenticationRequest("username",
      "password", errormessage, session_key, session_lifetime)

      MsgBox("Status: " & status & ", ErrorMessage: " & errormessage
      & ", SessionKey: " & session_key)
    Your message has been successfully submitted and would be delivered to recipients shortly.