Tag: jax ws

如何在Web服务中使用Moxy XPath带注释的bean?

我有一个豆子 @XmlRootElement(name = “alpha”) public class MyBean { private String thetaValue; @XmlPath(“beta/theta/text()”) public String getThetaValue() { return this.thetaValue; } public void setThetaValue(String thetaValue) { this.thetaValue = thetaValue; } } 这是使用eclipselink moxy jaxb注释的。 我想使用相同的bean和Xpath来托管Web服务。 我该怎么做呢? Web服务将托管在tomcat 6或7上

什么是JAX-WS拦截器(也称为处理程序)?

什么是JAX WS拦截器? 我在哪里可以找到相同的信息!

在多个服务之间重用CXF jaxb上下文

我有多个服务可以返回数千个类的结果。 由于每个CXF服务都包含一个私有的几乎相同的JAXB上下文,因此会造成巨大的内存浪费。 有没有办法自己创建JAXB上下文并在服务之间共享它?

java.lang.NoClassDefFoundError:com / sun / istack / localization / Localizable?

我尝试通过tomcat7运行我的项目。 通过jax ws maven插件生成我的webservices的wsdl文件(并且它由成功生成)但是尝试在浏览器中查看wsdl文件但不是结果。 我试图通过tomcat7服务器运行我的项目但是这个错误出现了,我没有解决这个问题我的错误: août 06, 2013 12:08:09 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0_21\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Program Files\MiKTeX 2.9\miktex\bin;%CommonProgramFiles%\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MATLAB\R2010a\runtime\win32;C:\Program Files\MATLAB\R2010a\bin;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Orant\bin;C:\Centrun;C:\LHS\BSCS_iX_R2_Demo;C:\LHS\BSCS_iX_R2_Demo\bin\win32;C:\LHS\BSCS_iX_R2_Demo\3pp\win32;C:\LHS\BSCS_iX_R2_Demo\TAO1.3aP12_WinXP\ACE_wrappers\bin;C:\LHS\BSCS_iX_R2_Demo\TAO1.3aP12_WinXP\ACE_wrappers\lib;C:\LHS\BSCS_iX_R2_Demo\jdk1.5.0_06\bin;C:\Program Files\apache-maven-3.1.0\bin;C:\Program Files\Common […]

Java:JAX-WS Mapping

我正在使用JAX-WS进行Web服务。 每当我使用char作为方法参数时,我将它作为xsd中的unsignedShort(Focus on weatherLetter)。 这是宣言: @WebMethod public boolean setWXtatus( @WebParam(name = “weatherLetter”) char weatherLetter, @WebParam(name = “weatherDigit”) int weatherDigit, @WebParam(name = “cloudCover”) int cloudCover, @WebParam(name = “cloudBaseInHundredsOfFeet”) int cloudBaseInHundredsOfFeet, @WebParam(name = “pressureInHg”) int pressureInHg, @WebParam(name = “visibilityInKm”) int visibilityInKm, @WebParam(name = “windSpeed”) int windSpeed, @WebParam(name = “windDirection”) int windDirection, @WebParam(name = “lastUpdateHour”) int lastUpdateHour, @WebParam(name […]

Wildfly:如何使用JAXWS-RI而不是Apache CXF(仅限WebService客户端)

我的环境是Maven Project和Wildfly(8.2.1)作为Application Server。 我需要的是使用SOAP将传入的REST调用连接到第三方服务器。 我需要SSL客户端身份validation; 因此,我有自己的KeyStore和TrustStore。 因此,我创建了自己的SSLContext,并且需要让WebService使用此SSLContext。 所有看起来像这样: // Build SSL context with own KeyManager / TrustManager SSLContext sc = SSLContext.getInstance(“TLS”); KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); KeyStore ks = KeyStore.getInstance(“JKS”); String password = “changeit”; ks.load(getClass().getResourceAsStream(“/keystore”), password.toCharArray()); kmf.init(ks, password.toCharArray()); TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); tmf.init(ks); sc.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); // Now build webservice client MyWS_Service service = new MyWS_Service(null, […]

在SLSB和JAX-WS中指定JAXB包

我正在使用SLSB和JAX-WS注释创建一个简单的SOAP Web服务。 我想传递的对象是从OGC模式生成的JAXB,感谢java.net上的OGC项目。 我遇到问题的一个特定方法(导致部署失败)是请求对象(GetResult)的字段(eventTime)与请求对象位于不同的包中的情况。 此类型的ObjectFactory是不同的,并且在编组/解组时存在问题。 我得到的错误的一个子集: There’s no ObjectFactory with an @XmlElementDecl for the element {http://www.opengis.net/ogc}temporalOps. this problem is related to the following location: at protected javax.xml.bind.JAXBElement net.opengis.sos.v_1_0_0.GetResult$EventTime.temporalOps at net.opengis.sos.v_1_0_0.GetResult$EventTime at protected java.util.List net.opengis.sos.v_1_0_0.GetResult.eventTime at net.opengis.sos.v_1_0_0.GetResult at public net.opengis.sos.v_1_0_0.GetResult net.opengis.sos.v_1_0_0.ObjectFactory.createGetResult() at net.opengis.sos.v_1_0_0.ObjectFactory 在标准的SE应用程序中,当我初始化JAXBContext时,一切都运行良好。 JAXBContext context = JAXBContext.newInstance(“net.opengis.sos.v_1_0_0:net.opengis.sensorml.v_1_0_1:net.opengis.sos.v_1_0_0.filter.v_1_1_0”); 如何在JAX-WS上下文中设置JAXB包? 我的app服务器/环境是GF 3.1。 谢谢您的帮助! 史蒂夫

关于weblogic 10.3.1的jaxws 2.1.5而不是预先安装的jaxws 2.1.1?

有可能,什么时候可以,怎么样?

CXF如何在没有Spring的情况下在CXF端口上设置SoapVersion

我目前正在使用没有Spring配置文件的CXF的Web服务客户端。 它工作得很好,但我无法弄清楚如何使用Java Api设置绑定SoapVersion。 使用Spring文件,如下所示: 你们知道如何在Java代码中实现这一点(在端口上,在SOAPBinding上……)? 在此先感谢您的帮助! 编辑 – – – – – – – – – – – 我仍然坚持这个问题…我试图在接口上添加SOAPBinding注释,如下面的响应之一所示,但它不起作用…我仍然在寻找一种手动配置我的方法PortType / Binding / Bus使用Soap 1.2 … 有任何想法吗? 编辑 – – – – – – – – – – – 问题解决了! 其实我回答了我自己的问题:见下文…… 谢谢!

如何为JAX-WS WebService调用设置超时

我正在使用WebService客户端,我想为我的WebService调用设置一个Timeout。 我尝试了不同的方法,但我仍然无法做到这一点。 我正在使用JAX-WS从WSDL生成代码。 我使用JBoss-eap-5.1作为App Server和JDK1.6.0_27。 我发现这些差异方法用于设置超时,但它们都不适用于我。 URL mbr_service_url = new URL(null,GlobalVars.MemberService_WSDL, new URLStreamHandler() { @Override protected URLConnection openConnection(URL url) throws IOException { URL clone_url = new URL(url.toString()); HttpURLConnection clone_urlconnection = (HttpURLConnection) clone_url.openConnection(); // TimeOut settings clone_urlconnection.setConnectTimeout(10000); clone_urlconnection.setReadTimeout(10000); return (clone_urlconnection); } }); MemberService service = new MemberService(mbr_service_url); MemberPortType soap = service.getMemberPort(); ObjectFactory factory = new ObjectFactory(); […]