java-metro-framework

JAXBContext.newInstance memory leak

こ雲淡風輕ζ 提交于 2020-01-09 19:50:14
问题 After a recent deployment in system test, one of our servlets was getting hit much harder than usual and we noticed memory started climbing and weblogic would eventually die. My intern, I was very proud, discovered the source of the memory leak. Whenever a request comes in, this line gets called: JAXBContext jc = JAXBContext.newInstance(“ruby.oracle_servlet.schemas”); For some reason, the object never gets garbage collected. Once we made it static and moved where we initialized it, our memory

How to change JAVAX-WS Endpoint binding to SOAP 1.2?

荒凉一梦 提交于 2019-12-29 06:46:11
问题 I'm publishing a test WS implementation using Endpoint.publish() for consumption in Visual Studio. According to the documentation the default SOAP binding is 1.1 and it is possible to change the bindings, but I can't figure out specifically how to change the binding to 1.2 . Any help is appreciated! 回答1: With JAX-WS 2.x you can either enable SOAP 1.2 via config file or via Java 5 annotation. See here (original, now broken link) for more details. 来源: https://stackoverflow.com/questions/5821762

Java web service without a web application server

六月ゝ 毕业季﹏ 提交于 2019-12-28 03:06:14
问题 We have a message processing server, which start a few threads processing the message interact with the database etc..... now the client want to have a web service server on the server, they will be able to querying the message processing server, with a web service client. e.g. give me all the messages for today, or delete the message with id.... the problem are: The server just a standard j2se application, doesn't run inside application server, like tomcat or glassfish. To handle a Http

Programmatically read encrypted error messages from webservice using metro 2.3

不打扰是莪最后的温柔 提交于 2019-12-22 00:03:19
问题 Using METRO 2.3 in Netbeans with WS-Security I try to read error messages of an encrypted webservice. The communication works fine until my payload contains errors. Then the server sends an encrypted error message with the information what went wrong. My client tries to decrypt it and understands that the message got another structure than expected and throws an XMLSignatureException: javax.xml.crypto.dsig.XMLSignatureException: WSS1717: Error occurred while doing digest verification of body

How to pick CXF over Metro on Glassfish

佐手、 提交于 2019-12-21 04:42:35
问题 I'm having the following problem (reported there by someone else) when running my enterprise application under Glassfish. Under Jetty it works fine. javax/xml/ws/spi/Provider mentions creating a META-INF/services/javax.xml.ws.spi.Provider resource, but this is already supplied with CXF and creating an additional resource file does not solve this problem under Glassfish. Does anyone know how to ensure that CXF is picked up under GlassFish? (I'm using a Maven Multi-modules project with CXF

Old JaxB and JDK8 Metaspace OutOfMemory Issue

允我心安 提交于 2019-12-17 10:44:46
问题 We are working on a business application (1 million+ LOC) developed since 10+ years. While switching to JDK8 we get an issue with the metaspace of JDK8. This seems to be related to the JaxB-Version referenced in com.sun.xml.ws:webservices-rt:1.4 (Metro 1.4). Because of the intense linking in the application and legacy creation of classes/instances via JaxB it isn't simple to switch on the fly the old libraries. Currently we are researching this issue. We created a sample programm that

Error while serializing Timestamp element occured while performing canonicalization

非 Y 不嫁゛ 提交于 2019-12-13 04:50:48
问题 I have webservice developed in metro 2.1 , glassfish-server 3.1. Exception at the server side. [#|2015-01-30T08:00:37.325- 0500|SEVERE|glassfish3.1.1|com.sun.xml.wss.logging.impl.opt|_ThreadID=26;_ThreadName=Thread-2;|WSS1609: Error while serializing Timestamp element|#] [#|2015-01-30T08:00:37.330-0500|SEVERE|glassfish3.1.1|com.sun.xml.wss.logging.impl.opt.signature|_ThreadID=26;_ThreadName=Thread-2;|WSS1759: Following error com.sun.xml.wss.XWSSecurityException: WSS1609: Error while

How to invoke metro web services in weblogic 10.3.5?

二次信任 提交于 2019-12-13 03:17:09
问题 I have two web applications (bot of them ear files) deployed on the weblogic server. One of them is a web service application and the other is a web service client. METRO is used for the web services. The web service application is running properly. When I try to deploy the web service client application, I am getting the following error. <Dec 14, 2011 9:51:25 AM GMT+05:30> <Error> <WLSS.Setup> <BEA-331210> <Skip SIP related logic, because error occurs when parsing sip related annotatio ns of

Problem consuming Exchange Web Service 2010 with jax-ws metro

青春壹個敷衍的年華 提交于 2019-12-13 00:16:06
问题 I am trying to consume the Exchange 2010 Web Service interface using JAX-WS. I'm using JAX-WS 2.2 RI (Metro 2.0). 2.1 exhibited the same problem. I am running into trouble with Exchange, which returns "HTTP/1.1 415 Cannot process the message because the content type 'text/xml;charset=utf-8' was not the expected type 'text/xml; charset=utf-8'." as a reponse (2.1 quoted the charset value, otherwise same response). Apparently I need to dictate the exact Content-type header for Exchange to be

How to use @Resource WebServiceContext injection with Spring's @Transactional

流过昼夜 提交于 2019-12-12 10:45:10
问题 I hava a Metro jax-ws webservice that looks more or less like this: @WebService @Transactional public class UserManagementServiceImpl { @Resource private WebServiceContext context; ... } The WebServiceContext is allways null. However, if I remove @Transactional the WebServiceContext is injected. Anybody knows a workaround? Thanks. 回答1: I've found a workaround. Use setter injection instead of field injection: @WebService @Transactional public class UserManagementServiceImpl { private