我正在开发Web服务,我希望在其中连接到SOA服务器。它给出了连接异常。
代码:
public class ConnectSOA{
public static void main(String[] args){
Map<IWorkflowServiceClientConstants.CONNECTION_PROPERTY, String> connProperties = new HashMap<IWorkflowServiceClientConstants.CONNECTION_PROPERTY, String>();
connProperties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.CLIENT_TYPE,WorkflowServiceClientFactory.REMOTE_CLIENT);
connProperties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_PROVIDER_URL,"t3://10.10.78.79:8001");
connProperties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
try {
workflowServiceClient = WorkflowServiceClientFactory
.getWorkflowServiceClient(connProperties, null, null);
itaskQueryService = workflowServiceClient.getTaskQueryService();
statePredicate = new Predicate(
TableConstants.WFTASK_STATE_COLUMN, Predicate.OP_EQ,
IWorkflowConstants.TASK_STATE_ASSIGNED);
iworkFlowContext = itaskQueryService.authenticate("demouser","demo1".toCharArray(), null);
} catch(Exception e ){
e.printStackTrace();
}
}
}
例外:
java.net.ConnectException: t3://10.10.78.79:8001 Bootstrap to: hostname/'10.10.78.79:8001' over: 't3' got an error or timed out
我已经检查了soa服务器,并在机器上运行。
答案 0 :(得分:0)
<强> Can you ping your weblogic 强>
SubItems
我看到你有10.10.78.79:8001和异常IP:8001
可能是您的服务器不正常。检查配置。请参阅config.xml以及服务器的监听地址,并验证您是否可以对其进行ping操作。