You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Roshan Weerasuriya <ro...@opensource.lk> on 2004/03/02 07:51:48 UTC
Re: questions about axis 1.0
hi Jaspreet,
>I started working with Axis 1.0 final and had some problems running a sample
>web service (stripped out version of the interopbase example) with the
>simple_axis_server.
The SimpleAxisServer is not upto date with the lates transport api changes,
and also there were some known bugs at the 1.0 release. So for the moment
you will have to use the Apache Server for testing. (look at the release
docs for using Axis C++ with Apache, it is so easy)
>1. In SoapDeSerializer.cpp i had to copy the SetInputStream fn from beta
>source since the new version didn't work. Parsing the soap msg with
>SoapInputSource apparently returns a parser error.
The 1.0 final SoapEngine was tested and it should work in case of the
problem area which you talk. There can be problems if you use a code
mixture of beta and 1.0 final and the latest CVS Head code. In such a
situation I recomend you to use completely the latest code from the CVS
root, to reflect the latest changes.
><code>
>int set_header(Ax_soapstream* soap, char * pchkey, char * pchvalue)
> {
> ...
> Ax_header * temp = soap->so.http.ip_headers; //Why input header
>pointer? (in my case this ptr is invalid)
> if(soap->so.http.op_headers)
> soap->so.http.op_headers = (Ax_header*)realloc(temp,
>(sizeof(Ax_header)*(count+1)));
> else
> soap->so.http.op_headers =
>(Ax_header*)malloc((sizeof(Ax_header)*(count+1)));
> ...
>}
></code>
>
>we _set_ the output headers and _get_ the input headers. but who does the
>switching? e.g the client sets the output headers that the server has to
>get. are these headers switched during parsing of soap msg?
>in my sample the soap headers that the client passes don't get parsed at the
>server end. the headers are empty. so the endpoint url is obtained from the
>uri and not the soapaction header.
Here the input headers and output headers reflect the INPUT HTTP HEADERS
(i.e the http headers which comes with the soap request) and OUT PUT HTTP
HEADERS (i.e the headers to be send with the soap response). Also this code
has no connection to the SOAP HEADERS.
Also this set header function is used to set the above mentioned OUT PUT
HTTP HEADERS which are to be send with the soap response. (in other words
to be send with the HTTP response). The above mentioned INPUT HTTP HEADERS
are not set by the code in Packet.cpp, instead they are set by the
mod_axis.c file. Actualy I agree that the Packet.cpp doesn't indicate about
this. It is true that the code would be more readable that if Packet.cpp
contained the methods to set the INPUT HTTP HEADERS as well. The get
headers deals with the INPUT HTTP HEADERS.
If the soapaction header is not available the endpoint url is obtained from
the uri and not the soapaction header.
Actual I suggest you to obtain the complete latest code from the CVS Head
and work with it, since you are looking at these implementation details.
The CVS Head code reflects the latest changes/improvements of Axis C++.
Because some of these methods are slightly changed in the latest CVS code,
for example in the latest Packet.cpp the method "set_header" is renamed to
"set_property".
>3. are there a set of unit tests that we can run?
A few set of unit tests are available at CVSHOME/ws-axis/c/src/test_cases.
Also it would be great if you could add some new unit tests and send them
as patches to the mailing list, it will help every one a lot.
rgds,
roshan
At 12:01 PM 2/26/2004 +0530, you wrote:
>Hi
>
>I started working with Axis 1.0 final and had some problems running a sample
>web service (stripped out version of the interopbase example) with the
>simple_axis_server.
>
>1. In SoapDeSerializer.cpp i had to copy the SetInputStream fn from beta
>source since the new version didn't work. Parsing the soap msg with
>SoapInputSource apparently returns a parser error.
>
>2. In Packet.cpp i had to modify the set_header fn. I also want some
>clarifications regarding this fn. the actual code is -
>
><code>
> int set_header(Ax_soapstream* soap, char * pchkey, char * pchvalue)
> {
> ...
> Ax_header * temp = soap->so.http.ip_headers; //Why input header
>pointer? (in my case this ptr is invalid)
> if(soap->so.http.op_headers)
> soap->so.http.op_headers = (Ax_header*)realloc(temp,
>(sizeof(Ax_header)*(count+1)));
> else
> soap->so.http.op_headers =
>(Ax_header*)malloc((sizeof(Ax_header)*(count+1)));
> ...
>}
></code>
>
>we _set_ the output headers and _get_ the input headers. but who does the
>switching? e.g the client sets the output headers that the server has to
>get. are these headers switched during parsing of soap msg?
>in my sample the soap headers that the client passes don't get parsed at the
>server end. the headers are empty. so the endpoint url is obtained from the
>uri and not the soapaction header.
>
>3. are there a set of unit tests that we can run?
>
>
>Regards
>Jaspreet