问题描述
小弟新开发Eclipse插件,插件中需要调用jax-ws访问webservice。我用MyEclipse6.5自动生成访问webservice的客户端。通过代码this.wslibDelegate=newWebServiceSearchService().getWebServiceSearchPort();获得访问webserviceport的代理。我把界面程序独立运行为SWT程序或者Java程序时,一切都是正常的。但是当我通过下面代码将界面运行为Action插件的时候,就会阻塞在上面的代码地方.publicvoidrun(IActionaction){try{WebServiceSearchLibUIwssearchUI=newWebServiceSearchLibUI();wssearchUI.setDisplay(this.window.getShell().getDisplay());this.window.getShell().getDisplay().syncExec(wssearchUI);}catch(Exceptione){e.printStackTrace();}WebServiceSearchService().getWebServiceSearchPort()的代码如下:@WebEndpoint(name="WebServiceSearchPort")publicWebServiceSearchDelegategetWebServiceSearchPort(){returnsuper.getPort(newQName("http://pku.webservicesearch/","WebServiceSearchPort"),WebServiceSearchDelegate.class);}小弟新开发Eclipse插件,还希望各位大侠指教。:)
解决方案
解决方案二:
没有做过插件开发,路过,学习一下。
解决方案三:
我已开发过9个myeclipse的插件开发。你所说的有webserviceport我不是很清楚。也不理解你要什么样的帮助。我用plugin-build.xml<?xmlversion="1.0"encoding="UTF-8"?><projectname="com.codestyle"default="build.update.jar"basedir="."><propertyfile="ant-build.properties"/><!--Compilersettings.--><propertyname="javacFailOnError"value="false"/><propertyname="javacDebugInfo"value="on"/><propertyname="javacVerbose"value="false"/><propertyname="logExtension"value=".log"/><propertyname="compilerArg"value=""/><propertyname="javacSource"value="1.5"/><propertyname="javacTarget"value="1.5"/><conditionproperty="dir_bootclasspath"value="${java.home}/../Classes"><osfamily="mac"/></condition><propertyname="dir_bootclasspath"value="${java.home}/lib"/><pathid="path_bootclasspath"><filesetdir="${dir_bootclasspath}"><includename="*.jar"/></fileset></path><propertyname="bootclasspath"refid="path_bootclasspath"/><propertyname="bundleJavacSource"value="${javacSource}"/><propertyname="bundleJavacTarget"value="${javacTarget}"/><propertyname="bundleBootClasspath"value="${bootclasspath}"/><targetname="init"depends="properties"><conditionproperty="pluginTemp"value="${buildTempFolder}/plugins"><issetproperty="buildTempFolder"/></condition><propertyname="pluginTemp"value="${basedir}"/><conditionproperty="build.result.folder"value="${pluginTemp}/com.codestyle_1.0.0"><issetproperty="buildTempFolder"/></condition><propertyname="build.result.folder"value="${basedir}"/><propertyname="temp.folder"value="${basedir}/temp.folder"/><propertyname="plugin.destination"value="${basedir}"/></target><targetname="properties"if="eclipse.running"><propertyname="build.compiler"value="org.eclipse.jdt.core.JDTCompilerAdapter"/></target><targetname="build.update.jar"depends="init"description="Buildtheplug-in:com.codestyleforanupdatesite."><deletedir="${temp.folder}"/><mkdirdir="${temp.folder}"/><antcalltarget="clean"/><antcalltarget="build.jars"/><antcalltarget="gather.bin.parts"><paramname="destination.temp.folder"value="${temp.folder}/"/></antcall><jardestfile="${plugin.destination}/comcodestyle_1.0.0.jar"basedir="${temp.folder}/com.nancodestyle_1.0.0"filesetmanifest="merge"><excludename="ant-build.properties"/><excludename="ant-build.xml"/><excludename="plugin-build.xml"/><excludename="export-build.xml"/></jar><deletedir="${temp.folder}"/></target><targetname="@dot"depends="init"unless="@dot"description="Createjar:com.codestyle@dot."><deletedir="${temp.folder}/@dot.bin"/><mkdirdir="${temp.folder}/@dot.bin"/><pathid="@dot.classpath"><pathelementpath="${plugins.dir}/org.eclipse.core.runtime.compatibility.auth_3.2.100.v20070502.jar"/><pathelementpath="${plugins.dir}/org.eclipse.equinox.app_1.0.1.R33x_v20070828.jar"/><pathelementpath="${plugins.dir}/org.eclipse.osgi.services_3.1.200.v20070605.jar"/><pathelementpath="${plugins.dir}/org.eclipse.swt_3.3.1.v3346j.jar"/><pathelementpath="${plugins.dir}/org.eclipse.swt.win32.win32.x86_3.3.1.v3346i.jar"/><pathelementpath="${plugins.dir}/org.eclipse.jface_3.3.1.M20070910-0800b.jar"/><pathelementpath="${plugins.dir}/org.eclipse.core.commands_3.3.0.I20070605-0010.jar"/><pathelementpath="${plugins.dir}/org.eclipse.ui.workbench_3.3.1.M20070921-1200.jar"/><pathelementpath="${plugins.dir}/org.eclipse.ui.workbench.compatibility_3.2.0.I20070319-0010/@dot"/><pathelementpath="${plugins.dir}/org.eclipse.ui.workbench.compatibility_3.2.0.I20070319-0010/compatibility.jar"/><pathelementpath="${plugins.dir}/com.ibm.icu_3.6.1.v20070906.jar"/><pathelementpath="${plugins.dir}/org.eclipse.help_3.3.1.v20070726_33x.jar"/><pathelementpath="${plugins.dir}/org.eclipse.core.expressions_3.3.0.v20070606-0010.jar"/><pathelementpath="${plugins.dir}/org.eclipse.jface.databinding_1.1.1.M20070910-0800b.jar"/><pathelementpath="${plugins.dir}/org.eclipse.core.databinding_1.0.1.M20070822-0800.jar"/><pathelementpath="${plugins.dir}/org.eclipse.core.resources_3.3.0.v20070604.jar"/></path><!--compilethesourcecode--><!--Copynecessaryresources--><copytodir="${temp.folder}/@dot.bin"failonerror="true"overwrite="false"><filesetdir="src/"><excludename="**/*.java"/><excludename="**/package.htm*"/></fileset></copy><mkdirdir="${build.result.folder}"/><copytodir="${build.result.folder}/@dot"failonerror="true"overwrite="false"><filesetdir="${temp.folder}/@dot.bin"></fileset></copy><deletedir="${temp.folder}/@dot.bin"/></target><targetname="build.jars"depends="init"description="Compileclassesandbuildnestedjarsfortheplug-in:com..codestyle."><availableproperty="@dot"file="${build.result.folder}/@dot"/><antcalltarget="@dot"/></target><targetname="gather.bin.parts"depends="init"if="destination.temp.folder"><mkdirdir="${destination.temp.folder}/com.codestyle_1.0.0"/><copytodir="${destination.temp.folder}/com.codestyle_1.0.0"failonerror="true"overwrite="false"><filesetdir="${build.result.folder}/@dot"><includename="**"/></fileset></copy><copytodir="${destination.temp.folder}/com.codestyle_1.0.0"failonerror="true"overwrite="false"><filesetdir="${basedir}"><includename="plugin.xml"/><includename="META-INF/"/><includename="lib/checkstyle-all-4.4.jar"/><includename="lib/checkstyle-optional-4.4.jar"/></fileset></copy></target><targetname="clean"depends="init"description="Cleantheplug-in:com.codestyleofallthezips,jarsandlogscreated."><deletedir="${build.result.folder}/@dot"/><deletefile="${plugin.destination}/com.codestyle_1.0.0.jar"/><deletedir="${temp.folder}"/></target></project>
plugin.xml:[code=XML]<?xmlversion="1.0"encoding="UTF-8"?><?eclipseversion="3.2"?><plugin><extensionid="CodeStyleChecker"name="代码规范检查"point="org.eclipse.core.resources.builders"><builderhasNature="false"><runclass="com.codestyle.CodeStyle"></run></builder></extension><extensionid="StyleError"name="StyleError"point="org.eclipse.core.resources.markers"><supertype="org.eclipse.core.resources.problemmarker"></super><persistentvalue="true"></persistent></extension><extensionpoint="org.eclipse.ui.popupMenus"><objectContributionadaptable="true"objectClass="org.eclipse.core.resources.IProject"nameFilter="*"id="com.codestyle.contribution1"><actionlabel="添加/删除代码规范检查"class="com.codestyle.ToggleStyleCheckAction"menubarPath="additions"enablesFor="999"id="com.codestyle.addRemoveCodeStyleAction"></action></objectContribution></extension></plugin>