Hi Martin,
Thanks for the very quick answer. The sample services work OK using when
accessing the browser,
but I still can not get any of the java clients to work.
I have checked my axis2.xml and the transportSender for http is correct.
I have tried building other java clients using the ant build.xml provided as
these clients do not work and
I keep getting a request error.
Maybe I have made so basic error.
1.) downloaded axis2-1.3-bin.zip 26/10
axis2-1.3-docs.zip
2.) Unzipped and put the axis2-1.3\dist\axis2.war in
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapp.
3.) After starting Tomcat the war was expanded and created the directories
axis2\axis2-web
4.) axis2 samples directory was copied to
C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\axis2\WEB-INF
which contains the \services and \repository\services directories,
where the ant copies the aar services
5.) Open a cmd window in \samples
and set the following
set PATH=
set PATH=%PATH%;C:\Program Files\Java\jdk1.5.0_09\bin
set PATH=%PATH%;C:\Downloads\Axis\apache-ant-1.7.0\bin
set PATH=%PATH%;C:\WINDOWS\system32
set PATH=%PATH%;C:\downloads\Ant\ant\bin
set CLASSPATH=
set CLASSPATH=%CLASSPATH%;C:\Program Files\Java\jdk1.5.0_09
set ANT_HOME=C:\Downloads\Axis\apache-ant-1.7.0
set AXIS2_HOME=C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\axis2\WEB-INF
set AXIS2_LIB=%AXIS2_HOME%\lib
set AXISCLASSPATH=
set AXISCLASSPATH=%AXISCLASSPATH%;%AXIS2_LIB%\commons-discovery-0.2.jar
....
set AXISCLASSPATH=%AXISCLASSPATH%;%AXIS2_LIB%\XmlSchema-1.3.2.jar
6.) changed to the \pojoguide directory
7.) $ant - to build WeatherService.aar
8.) installed the aar using the AdminServlet
9.) $ ant rpc.client - the prolog error
What am I doing wrong or leaving out?
Yours truly,
Rick Isaacs
On 11/5/07, Martin Gainty <[EMAIL PROTECTED]> wrote:
>
> Rick-
> Please verify chunked transfer-encoding is enabled in axis2.xml e.g.
> <transportSender name="http"
> class="
> org.apache.axis2.transport.http.CommonsHTTPTransportSender">
> <parameter name="PROTOCOL">HTTP/1.1</parameter>
> <parameter name="Transfer-Encoding">chunked</parameter>
>
> <!-- If following is set to 'true', optional action part of the
> Content-Type will not be added to the SOAP 1.2 messages -->
> <!-- <parameter name="OmitSOAP12Action">true</parameter> -->
> </transportSender>
>
> M--
>
> ----- Original Message -----
> *From:* Rick Isaacs <[EMAIL PROTECTED]>
> *To:* [email protected]
> *Sent:* Monday, November 05, 2007 2:40 AM
> *Subject:* Axis2 sample - pojoguide Unexpected EOF in prolog
>
> Hi
>
> Using Windows XP, Tomcat 5.5, Java 5.0, Ant 1.7, I can not get the Axis2
> sample pojoguide client program, WeatherRPCClient, to send a correct SOAP
> request to the the uploaded WeatherService.
>
> The service was correctly built using the ant task and uploaded using the
> AdminServlet.
>
> With a browser:
>
> http://127.0.0.1:8080/axis2/services/WeatherService?wsdl
> <http://127.0.0.1:8080/axis2/services/WeatherService?wsdl+>
>
> The service is OK
>
> Here is a part of the client:
>
> public class WeatherRPCClient {
>
> public static void main(String[] args1) throws AxisFault {
>
> RPCServiceClient serviceClient = new RPCServiceClient();
>
> Options options = serviceClient.getOptions ();
>
> EndpointReference targetEPR = new
> EndpointReference("http://localhost:80/axis2/services/WeatherService
> <http://localhost/axis2/services/WeatherService>");
>
> options.setTo (targetEPR);
>
> // Setting the weather
>
> QName opSetWeather = new QName("http://service.pojo.sample/xsd ",
> "setWeather");
>
>
> When I start the client
>
>
> > ant rpc.client
>
>
> I receive the error:
>
> org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxEOFExcepti on:
> Unexpected EOF in prolog
>
> And the tcpmon shows the Http request:
>
>
> -----
> SOAPAction: "urn:anonRobustOp"
> User-Agent: Axis2
> Host: localhost
> Transfer-Encoding: chunked
>
> 0
>
> 0
> -----
>
> The classpath. AXISCLASSPATH, path are set to Axis2, java and ant
>
>
> Directory structure:
>
> Tomcat 5.5/axis2/axis2-web/WEB-INF/samples/pojoguide
>
> Rick Isaacs
>
>