J'ai un WS avaialbel @http://domain.com/Service?wsdl. Le wsdl importe plusieurs définitions XSD. Lorsque j'ai essayé d'appeler le service comme indiqué ci-dessous, je reçois une exception disant qu'il est incapable de localiser les xsd sur le serveur, ce qui est correct car les xsd ne sont pas présents. Ma question est de savoir comment dire à WSClient de résoudre les xsd du classpath ou du système de fichiers et de les ignorer pour les obtenir du serveur?Groove WSClient et document/literal WS
def proxy = new WSClient("http://domain/Service?wsdl", this.class.classLoader)
proxy.initialize()
Caused by: java.lang.reflect.InvocationTargetException
at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
... 19 more
Caused by: java.lang.RuntimeException: Error compiling schema from WSDL at {http://domain/Service/IcTransactionService?wsdl}: http://domain/Service/RequestImpl1-0.xsd
... 20 more
Caused by: java.io.FileNotFoundException: http://domain/Service/RequestImpl1-0.xsd
... 18 more
Caused by: java.io.FileNotFoundException: http://domain/Service/RequestImpl1-0.xsd
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1434)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:677)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.tools.internal.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:383)
... 16 more
Merci pour le post mais je sais déjà que cette solution fonctionne. Je me demande si je peux fournir le schéma au client d'une certaine manière. –
@Pangea Vous pouvez regrouper ces schémas avec votre pot client. –