[JONAS][DEBUTANT] Problème entre le wsdl et les .xml
Bonjour,
Je souhaiterai créer un web service et le déployer sous Jonas.
A l'aide du tutoriel du site officiel de jonas (tuto) j'ai créé la classe et son interface.
J'ai généré le fichier WSDL à l'aide de java2WSDL.
J'ai modifié les fichiers web.xml, webservice.xml et mapping.xml afin de les adapter à mon web service.
Cependant lorsque je veux deployer le web service sous Jonas (à l'aide de l'interface d'administration) j'obtient le message d'erreur suivant :
Citation:
Cannot read the deployment descriptors from '/D:/JOnAS-4.7.7/webapps/3TiersProject.war': org.objectweb.jonas_ws.deployment.api.WSDeploymentDescException: Le port-component 'CountEtoile' utilise un wsdl:port inconnu '{urn:procstock}IProcStock'.
Voici mes fichiers wsdl et xml:
CountEtoile.wsdl:
Code:
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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:procstock" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:procstock" xmlns:intf="urn:procstock" 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.4
Built on Jan 18, 2006 (05:05:47 CET)-->
<wsdl:message name="iCountEtoileResponse">
<wsdl:part name="iCountEtoileReturn" type="xsd:int"/>
</wsdl:message>
<wsdl:message name="iCountEtoileRequest">
</wsdl:message>
<wsdl:portType name="IProcStock">
<wsdl:operation name="iCountEtoile">
<wsdl:input message="impl:iCountEtoileRequest" name="iCountEtoileRequest"/>
<wsdl:output message="impl:iCountEtoileResponse" name="iCountEtoileResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="dummy-urlSoapBinding" type="impl:IProcStock">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="iCountEtoile">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="iCountEtoileRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:procstock" use="encoded"/>
</wsdl:input>
<wsdl:output name="iCountEtoileResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:procstock" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="IProcStockService">
<wsdl:port binding="impl:dummy-urlSoapBinding" name="dummy-url">
<wsdlsoap:address location="http://dummy-url"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions> |
web.xml:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>CountEtoile Service</display-name>
<servlet>
<display-name>CountEtoile Service</display-name>
<servlet-name>CountEtoileServlet</servlet-name>
<servlet-class>projet3tiers.ws.procstock.Prockstock</servlet-class>
</servlet>
</web-app> |
webservices.xml:
Code:
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
| <?xml version="1.0" encoding="ISO-8859-1"?>
<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
version="1.1">
<display-name>Count Etoile</display-name>
<webservice-description>
<webservice-description-name>Count Etoile Webservice</webservice-description-name>
<wsdl-file>WEB-INF/wsdl/CountEtoile.wsdl</wsdl-file>
<jaxrpc-mapping-file>WEB-INF/countetoile-mapping.xml</jaxrpc-mapping-file>
<port-component>
<port-component-name>CountEtoile</port-component-name>
<wsdl-port xmlns:ns="urn:procstock">ns:IProcStock</wsdl-port>
<service-endpoint-interface>projet3tiers.ws.procstock.IProcStock</service-endpoint-interface>
<service-impl-bean>
<servlet-link>CountEtoileServlet</servlet-link>
</service-impl-bean>
</port-component>
</webservice-description>
</webservices> |
countetoile-mapping.xml:
Code:
1 2 3 4 5 6 7 8 9 10 11
| <?xml version="1.0" encoding="ISO-8859-1"?>
<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
version="1.1">
<package-mapping>
<package-type>projet3tiers.ws.procstock</package-type>
<namespaceURI>urn:procstock</namespaceURI>
</package-mapping>
</java-wsdl-mapping> |
Quelqu'un pourrait il me dire pourquoi j'ai ce message d'erreur? :)
Précison: je débute dans les web service, j'ai peut etre oublié une instruction...
Merci d'avance :lol:
EDIT
Voici l'interface de ma classe:
Code:
1 2 3 4 5 6 7 8 9
|
package projet3tiers.ws.procstock;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface IProcStock extends Remote{
public int iCountEtoile() throws RemoteException;
} |