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

Soap Message (Still trying PLEASE HELP !!!)

Expand Messages
  • bright_g2001
    Hi all. Please excuess the silly questions, but I m having lots of problems binding to an apache soap service (uri:10021/soap_vas), and am kind of lost. I m
    Message 1 of 1 , Aug 8, 2004
    • 0 Attachment
      Hi all.

      Please excuess the silly questions, but I'm having lots of problems
      binding to an apache soap service (uri:10021/soap_vas), and am kind
      of lost. I'm using Web Services with Perl by O'Reilly publications
      as a reference, but I'm confused regarding a number of points. I
      think why I'm having so many problems is I need a very specific SOAP
      Envelope

      1. Serialization

      How can I create a customized envelope, submitted as a request. I
      need the following in my request

      <?xml version="1.0"?>
      <SOAP-ENV:Envelope xmlns:SOAP-
      ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/
      REL-5-MM7-1-2">
      <SOAP-ENV:Header>
      <TransactionID SOAP-
      ENV:mustUnderstand="1">TransID</TransactionID>
      </SOAP-ENV:Header>

      (not worried about body parts at the moment)

      To create such a request must I serialize the envelope. Specifically
      I don't want encodingScheme to be used at all. How can I drop this
      from the Envelope.

      2. The server responds with 500 Internal Server Error
      at /usr/local/lib/perl5/site_perl/5.6.1/SOAP/MIME.pm line 207.

      Content-Type: text/html; charset=iso-8859-1
      Client-Date: Sun, 08 Aug 2004 16:01:21 GMT
      Client-Response-Num: 1
      Client-Transfer-Encoding: chunked
      Title: 500 Internal Server Error

      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
      <HTML><HEAD>
      <TITLE>500 Internal Server Error</TITLE>
      </HEAD><BODY>
      <H1>Internal Server Error</H1>
      The server encountered an internal error or
      misconfiguration and was unable to complete
      your request.<P>
      Please contact the server administrator,
      mmscadm@localhost and inform them of the time the error occurred,
      and anything you might have done that may have
      caused the error.<P>
      More information about this error may be available
      in the server error log.<P>
      </BODY></HTML>

      SOAP::Deserializer::deserialize: ()
      SOAP::Parser::decode: ()

      My code. PLEASE help me out with formulating the request correctly.

      Best Regards,

      Graham.


      #!/opt/perl5/bin/perl
      #############################################
      #
      # V0.2
      # Soap01.pl
      ##############################################

      use SOAP::Lite +trace;
      use SOAP::MIME;
      use MIME::Entity;
      $SOAP::Constants::DO_NOT_USE_CHARSET = 1;
      $SOAP::Constants::DO_NOT_CHECK_CONTENT_TYPE = 1;

      #Soap variables
      $cid="Test";
      my $ent = MIME::Entity->build(Boundary => "soap-boarder", Type
      => "multipart/related", 'Content-Id'
      =>"<$cid>");


      #root namespace
      $key =<<NameSpace;
      http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-
      MM7-1-2
      NameSpace


      my $service = SOAP::Lite->new();
      $service->serializer->namespaces->{"$key"} = 'xmls';
      $serializer->{'_attr'}{'{http://schemas.xmlsoap.org/soap/encoding/}
      encodingStyle\ '} = undef;


      ###

      $service
      -> uri
      ('http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-
      5-MM7-1-2')
      -> on_action(sub { return "\"\""; })
      -> soapversion(1.1)
      #-> parts($ent)
      -> proxy('http://10.236.137.7:10021/vas_soap');

      $serializer->{'_attr'}{'{http://schemas.xmlsoap.org/soap/envelope/}
      encodingStyle\ '} = undef;


      my $method = SOAP::Data
      -> name('SubmitReq')
      -> attr({xmlns
      => 'http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL
      -5-MM7-1-2'});



      my $tx_header = SOAP::Header
      ->name("TransactionID" => 'TransID')->mustUnderstand
      (1);


      my @params = ( $tx_header,sion
      Press RETURN or SOAP::Data->name(MM7Version => '4.3.0'),
      SOAP::Data->name(SenderIdentification => ''),
      SOAP::Data->name( VASPID => ''),
      SOAP::Data->name( SenderAddress => ''),
      SOAP::Data->name( Recipients => ''),
      SOAP::Data->name( To => ''),
      SOAP::Data->name( ServiceCode => ''),
      SOAP::Data->name( LinkedID => ''),
      SOAP::Data->name( MessageClass => 'Personal'),
      SOAP::Data->name( DeliveryReport => 'False'),
      SOAP::Data->name( ReadReply => 'False'),
      SOAP::Data->name( Priority => 'Normal'),
      SOAP::Data->name( Subject => 'TestSoap'),
      SOAP::Data->name( Content_href => 'MIME'));
      # "Line", 600, );

      my $result = $service->call($method => @params);

      if ($result->fault)
      {
      print $result->faultstring;



      }

      else

      {
      print $result->valueof('//SubmitReq/MM7Version');

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