简体   繁体   English

com.sun.xml.internal.ws.fault.ServerSOAPFaultException:客户端从服务器收到SOAP错误

[英]com.sun.xml.internal.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server

I went to servicex.com to review my soap webservice skills and I'm getting this error. 我去了servicex.com来查看我的soap webservice技能,但出现此错误。 Is there anyone who can help me? 有谁可以帮助我吗?

Thanks Here is my main class where I consume the service. 谢谢这是我使用服务的主要班级。

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());
        }



}

It works for me. 这个对我有用。

Use built-in generate webservice client of ECLIPSE , and write the following code. 使用ECLIPSE的内置生成Web服务客户端 ,并编写以下代码。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 com.sun.xml.internal.ws.fault.SOAPFaultBuilder的NoClassDefFoundError - NoClassDefFoundError for com.sun.xml.internal.ws.fault.SOAPFaultBuilder 无法初始化 class com.sun.xml.internal.ws.fault.SOAPFaultBuilder - Could not initialize class com.sun.xml.internal.ws.fault.SOAPFaultBuilder 客户端从服务器收到SOAP错误:验证失败的ebay - Client received SOAP Fault from server: Authentication failed ebay com.sun.xml.internal.ws.client 不存在 - com.sun.xml.internal.ws.client does not exist Glassfish抛出com.sun.xml.ws.client.ClientTransportException:服务器发送了HTTP状态代码500:内部服务器错误 - Glassfish throws com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code 500: Internal Server Error java.lang.NoClassDefFoundError:com.sun.xml.ws.fault.SOAPFaultBuilder - java.lang.NoClassDefFoundError: com.sun.xml.ws.fault.SOAPFaultBuilder 线程“ main” com.sun.xml.internal.ws.client.ClientTransportException中的异常:服务器发送了HTTP状态代码502:代理错误 - Exception in thread “main” com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 502: Proxy Error 连接到 web 服务导致 com.sun.xml.internal.ws.client.ClientTransportException:服务器发送 HTTP 状态码 200 - Connecting to webservice results in com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 200: OK 导入com.sun.xml.internal.ws.client.ClientTransportException,无法读取此导入 - import com.sun.xml.internal.ws.client.ClientTransportException, can't read this import 在 Jenkins 上构建失败:错误:package com.sun.Z0F635D0E0F3874FFF8B581C1.ws.不存在。 - Build on Jenkins fails: error: package com.sun.xml.internal.ws.client does not exist
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM