Dear all,
my first posting here, so please bear with me, in case I should break
any unwritten rules.
I am currently trying to get my first web services up and running on
Tomcat 5. I created a simple Java class to return a String:
public class SayHello2
{
public String hello(String in)
{
return ("Hello, " + in);
}
}
From this class I created the WSDL with Java2Wsdl. I created the deployment
descriptor using Wsdl2Java and deployed the whole thing using the Axis
AdminClient. Finally, I compiled the resulting classes from step 2 and copied
them to the directory that corresponds to the package name.
The web service is listed together with the method in the list provided by
Axis. However, I can not access the method, neither entering the direct URL
(http://localhost/WSTest/services/SayHello2?in=bla), nor using the stub classes
generated by Axis, nor using a org.apache.axis.client.Call. I am quite lost.
Does anyone have any ideas what I could check? I've pasted the WSDL below, just
in case there's any hint in there. (I can access this wsdl alright with
http://localhost/WSTest/services/SayHello2?wsdl).
Cheers,
N.
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:testPackage"
xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:testPackage"
xmlns:intf="urn:testPackage"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.2.1
Built on Jun 14, 2005 (09:15:57 EDT)-->
<wsdl:message name="helloResponse">
<wsdl:part name="helloReturn" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="helloRequest">
<wsdl:part name="in" type="soapenc:string"/>
</wsdl:message>
<wsdl:portType name="SayHello2">
<wsdl:operation name="hello" parameterOrder="in">
<wsdl:input message="impl:helloRequest" name="helloRequest"/>
<wsdl:output message="impl:helloResponse" name="helloResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SayHello2SoapBinding" type="impl:SayHello2">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="hello">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="helloRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:testPackage" use="encoded"/>
</wsdl:input>
<wsdl:output name="helloResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:testPackage" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SayHello2Service">
<wsdl:port binding="impl:SayHello2SoapBinding" name="SayHello2">
<wsdlsoap:address
location="http://localhost/WSTest/services/SayHello2"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
--
----------------------------------------------------------
Martin Wunderlich, M.A.
Translation/Localisation EN <-> DE
www.martinwunderlich.com
----------------------------------------------------------
Free / open-source software for translation/localisation:
www.martinwunderlich.com/foss-links.html
----------------------------------------------------------
Random aphorism:
"Es ist ein Wunder, dass Neugier die Schulbildung überlebt."
"It is a miracle that curiosity survives formal education."
- Albert Einstein
----------------------------------------------------------