Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 65143 Details for
Bug 167280
Insufficient error reporting when parsing WSDL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Does MEX first before SG or relationships, reuses WSDLs retrieved over MEX
167280_1.patch (text/plain), 6.74 KB, created by
Balan Subramanian
on 2007-04-26 23:50:04 EDT
(
hide
)
Description:
Does MEX first before SG or relationships, reuses WSDLs retrieved over MEX
Filename:
MIME Type:
Creator:
Balan Subramanian
Created:
2007-04-26 23:50:04 EDT
Size:
6.74 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.monitoring.managedagent >Index: src/org/eclipse/tptp/monitoring/managedagent/provisional/helper/ManagedAgentCommandHelper.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.monitoring.managedagent/src/org/eclipse/tptp/monitoring/managedagent/provisional/helper/ManagedAgentCommandHelper.java,v >retrieving revision 1.9 >diff -u -r1.9 ManagedAgentCommandHelper.java >--- src/org/eclipse/tptp/monitoring/managedagent/provisional/helper/ManagedAgentCommandHelper.java 18 Apr 2007 05:06:53 -0000 1.9 >+++ src/org/eclipse/tptp/monitoring/managedagent/provisional/helper/ManagedAgentCommandHelper.java 27 Apr 2007 03:45:50 -0000 >@@ -183,6 +183,18 @@ > }*/ > > public void getMetaData() throws Exception{ >+ try{ >+ _request = new CommandWrapper(); >+ _request.setOperationName(Constants.LOAD_META_DATA_COMMAND); >+ execute(_request); >+ }catch(Exception e){ >+ ManagedAgentPlugin.getDefault().log(Messages.getString("ManagedAgentCommandHelper.INVALID_MEX.WARN."), e, IStatus.WARNING); //$NON-NLS-1$ >+ // If this line will done uncommented than Service Group profiling >+ // will fail, since ResourceInspector says "The resource inspector can >+ // only process WSDLs with one service" >+ //throw e; >+ } >+ > boolean isServiceGroup = false; > Hashtable membersData = null; > try{ >@@ -226,17 +238,7 @@ > > getRelationships(); > getTopics(); >- try{ >- _request = new CommandWrapper(); >- _request.setOperationName(Constants.LOAD_META_DATA_COMMAND); >- execute(_request); >- }catch(Exception e){ >- ManagedAgentPlugin.getDefault().log(Messages.getString("ManagedAgentCommandHelper.INVALID_MEX.WARN."), e, IStatus.WARNING); //$NON-NLS-1$ >- // If this line will done uncommented than Service Group profiling >- // will fail, since ResourceInspector says "The resource inspector can >- // only process WSDLs with one service" >- //throw e; >- } >+ > > Hashtable propsMetaData = null; > try{ >#P org.eclipse.tptp.monitoring.managedagent.wsdm.muse >Index: src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/MetadataHelper.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.monitoring.managedagent.wsdm.muse/src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/MetadataHelper.java,v >retrieving revision 1.6 >diff -u -r1.6 MetadataHelper.java >--- src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/MetadataHelper.java 27 Apr 2007 00:39:22 -0000 1.6 >+++ src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/MetadataHelper.java 27 Apr 2007 03:45:50 -0000 >@@ -42,6 +42,23 @@ > _wsdls.put(epr, wsdl); > } > >+ public Element getWSDL(EndpointReference epr) throws Exception{ >+ try{ >+ Element wsdl = (Element) _wsdls.get(epr); >+ if(wsdl!=null) return wsdl; >+ }catch(Exception e){ >+ } >+ return retrieveWSDL(epr); >+ } >+ >+ private Element retrieveWSDL(EndpointReference epr) throws Exception{ >+ MetadataExchangeClient mdxClient = new MetadataExchangeClient(epr); >+ //mdxClient.setTrace(true); >+ Element wsdl = mdxClient.getWSDL(); >+ putWSDL(epr, wsdl); >+ return wsdl; >+ } >+ > public boolean doMetaDataExchange(WsResourceClient _resource) throws Exception { > if(_resource==null){ > return false; >@@ -55,9 +72,7 @@ > } > > if(wsdl==null){ >- MetadataExchangeClient mdxClient = new MetadataExchangeClient(_resource.getDestination()); >- //mdxClient.setTrace(true); >- wsdl = mdxClient.getWSDL(); >+ wsdl = retrieveWSDL(_resource.getDestination()); > } > > ResourceInspector inspector = new ResourceInspector(); >Index: src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/MuseRuntime.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.monitoring.managedagent.wsdm.muse/src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/MuseRuntime.java,v >retrieving revision 1.7 >diff -u -r1.7 MuseRuntime.java >--- src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/MuseRuntime.java 27 Apr 2007 00:39:51 -0000 1.7 >+++ src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/MuseRuntime.java 27 Apr 2007 03:45:50 -0000 >@@ -18,8 +18,6 @@ > import org.apache.muse.tools.inspector.ResourceInspector; > import org.apache.muse.util.xml.XmlUtils; > import org.apache.muse.ws.addressing.EndpointReference; >-import org.apache.muse.ws.dm.muws.MuwsConstants; >-import org.apache.muse.ws.metadata.remote.MetadataExchangeClient; > import org.apache.muse.ws.notification.WsnConstants; > import org.apache.muse.ws.resource.remote.WsResourceClient; > import org.apache.muse.ws.resource.sg.WssgConstants; >@@ -69,9 +67,7 @@ > > // however MAX is guaranteed to work only with resources that support MEX > // hence we will try to get the WSDL using MEX and use that as the ping >- MetadataExchangeClient mdxClient = new MetadataExchangeClient(_resource.getDestination()); >- //mdxClient.setTrace(true); >- Element wsdl = mdxClient.getWSDL(); >+ Element wsdl = _mHelper.getWSDL(_resource.getDestination()); > if(wsdl==null){ > emptyWSDL=true; > throw new Exception(); >@@ -84,10 +80,11 @@ > }catch(Throwable t){ > if(emptyWSDL){ > MuseRuntimePlugin.getDefault().log(Messages.getString("MuseRuntime.BAD_WSDL.ERROR."), t, IStatus.ERROR); //$NON-NLS-1$ >+ throw new Exception(Messages.getString("MuseRuntime.BAD_WSDL.ERROR."), t);//$NON-NLS-1$ > }else{ > MuseRuntimePlugin.getDefault().log(Messages.getString("MuseRuntime.CANT_CONN.ERROR."), t, IStatus.ERROR); //$NON-NLS-1$ >+ throw new Exception(Messages.getString("MuseRuntime.CANT_CONN.ERROR."), t);//$NON-NLS-1$ > } >- return false; > } > return true; > } >@@ -125,14 +122,12 @@ > Element wsdl; > Object result = null; > try { >- MetadataExchangeClient mdxClient = new MetadataExchangeClient(_resource.getDestination()); >- wsdl = mdxClient.getWSDL(); >+ wsdl = _mHelper.getWSDL(_resource.getDestination()); > inspector.run(wsdl); >- > result = inspector.invoke(_resource, operationQName, params); > } catch (Exception e) { > MuseRuntimePlugin.getDefault().log(Messages.getString("MuseRuntime.CANT_INVOKE.ERROR."), e, IStatus.ERROR); //$NON-NLS-1$ >- throw e; >+ throw new Exception(Messages.getString("MuseRuntime.CANT_INVOKE.ERROR."), e); > } > return result; > } >@@ -195,7 +190,7 @@ > public ArrayList getTopics() throws Exception{ > if(_resource==null) return null; > >- Element[] els = _resource.getResourceProperty(WsnConstants.TOPIC_EXPRESSION_QNAME); >+ _resource.getResourceProperty(WsnConstants.TOPIC_EXPRESSION_QNAME); > return _tHelper.getTopics(_resource); > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 167280
: 65143 |
65228