Web Service PHP / Client JAVA
Bonjour Tout le monde!
J'ai réalisé un webService en php, qui extrait des .doc et.pdf pour les sortir en XML.
Cependant mon client JAVA, quand il appelle ce webservice n'affiche que le squelette XML, sans aucune données...
Quelqu'un aurait-il une solutioN?
JE vous copie-colle mon code du client JAVA:
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
| import java.io.*;
import java.net.URL;
import java.util.*;
import org.apache.soap.*;
import org.apache.soap.encoding.SOAPMappingRegistry;
import org.apache.soap.encoding.soapenc.ArraySerializer;
import org.apache.soap.encoding.soapenc.StringDeserializer;
import org.apache.soap.rpc.*;
import org.apache.soap.util.xml.QName;
public class Client {
public static void main(String[] args) throws Exception {
URL url = new URL ("http://localhost/antiword/soap-server.php");
// Creation de l'appel
Call call = new Call();
call.setTargetObjectURI("urn:ExtracteurService");
call.setMethodName("getScriptExtraction");
Response resp = call.invoke(url, "" );
// verification
if ( resp.generatedFault() ) {
Fault fault = resp.getFault ();
System.out.println("The call failed: ");
System.out.println("Fault Code = " + fault.getFaultCode());
System.out.println("Fault String = " + fault.getFaultString());
}
else {
Parameter result = resp.getReturnValue();
//Object value = result.getValue();
System.out.println(result.getValue());
}
} |
MAintenant le code de ma réponse du client:
Code:
1 2
| <?xml version="1.0"?>
<cv><etatCivil civilite=""><nom></nom><prenom></prenom><jourNaissance></jourNaissance><moisNaissance></moisNaissance><anneeNaissance></anneeNaissance><adresse></adresse><codePostal></codePostal>... ETC |
Merci d'avance!