|
Lines 18-25
Link Here
|
| 18 |
import org.apache.muse.tools.inspector.ResourceInspector; |
18 |
import org.apache.muse.tools.inspector.ResourceInspector; |
| 19 |
import org.apache.muse.util.xml.XmlUtils; |
19 |
import org.apache.muse.util.xml.XmlUtils; |
| 20 |
import org.apache.muse.ws.addressing.EndpointReference; |
20 |
import org.apache.muse.ws.addressing.EndpointReference; |
| 21 |
import org.apache.muse.ws.dm.muws.MuwsConstants; |
|
|
| 22 |
import org.apache.muse.ws.metadata.remote.MetadataExchangeClient; |
| 23 |
import org.apache.muse.ws.notification.WsnConstants; |
21 |
import org.apache.muse.ws.notification.WsnConstants; |
| 24 |
import org.apache.muse.ws.resource.remote.WsResourceClient; |
22 |
import org.apache.muse.ws.resource.remote.WsResourceClient; |
| 25 |
import org.apache.muse.ws.resource.sg.WssgConstants; |
23 |
import org.apache.muse.ws.resource.sg.WssgConstants; |
|
Lines 69-77
Link Here
|
| 69 |
|
67 |
|
| 70 |
// however MAX is guaranteed to work only with resources that support MEX |
68 |
// however MAX is guaranteed to work only with resources that support MEX |
| 71 |
// hence we will try to get the WSDL using MEX and use that as the ping |
69 |
// hence we will try to get the WSDL using MEX and use that as the ping |
| 72 |
MetadataExchangeClient mdxClient = new MetadataExchangeClient(_resource.getDestination()); |
70 |
Element wsdl = _mHelper.getWSDL(_resource.getDestination()); |
| 73 |
//mdxClient.setTrace(true); |
|
|
| 74 |
Element wsdl = mdxClient.getWSDL(); |
| 75 |
if(wsdl==null){ |
71 |
if(wsdl==null){ |
| 76 |
emptyWSDL=true; |
72 |
emptyWSDL=true; |
| 77 |
throw new Exception(); |
73 |
throw new Exception(); |
|
Lines 84-93
Link Here
|
| 84 |
}catch(Throwable t){ |
80 |
}catch(Throwable t){ |
| 85 |
if(emptyWSDL){ |
81 |
if(emptyWSDL){ |
| 86 |
MuseRuntimePlugin.getDefault().log(Messages.getString("MuseRuntime.BAD_WSDL.ERROR."), t, IStatus.ERROR); //$NON-NLS-1$ |
82 |
MuseRuntimePlugin.getDefault().log(Messages.getString("MuseRuntime.BAD_WSDL.ERROR."), t, IStatus.ERROR); //$NON-NLS-1$ |
|
|
83 |
throw new Exception(Messages.getString("MuseRuntime.BAD_WSDL.ERROR."), t);//$NON-NLS-1$ |
| 87 |
}else{ |
84 |
}else{ |
| 88 |
MuseRuntimePlugin.getDefault().log(Messages.getString("MuseRuntime.CANT_CONN.ERROR."), t, IStatus.ERROR); //$NON-NLS-1$ |
85 |
MuseRuntimePlugin.getDefault().log(Messages.getString("MuseRuntime.CANT_CONN.ERROR."), t, IStatus.ERROR); //$NON-NLS-1$ |
|
|
86 |
throw new Exception(Messages.getString("MuseRuntime.CANT_CONN.ERROR."), t);//$NON-NLS-1$ |
| 89 |
} |
87 |
} |
| 90 |
return false; |
|
|
| 91 |
} |
88 |
} |
| 92 |
return true; |
89 |
return true; |
| 93 |
} |
90 |
} |
|
Lines 125-138
Link Here
|
| 125 |
Element wsdl; |
122 |
Element wsdl; |
| 126 |
Object result = null; |
123 |
Object result = null; |
| 127 |
try { |
124 |
try { |
| 128 |
MetadataExchangeClient mdxClient = new MetadataExchangeClient(_resource.getDestination()); |
125 |
wsdl = _mHelper.getWSDL(_resource.getDestination()); |
| 129 |
wsdl = mdxClient.getWSDL(); |
|
|
| 130 |
inspector.run(wsdl); |
126 |
inspector.run(wsdl); |
| 131 |
|
|
|
| 132 |
result = inspector.invoke(_resource, operationQName, params); |
127 |
result = inspector.invoke(_resource, operationQName, params); |
| 133 |
} catch (Exception e) { |
128 |
} catch (Exception e) { |
| 134 |
MuseRuntimePlugin.getDefault().log(Messages.getString("MuseRuntime.CANT_INVOKE.ERROR."), e, IStatus.ERROR); //$NON-NLS-1$ |
129 |
MuseRuntimePlugin.getDefault().log(Messages.getString("MuseRuntime.CANT_INVOKE.ERROR."), e, IStatus.ERROR); //$NON-NLS-1$ |
| 135 |
throw e; |
130 |
throw new Exception(Messages.getString("MuseRuntime.CANT_INVOKE.ERROR."), e); |
| 136 |
} |
131 |
} |
| 137 |
return result; |
132 |
return result; |
| 138 |
} |
133 |
} |
|
Lines 195-201
Link Here
|
| 195 |
public ArrayList getTopics() throws Exception{ |
190 |
public ArrayList getTopics() throws Exception{ |
| 196 |
if(_resource==null) return null; |
191 |
if(_resource==null) return null; |
| 197 |
|
192 |
|
| 198 |
Element[] els = _resource.getResourceProperty(WsnConstants.TOPIC_EXPRESSION_QNAME); |
193 |
_resource.getResourceProperty(WsnConstants.TOPIC_EXPRESSION_QNAME); |
| 199 |
return _tHelper.getTopics(_resource); |
194 |
return _tHelper.getTopics(_resource); |
| 200 |
} |
195 |
} |
| 201 |
} |
196 |
} |