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 65130 Details for
Bug 167535
MAX tries to do a getResourcePropertyDocument when establishing a connection
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]
Do MEX instead of getResourcePropertyDocument on connect
167535.patch (text/plain), 4.40 KB, created by
Balan Subramanian
on 2007-04-26 20:15:14 EDT
(
hide
)
Description:
Do MEX instead of getResourcePropertyDocument on connect
Filename:
MIME Type:
Creator:
Balan Subramanian
Created:
2007-04-26 20:15:14 EDT
Size:
4.40 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.monitoring.managedagent.wsdm.muse >Index: src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/messages.properties >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.monitoring.managedagent.wsdm.muse/src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/messages.properties,v >retrieving revision 1.3 >diff -u -r1.3 messages.properties >--- src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/messages.properties 21 Mar 2007 21:30:17 -0000 1.3 >+++ src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/messages.properties 27 Apr 2007 00:14:45 -0000 >@@ -13,7 +13,8 @@ > # NLS_MESSAGEFORMAT_VAR > # NLS_ENCODING=UTF-8 > >-MuseRuntime.CANT_CONN.ERROR.=IWAT0758E Cannot connect to WSDM resource >+MuseRuntime.CANT_CONN.ERROR.=IWAT0758E Cannot connect to WSDM resource because resource does not support Metadata Exchange. Please see stack trace for exception thrown by resource. >+MuseRuntime.BAD_WSDL.ERROR.=IWAT0882E Cannot connect to WSDM resource because resource returned empty or bad WSDL during Metadata Exchange. > MuseRuntime.CANT_CREATE_DISP_NAME.ERROR.=IWAT0759E Cannot create display name > MuseRuntime.CANT_INVOKE.ERROR.=IWAT0760E Cannot invoke WSDM operation > ServiceGroupHelper.NOT_SG_RESOURCE.INFO.=IWAT0761I This resource is not a service group >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.5 >diff -u -r1.5 MuseRuntime.java >--- src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/MuseRuntime.java 22 Mar 2007 06:11:00 -0000 1.5 >+++ src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/MuseRuntime.java 27 Apr 2007 00:14:45 -0000 >@@ -48,17 +48,33 @@ > } > > public boolean connect(String epr) throws Exception { >+ boolean emptyWSDL = false; > try{ > Document doc = XmlUtils.createDocument(epr); > Element eprEl = XmlUtils.getFirstElement(doc); > _epr = new EndpointReference(eprEl); > _resource = new WsResourceClient(_epr); > >- // try to get the resource properties document to check the connection >- _resource.getResourcePropertyDocument(); >+ // 167535: all WS-resource may not have resource property documents so we cannot >+ // rely on getResourcePropertyDocument as a ping mechanism >+ // _resource.getResourcePropertyDocument(); >+ // 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(); >+ if(wsdl==null){ >+ emptyWSDL=true; >+ throw new Exception(); >+ } >+ > //_resource.setTrace(true); > }catch(Throwable t){ >- MuseRuntimePlugin.getDefault().log(Messages.getString("MuseRuntime.CANT_CONN.ERROR."), t, IStatus.ERROR); //$NON-NLS-1$ >+ if(emptyWSDL){ >+ MuseRuntimePlugin.getDefault().log(Messages.getString("MuseRuntime.BAD_WSDL.ERROR."), t, IStatus.ERROR); //$NON-NLS-1$ >+ }else{ >+ MuseRuntimePlugin.getDefault().log(Messages.getString("MuseRuntime.CANT_CONN.ERROR."), t, IStatus.ERROR); //$NON-NLS-1$ >+ } > return false; > } > return true; >@@ -157,10 +173,10 @@ > if(_resource==null) return null; > // providesCapability works only for WSDM resources, but this has to be a wsdm resource to > // have relationships (MUWS Part 2) >- if(!CommonUtils.providesCapability(_resource, MuwsConstants.RELATIONSHIP_RESOURCE_URI)){ >+ /* if(!CommonUtils.providesCapability(_resource, MuwsConstants.RELATIONSHIP_RESOURCE_URI)){ > System.out.println("This is not a relationships resource"); //$NON-NLS-1$ > //throw new Exception("Not a relationship resource"); >- } >+ }*/ > return _rHelper.getRelationships(_resource); > } > >@@ -168,10 +184,6 @@ > if(_resource==null) return null; > > Element[] els = _resource.getResourceProperty(WsnConstants.TOPIC_EXPRESSION_QNAME); >- if( els == null || els.length <= 0 ){ >- System.out.println("No topics defined"); >- } >- > 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 167535
:
65130
|
65131
|
65132