axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yampolsky, Robert" <>
Subject Newbie questions and some weird behavior
Date Wed, 04 May 2005 16:56:16 GMT
I'm an axis newbie, and am having trouble getting my first service to
work.  I am able to build and deploy a simple MD5Service I found on the
web, so I think my axis and apache installations are working ok.  It's
axiscpp 1.5 and apache 2.0.46 (RHEL 3.0).  I installed axiscpp from
pre-built binaries in the default /usr/local/axiscpp_deploy directory.

I've included the server.wsdd entry and wsdl file below in case I'm just
doing this all wrong.  Thanks in advance for putting up with my
(probably clueless) questions.  I've been trying to educate myself on
this via Google, etc, and have found some good docs, but still can't get
it to work.

Anyway, at one point today (after restarting Apache, this went away), I
would run my client repeatedly and get one of the following exceptions
(wierdly, the exception would change without any changes to the code):

Exception : Soap method is not allowed to invoke
	(I read in this list that this is caused by a missing
SoapAction, but it's there in my wsdl and in the generated code)
Exception : Requested service is not registerd at the server
	(I originally had CPP:RPC, which I figured was causing this -
since my binding style is document, but I still got it sometimes)
Exception : Soap content is not valid
	(your guess is as good as mine - I don't know yet if my soap
content's any good)

After restarting apache, the service seems to run.  At least the client
doesn't log any exceptions, but I get an empty response from the service
(null pointers for all the return values).  Not knowing how to debug the
service, I tried having it open a file and log info there.  But when I
add code to my server to do that, I get the following exception on
running my client:

Exception : HTTPTransportException:Input streaming error while getting
data Timed out waiting for HTTP header message (1).

This exception occurs immediately, so I don't know how it could be a
timeout condition.

For yucks, I tried replacing the fopen and fprintf's with a simple
sprintf to a character buffer and got the same exception.  When I
comment out all the logging code the service seems to 'work' again (with
null return values).  At least that gives some kind of indication that
my server is indeed running.

So, my main question is, how are you supposed to debug axiscpp services?
Is the simple_axis_server thing supposed to facilitate this?  If so, any

Some other questions:

1. Even though I've got complex types as the inputs and outputs of my
service, xwsdl2ws generates methods that take all of the fields from the
complex types as individual parameters (rather than passing and
returning a structure).  When I changed my binding style to "rpc", I got
structure-based methods generated.  Is that just 'the way it works', or
can I control this?  Is one kind of method better than the other (the
struct way seems more self-documenting than having Value0..7 and

2. When I try to bring up ?wsdl URL's for my service or the axis
'Calculator' sample (http://localhost/axis/calculator?wsdl), Apache logs
a segfault.  Do I have to explicitly put the wsdl file somewhere (or
point to it in axiscpp.conf or elsewhere)?


Here's my server.wsdd entry:

        <service name="HUB_TO_HUB" provider="CPP:DOCUMENT"
description="TVB Hub-to-Hub Service">
                <parameter name="allowedMethods" value="Hub_Request "/>
                <parameter name="className"
value="/usr/local/axiscpp_deploy/lib/" />

Here's the wsdl:

<?xml version="1.0" encoding="utf-8"?>

    <s:schema elementFormDefault="qualified"
      <s:element name="Hub_Request" type="tns:HUB_IN" />
      <s:complexType name="HUB_IN">
          <s:element minOccurs="0" maxOccurs="1" name="TO_TP"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="FROM_TP"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="TO_HUB"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="FROM_HUB"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="UID"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="APIKEY"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="ROUTING"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="MESSAGE"
type="s:string" />
    <s:schema elementFormDefault="qualified">
      <s:element name="Hub_Response" nillable="true"
type="tns:MSG_RECPT" />
      <s:complexType name="MSG_RECPT">
          <s:element minOccurs="0" maxOccurs="1" name="UID"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="TO_TP"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="FROM_TP"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="STATUS"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="STATUS_MSG"
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="TIMESTAMP"
type="s:string" />

  <wsdl:message name="Hub_RequestIn">

  <wsdl:message name="Hub_RequestIn">
    <wsdl:part name="Hub_Request" element="tns:Hub_Request" />
  <wsdl:message name="Hub_RequestOut">
    <wsdl:part name="Hub_Response" element="tns:Hub_Response" />

  <wsdl:portType name="HUB_TO_HUB">
    <wsdl:operation name="Hub_Request">
      <wsdl:input message="tns:Hub_RequestIn" />
      <wsdl:output message="tns:Hub_RequestOut" />

  <wsdl:binding name="HUB_TO_HUBSoap" type="tns:HUB_TO_HUB">
    <soap:binding transport=""
style="document" />
    <wsdl:operation name="Hub_Request">
      <soap:operation soapAction="HUB_TO_HUB#Hub_Request"
style="document" />
        <soap:body use="literal" />
        <soap:body use="literal" />

  <wsdl:service name="HUB_TO_HUB">
    <wsdl:port name="HUB_TO_HUB" binding="tns:HUB_TO_HUBSoap">
      <soap:address location="http://localhost/axis/HUB_TO_HUB" />

R o b   Y a m p o l s k y
Harris Corporation
(212) 303 - 4250

View raw message