2017-11-20 2 views
0

Ich ging zu servicex.com, um meine Seife Webservice Fähigkeiten zu überprüfen, und ich bekomme diesen Fehler. Gibt es jemanden, der mir helfen kann?com.sun.xml.internal.ws.fault.ServerSOAPFaultException: Client erhielt SOAP-Fehler vom Server

Danke Hier ist meine Hauptklasse, wo ich den Service konsumiere.

import java.util.Scanner; 

import net.webservicex.ArrayOfAddress; 
import net.webservicex.USAddressVerification; 
import net.webservicex.USAddressVerificationSoap; 
import net.webservicex.VerifyAddressResponse; 


public class AddressValidation { 


    public static void main(String [] arg) { 

     @SuppressWarnings("resource") 
     Scanner in = new Scanner (System.in); 
     System.out.println("enter the city "); 
      String city = in.nextLine(); 
      System.out.println("enter the state "); 
      String state = in.nextLine(); 
      System.out.println("enter the zip "); 
      String zip = in.nextLine(); 

      // service end point interface 
      USAddressVerification addressVerification= new USAddressVerification(); 
      USAddressVerificationSoap addressVerificationSoap = addressVerification.getUSAddressVerificationSoap(); 
      ArrayOfAddress USAddress = addressVerificationSoap.verifyAddress(city, state, zip); 
      VerifyAddressResponse reponse = new VerifyAddressResponse(); 
    reponse.setVerifyAddressResult(USAddress); 

      System.out.println("The Address is:" + reponse.getVerifyAddressResult()); 
     } 



} 

Antwort

0

Es funktioniert für mich.

Use built-in generate webservice client of ECLIPSE, und schreiben Sie den folgenden Code.

USAddressVerificationSoap addressVerificationSoap= new USAddressVerificationSoapProxy(); 
    Address[] USAddress = addressVerificationSoap.verifyAddress(city, state, zip); 
+0

sein ein Client Problem: Sie können meine Wsdl hier testen http://www.webservicex.net/New/Home/ServiceDetail/77 – silfrede

+0

dankt Ihnen. Es funktioniert für Sie, weil der Dienst noch normal funktioniert – silfrede

Verwandte Themen