`

faultString: No endpoint

阅读更多
使用axis生成客户端代码调用时报错如下:
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.NoEndpoint
faultSubcode:
faultString: No endpoint
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}exceptionName:org.apache.axis.NoEndPointException
{http://xml.apache.org/axis/}stackTrace:No endpoint
at com.wasu.WmgwSoap12Stub.mongateCsSpSendSmsNew(WmgwSoap12Stub.java:275)
at com.wasu.Test.mongateCsSpSendSmsNew01(Test.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

{http://xml.apache.org/axis/}hostname:2012-20131023HT

No endpoint
at com.wasu.WmgwSoap12Stub.mongateCsSpSendSmsNew(WmgwSoap12Stub.java:275)
at com.wasu.Test.mongateCsSpSendSmsNew01(Test.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


客户端调用代码:
package com.wasu;

import java.rmi.RemoteException;
import java.util.Date;

import javax.xml.rpc.ServiceException;

import junit.framework.TestCase;

public class Test extends TestCase {

	private String userId = "BG2059";
	private String password = "070033";
	private String pszMobis = "13857552768";
	private String pszMsg = "测试" + new Date().getTime();

	public void mongateCsSpSendSmsNew01() {// 错误调用代码
		try {
			WmgwSoap12Stub wmgwSoap12Stub = new WmgwSoap12Stub();
			System.out.println(wmgwSoap12Stub.mongateCsSpSendSmsNew(userId,
					password, pszMobis, pszMsg, 1, "*"));

		} catch (RemoteException e) {
			e.printStackTrace();
		}
	}

	public void mongateCsSpSendSmsNew02() {// 正确调用代码
		try {
			WmgwLocator wmgwLocator = new WmgwLocator();
			WmgwSoap_PortType wmgwSoap_PortType = wmgwLocator.getwmgwSoap12();
			System.out.println(wmgwSoap_PortType.mongateCsSpSendSmsNew(userId,
					password, pszMobis, pszMsg, 1, "*"));
		} catch (RemoteException e) {
			e.printStackTrace();
		} catch (ServiceException e) {
			e.printStackTrace();
		}
	}
}

生成的代码结构如下:

WmgwLocator.java部分代码如下:
/**
 * WmgwLocator.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package com.wasu;

public class WmgwLocator extends org.apache.axis.client.Service implements com.wasu.Wmgw {

  ......

    public com.wasu.WmgwSoap_PortType getwmgwSoap12() throws javax.xml.rpc.ServiceException {
       java.net.URL endpoint;
        try {
            endpoint = new java.net.URL(wmgwSoap12_address);
        }
        catch (java.net.MalformedURLException e) {
            throw new javax.xml.rpc.ServiceException(e);
        }
        return getwmgwSoap12(endpoint);
    }

   ....

}

WmgwSoap_PortType.java部分代码如下:
package com.wasu;

public interface WmgwSoap_PortType extends java.rmi.Remote {

    public java.lang.String mongateCsSpSendSmsNew(java.lang.String userId, java.lang.String password, java.lang.String pszMobis, java.lang.String pszMsg, int iMobiCount, java.lang.String pszSubPort) throws java.rmi.RemoteException;

    ....}

WmgwSoap12Stub.java部分代码如下:
/**
 * WmgwSoap12Stub.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package com.wasu;

public class WmgwSoap12Stub extends org.apache.axis.client.Stub implements com.wasu.WmgwSoap_PortType {
    .......

    public java.lang.String mongateCsSpSendSmsNew(java.lang.String userId, java.lang.String password, java.lang.String pszMobis, java.lang.String pszMsg, int iMobiCount, java.lang.String pszSubPort) throws java.rmi.RemoteException {
        if (super.cachedEndpoint == null) {
            throw new org.apache.axis.NoEndPointException();
        }
        org.apache.axis.client.Call _call = createCall();
        _call.setOperation(_operations[0]);
        _call.setUseSOAPAction(true);
        _call.setSOAPActionURI("http://tempuri.org/MongateCsSpSendSmsNew");
        _call.setEncodingStyle(null);
        _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
        _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP12_CONSTANTS);
        _call.setOperationName(new javax.xml.namespace.QName("http://tempuri.org/", "MongateCsSpSendSmsNew"));

        setRequestHeaders(_call);
        setAttachments(_call);
 try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {userId, password, pszMobis, pszMsg, new java.lang.Integer(iMobiCount), pszSubPort});

        if (_resp instanceof java.rmi.RemoteException) {
            throw (java.rmi.RemoteException)_resp;
        }
        else {
            extractAttachments(_call);
            try {
                return (java.lang.String) _resp;
            } catch (java.lang.Exception _exception) {
                return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class);
            }
        }
  } catch (org.apache.axis.AxisFault axisFaultException) {
  throw axisFaultException;
}
    }

    ......

}


wsdl详细介绍
  • 大小: 3.5 KB
分享到:
评论

相关推荐

    axis2 InvocationTargetException

    标题 "axis2 InvocationTargetException" 描述的是一个与Apache Axis2框架相关的编程问题,该问题通常在执行服务调用时出现,提示"InvocationTargetException"。这可能是由于多种原因引起的,包括但不限于错误的服务...

    webservice启动没有问题,通过自动生成的客户端报错

    faultString: java.lang.reflect.InvocationTargetException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace: AxisFault faultCode: {...

    SOAP调用Axis服务的Client

    SOAP(Simple Object Access Protocol)是一种基于XML的网络通信协议,常用于Web服务的交互。Axis是Apache软件基金会开发的一个开源工具,它提供了SOAP服务的实现,包括服务端和客户端。本篇文章将深入探讨如何使用...

    调用WEB服务的错误 服务器无法处理请求 无法生成临时类 result 1 解决办法

    自己总结:调用WEB服务的错误 服务器无法处理请求 无法生成临时类 result 1 多种解决办法

    org.xml.sax.SAXException: Invalid element

    NULL 博文链接:https://wilian.iteye.com/blog/1992365

    flex的rpc错误整理

    2. **faultCode:Channel.Security.Error faultString:'Securityerror accessing url' faultDetail:'Destination: DefaultHTTP'** 出现安全错误访问URL,可能是因为跨域限制。需要在服务器端设置适当的跨域策略,...

    CVE-2020-9496 ofbiz反序列化漏洞分析1

    要检测该漏洞,可以发送恶意的XML-RPC请求,检查响应包中是否存在faultString, No such service [ProjectDiscovery], methodResponse关键词。如果存在这些关键词,证明漏洞存在。 在分析该漏洞时,我们可以查看/web...

    QtSoap解决方案

    如果有错误,可以通过`faultString()`和`faultCode()`获取详细信息。 **7. 性能与优化** 虽然QtSoap简化了SOAP通信,但在处理大量请求或高并发场景时,可能需要考虑性能优化,如使用异步调用、缓存结果、批量处理...

    PHP使用SOAP调用.net的WebService数据

    trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faultstring})", E_USER_ERROR); } else { $data = $result->GetArticleResult; print_r($data); } ``` 这里,`...

    flash+xml超酷欧美FLASH整站源码

    Alert.show(event.fault.faultString, event.fault.faultCode); } ]]> </mx:Script> <mx:HTTPService id="service" url="data/slideshow.xml" result="resultHandler(event)" fault=...

    Flex调用xml通过DataGrid遍历简单示例

    Alert.show(event.fault.faultString, event.fault.faultCode); } ]]> </mx:Script> <mx:HTTPService id="service" url="data/slideshow.xml" result="resultHandler(event)" fault=...

    flex与 java 通信常见错误

    flex与 java 通信常见错误: [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: '...

    SOAP基本和创建详解

    Fault元素包括`faultcode`(错误代码)、`faultstring`(人类可读的错误描述)、`faultactor`(导致错误的角色)和`detail`(与Body元素相关的应用特定错误信息)。 ### SOAP语法规则 - SOAP消息必须使用XML编码。 ...

    webservice之soap.jar

    SOAPElement faultString = body.addChildElement("faultstring", "", ""); faultString.addTextNode("Error message"); ``` 7. **调试与测试**:在开发过程中,使用如SOAPUI这样的工具可以方便地测试和调试SOAP...

    soap消息解析.rar

    例如,`<soap:Fault>`元素内的`<faultcode>`, `<faultstring>`和`<detail>`子元素分别描述了错误的类型、错误信息和具体细节。 在易语言中实现SOAP消息解析,需要对XML解析有深入的理解,因为SOAP消息本质上是XML...

    FluorineFx C#搭建简单小例子

    trace("Fault: " + fault.faultString); } ``` 在这个例子中,我们创建了一个AMFClient实例,指定了服务的URL,然后调用服务的`HelloWorld`方法,并添加了结果和错误处理函数。 这就是一个使用FluorineFx和C#搭建...

    webservice调试工具

    SOAP错误通常在响应的Body部分,以`<faultcode>`和`<faultstring>`标签形式出现,它们提供了错误的详细信息。 总的来说,`WebServiceStudio20工具`是Web服务开发者的重要助手,它简化了SOAP接口的测试和调试流程,...

    felx,jsn远程调用

    Alert.show("Error: " + event.fault.faultString); } // 发送请求 httpService.send(); ``` 在这个例子中,Flex向服务器发送一个POST请求,并期望得到一个JSON格式的响应。当服务器返回数据时,`resultHandler`...

    php soap实例

    $fault->faultstring; } ``` 3. **自定义类和类型** 如果你需要传输自定义的PHP类或者处理复杂的数据类型,可以使用`__setTypes`和`__setSoapHeaders`方法。`__setTypes`定义数据类型映射,`__setSoapHeaders`...

Global site tag (gtag.js) - Google Analytics