Bonjour,
J'ai un wsdl ci-dessous que j'ai extrait à partir du navigateur (
http://127.0.0.1:9090/echo/Echo?wsdl
) et je souhaiterai invoquer la méthode echo à partir du navigateur, comme faire ?
- Sachant que ce mini service web a été fait en jax-ws et tourne sur jboss 4.2.ga.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
- <definitions name="EchoService" targetNamespace="http://echo/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://echo/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <types>
- <xs:schema targetNamespace="http://echo/" version="1.0" xmlns:tns="http://echo/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="echo" type="tns:echo" />
<xs:element name="echoResponse" type="tns:echoResponse" />
- <xs:complexType name="echo">
- <xs:sequence>
<xs:element minOccurs="0" name="arg0" type="xs:string" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="echoResponse">
- <xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
- <message name="Echo_echoResponse">
<part element="tns:echoResponse" name="echoResponse" />
</message>
- <message name="Echo_echo">
<part element="tns:echo" name="echo" />
</message>
- <portType name="Echo">
- <operation name="echo" parameterOrder="echo">
<input message="tns:Echo_echo" />
<output message="tns:Echo_echoResponse" />
</operation>
</portType>
- <binding name="EchoBinding" type="tns:Echo">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="echo">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <service name="EchoService">
- <port binding="tns:EchoBinding" name="EchoPort">
<soap:address location="http://127.0.0.1:9090/echo/Echo" />
</port>
</service>
</definitions> |
voici donc la classe :
1 2 3 4 5 6 7 8 9 10
|
package echo;
@javax.jws.WebService
public class Echo
{
public String echo(String input)
{
return input;
}
} |
Sachant que j'ai testé :
http://127.0.0.1:9090/echo/Echo?method=echo&arg0=10
comme avec axis, mais ça ne marche pas, elle me renvoie une erreur 405, comme si je tappais n'importe quoi après /Echo?....
Merci pour votre aide.
Partager