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

Axis client and error messages

Expand Messages
  • epfreed1
    I have been doing some testing of Soap::lite server, and everything worked fine with a SOAP::Lite client, but I have been having problems with a Java Axis
    Message 1 of 2 , Feb 5 7:48 AM
    • 0 Attachment
      I have been doing some testing of Soap::lite server, and everything
      worked fine with a SOAP::Lite client, but I have been having problems
      with a Java Axis client. The Axis clinet gives the error:

      org.xml.sax.SAXParseException: XML declaration may only begin entities

      So I tried to look at the session using TCPMon which comes with Axis(
      to monitor all the stuff sent back and forth). In the responce from
      the SOAP::Lite server I see two sections:

      1) the SOAP envelope, which looks right to me (as far as I know) and
      has the expected responce.

      2) a second bunch of XML that has an error web page in it. It starts
      off with

      !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
      <head>
      <title>Server error!</title>

      I used TCPMon with the SOAP::Lite clinet, adn saw something similar:
      but the second HTML part error message was different. However, I don't
      see any errors in the httpd logs, nor do I have any errors with the
      SOAP::Lite client. Is there an error I am missing somewhere, or what,
      I am a bit flumuxed.

      Thanks


      I am a bit confused.
    • Eric Freed
      I thought I did a followup post on the group, but I must have forgotten. My problem was really simple to solve, maybe it will help you: I am running mod_perl
      Message 2 of 2 , Feb 10 6:12 AM
      • 0 Attachment
        I thought I did a followup post on the group, but I must have forgotten.

        My problem was really simple to solve, maybe it will help you:

        I am running mod_perl 2.0, and SOAP::Lite is not compatible with
        mod_perl 2.0. There are a few changes you have to make in
        SOAP::Lite::Transport::HTTP for it to work. I had made the changes when
        I ran .55, but forgot about them with .60. When I fixed the problems,
        the error went away.

        Here are the changes reprinted from the post by "Michael Stepanov"
        <nite_man_2001@y...>, Message 3085 on this group:

        -- /usr/lib/perl5/site_perl/5.8.0/SOAP/Transport/HTTP.pm
        2002-04-16 07:43:02.000000000 +0300
        +++ HTTP.pm 2003-10-24 14:00:22.000000000 +0300
        @@ -409,7 +409,7 @@

        sub DESTROY { SOAP::Trace::objects('()') }

        -sub new { require Apache; require Apache::Constants;
        +sub new { require Apache2; require Apache::Const;
        my $self = shift;

        unless (ref $self) {
        @@ -421,13 +421,14 @@
        }

        sub handler {
        + use Apache::Const qw(OK);
        my $self = shift->new;
        my $r = shift || Apache->request;
        $self->request(HTTP::Request->new(
        $r->method => $r->uri,
        HTTP::Headers->new($r->headers_in),
        - do { my $buf; $r->read($buf, $r->header_in('Content-length'));
        $buf; }
        + do { my $buf; $r->read($buf,
        $r->headers_in->get('Content-length')); $buf; }
        ));
        $self->SUPER::handle;

        @@ -438,10 +439,10 @@
        # will emulate normal response, but with custom status code
        # which could also be 500.
        $r->status($self->response->code);
        - $self->response->headers->scan(sub { $r->header_out(@_) });
        + $self->response->headers->scan(sub { $r->headers_out->set(@_) });
        $r->send_http_header(join '; ', $self->response->content_type);
        $r->print($self->response->content);
        - &Apache::Constants::OK;
        + OK;
        }


        It probably would be better to override the method rather than change
        the SOAP/Transport/HTTP.pm module, but my first few half hearted
        attempts did not work. I think it had something to do with the fact that
        mod_perl 2 calls handlers differently than mod_perl 1:

        mod_perl 1:
        sub handler ($$) ...}
        and mod_perl 2
        sub handler : method {...}

        oh well. Good luck




        On Mon, 2004-02-09 at 21:17, matthew_bennetts wrote:
        > I too am "flumuxed". I have a similar situation but with a Delphi
        > client - it reports an error "Cannot have DOCTYPE declaration outside
        > of a prolog" when dealing with a SOAP::Lite server running under
        > mod_soap on an Apache server (Windows).
        > I downloaded a 30 day trial of XML Spy (the enterprise edition) to
        > debug the soap messages and found a similar problem as described by
        > "epfreed1".
        >
        > does anyone have an answer...?
        >
        > Cheers.
        >
        >
        > --- In soaplite@yahoogroups.com, "epfreed1" <efreed@m...> wrote:
        > > I have been doing some testing of Soap::lite server, and everything
        > > worked fine with a SOAP::Lite client, but I have been having problems
        > > with a Java Axis client. The Axis clinet gives the error:
        > >
        > > org.xml.sax.SAXParseException: XML declaration may only begin entities
        > >
        > > So I tried to look at the session using TCPMon which comes with Axis(
        > > to monitor all the stuff sent back and forth). In the responce from
        > > the SOAP::Lite server I see two sections:
        > >
        > > 1) the SOAP envelope, which looks right to me (as far as I know) and
        > > has the expected responce.
        > >
        > > 2) a second bunch of XML that has an error web page in it. It starts
        > > off with
        > >
        > > !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
        > > "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
        > > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
        > > <head>
        > > <title>Server error!</title>
        > >
        > > I used TCPMon with the SOAP::Lite clinet, adn saw something similar:
        > > but the second HTML part error message was different. However, I don't
        > > see any errors in the httpd logs, nor do I have any errors with the
        > > SOAP::Lite client. Is there an error I am missing somewhere, or what,
        > > I am a bit flumuxed.
        > >
        > > Thanks
        > >
        > >
        > > I am a bit confused.
        --
        Eric Freed <efreed@...>
      Your message has been successfully submitted and would be delivered to recipients shortly.