axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Dick <adrian.d...@uk.ibm.com>
Subject RE: stub transport
Date Mon, 19 Dec 2005 14:40:21 GMT
Hi,

To stop the mock server you should actually use the following command:
   java org.apache.test.StopMockServer -p <port> -h <host>

Regards,
Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)


"Stettler, Robert" <robert.stettler@capitalone.com> wrote on 19/12/2005
12:48:15:

> Sweet!  Exactly what I was looking for.
>
> -----Original Message-----
> From: Adrian Dick [mailto:adrian.dick@uk.ibm.com]
> Sent: Monday, December 19, 2005 5:45 AM
> To: Apache AXIS C User List
> Subject: RE: stub transport
>
> Hi,
>
> Here are some simple instruction on using the MockServer utility we use
> for
> testing Axis c++ client without a server.
>    Compile mock server java code (found within <extract root
>    >/tests/utils/monitor )
>    Run the mock server:
>    java org.apache.test.MockServer -p <port> -r <server response file>
>
> The server response file is a text file containing the full HTTP
> response,
> it will look something like this:
>    HTTP/1.1 200 OK
>    Server: WebSphere Application Server/5.1
>    Content-Type: text/xml; charset=utf-8
>    Content-Language: en-GB
>    Transfer-Encoding: chunked
>
>    1ad
>    <?xml version="1.0" encoding="utf-8"?>
>    <soapenv:Envelope
>    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header/><
> soapenv:Body><addResponse
>
> xmlns="http://localhost/axis/Calculator"><addReturn>5</addReturn></addRe
> sponse></soapenv:Body></soapenv:Envelope>
>    0
>
>
> The easiest way to generate this file is to capture the communication
> from
> a real server but if that isn't possible you will need to generate by
> hand
> (plenty of examples within <extract
> root>/test/auto_build/testcases/output
> )
> Rather than providing the specific chunk size (1ad, on the line ahead of
> the payload) you can provide ### and the MockServer will calculate the
> correct size.
>
> If your testcase makes multiple calls to the web service, you can simply
> append all the requests (in the correct order!) within the server
> response
> file.
>
> Once the test has been completed you need to run the following:
>    java org.apache.test.StopTCPMonitor -p <port> -h <host>
>
> I hope that is of help
> Adrian
>
> _______________________________________
> Adrian Dick (adrian.dick@uk.ibm.com)
>
>
> "Stettler, Robert" <robert.stettler@capitalone.com> wrote on 16/12/2005
> 14:00:42:
>
> > I have 1.5 Final source.
> >
> > -----Original Message-----
> > From: John Hawkins [mailto:HAWKINSJ@uk.ibm.com]
> > Sent: Friday, December 16, 2005 5:09 AM
> > To: Apache AXIS C User List
> > Subject: RE: stub transport
> >
> >
> > hi Robert,
> >
> > no docs as it's an internal tool used within the test framework. Do
> > you use the source or binaries? It's not shipped with the binaries..
> >
> >
>
> >
> > "Stettler, Robert" <robert.stettler@capitalone.com>
> > 14/12/2005 16:51
> >
> > Please respond to
> > "Apache AXIS C User List"
> >
> > To
> >
> > "Apache AXIS C User List" <axis-c-user@ws.apache.org>
> >
> > cc
> >
> >
> >
> > Subject
> >
> > RE: stub transport
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > I am looking for a simple solution to simulate the server side, so
> > that I can test my client code completely.  I know I can create
> > apache stubs and I have generated stubs in WebLogic, but I am
> > looking for something simpler.
> >
> >
> > You meantioned a unit test system?  Can you point me to some doc?
> >
> > -----Original Message-----
> > From: John Hawkins [mailto:HAWKINSJ@uk.ibm.com]
> > Sent: Wednesday, December 14, 2005 11:40 AM
> > To: Apache AXIS C User List
> > Subject: Re: stub transport
> >
> >
> > hi Robert,
> > sorry unit testing of what - the service? So you want to emulate a
> > client? We currently have a "unit test" system where we can emulate
> > the service.
> >
> > "Stettler, Robert" <robert.stettler@capitalone.com>
> > 14/12/2005 14:37
> >
> >
> > Please respond to
> > "Apache AXIS C User List"
> >
> >
> >
> > To
> >
> > <axis-c-user@ws.apache.org>
> >
> > cc
> >
> >
> >
> > Subject
> >
> > stub transport
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Is there any sort of stub http transport? Maybe something file
> > driven?  I would like to use something like that for unit testing?
> >
> >
> >
> >
> >
> > The information contained in this e-mail is confidential and/or
> proprietary
> > to Capital One and/or its affiliates. The information transmitted
> herewith
> > is intended only for use by the individual or entity to which it is
> > addressed.  If the reader of this message is not the intended
> recipient,
> > you are hereby notified that any review, retransmission,
> dissemination,
> > distribution, copying or other use of, or taking of any action in
> reliance
> > upon this information is strictly prohibited. If you have received
> this
> > communication in error, please contact the sender and delete the
> material
>
> > from your computer.
> >
> >
> >
> > The information contained in this e-mail is confidential and/or
> proprietary
> > to Capital One and/or its affiliates. The information transmitted
> herewith
> > is intended only for use by the individual or entity to which it is
> > addressed.  If the reader of this message is not the intended
> recipient,
> > you are hereby notified that any review, retransmission,
> dissemination,
> > distribution, copying or other use of, or taking of any action in
> reliance
> > upon this information is strictly prohibited. If you have received
> this
> > communication in error, please contact the sender and delete the
> material
>
> > from your computer.
> >
> >
> >
> > The information contained in this e-mail is confidential and/or
> proprietary
> > to Capital One and/or its affiliates. The information transmitted
> herewith
> > is intended only for use by the individual or entity to which it is
> > addressed.  If the reader of this message is not the intended
> recipient,
> > you are hereby notified that any review, retransmission,
> dissemination,
> > distribution, copying or other use of, or taking of any action in
> reliance
> > upon this information is strictly prohibited. If you have received
> this
> > communication in error, please contact the sender and delete the
> material
>
> > from your computer.
> >
>
>
>
> The information contained in this e-mail is confidential and/or
proprietary
> to Capital One and/or its affiliates. The information transmitted
herewith
> is intended only for use by the individual or entity to which it is
> addressed.  If the reader of this message is not the intended recipient,
> you are hereby notified that any review, retransmission, dissemination,
> distribution, copying or other use of, or taking of any action in
reliance
> upon this information is strictly prohibited. If you have received this
> communication in error, please contact the sender and delete the material

> from your computer.
>


Mime
View raw message