상세 컨텐츠

본문 제목

eclipse web service client - exceptionName:org.apache.axis.NoEndPointException

소프트웨어/java

by 야솔아빠 2015. 5. 15. 08:38

본문

반응형

If you meet the below exception...


 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


Solution.

- Client program update below. (Example)


make the Stub with URL and service.





import java.net.MalformedURLException;

import java.net.URL;

import java.rmi.RemoteException;


import javax.xml.namespace.QName;

import javax.xml.rpc.ServiceException;

import javax.xml.rpc.ServiceFactory;

import javax.xml.rpc.holders.StringHolder;


import org.apache.axis.AxisFault;


import nadevsoawm.HISNACommSupplier.PRIME.ORION.ZSUS_CO_OPRM004.HISNACommSupplier_PRIME_ORION_ZSUS_CO_OPRM004_BinderStub;

import nadevsoawm.HISNACommSupplier.PRIME.ORION.ZSUS_CO_OPRM004.IN_DATA;

import nadevsoawm.HISNACommSupplier.PRIME.ORION.ZSUS_CO_OPRM004.OUTPUT;

import nadevsoawm.HISNACommSupplier.PRIME.ORION.ZSUS_CO_OPRM004.holders.OUT_DATAHolder;


public class WSClient {


public static void main(String[] args) throws MalformedURLException, ServiceException {

// TODO Auto-generated method stub

IN_DATA inData = new IN_DATA("OCOM15001");

StringHolder IFRESULT = new StringHolder();

StringHolder IFFAILMSG = new StringHolder();

OUT_DATAHolder outData = new OUT_DATAHolder(); 

URL url = new URL("http://nadevsoawm:5115/ws/HISNACommSupplier.PRIME.ORION:ZSUS_CO_OPRM004");

ServiceFactory serviceFactory = ServiceFactory.newInstance();

javax.xml.rpc.Service service = serviceFactory.createService(new QName("ZSUS_CO_OPRM004"));

try {

HISNACommSupplier_PRIME_ORION_ZSUS_CO_OPRM004_BinderStub stub = new HISNACommSupplier_PRIME_ORION_ZSUS_CO_OPRM004_BinderStub(url, service );

stub.ZSUS_CO_OPRM004Response(

"IF1", //IF_ID

"HMA",

"TEST", //SENDER

"TEST", //RECIVER

"", //IF_DATE

"", //IF_TIME

inData, IFRESULT, IFFAILMSG, outData);

System.out.println(inData);

OUTPUT[] outputList = outData.value.getOUTPUT();

System.out.println(outputList.length);

System.out.println(outputList[0].getAUFNR());

System.out.println(outputList[0].getFIPEX());

System.out.println(outputList[0].getTEXT1());


} catch (AxisFault e) {

// TODO Auto-generated catch block

e.printStackTrace();

} catch (RemoteException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}


}




반응형

관련글 더보기

댓글 영역