java-ws

what is a singleton class? Can it help me running single instance of a class for two related services?

自作多情 提交于 2020-01-01 19:55:14
问题 This might sound complex but i will ask anyway: I am running a service A which uses class X . I want to start another service B which uses classes A besides new classes. Service A is already running. I do a hot deployment of Service B . Here is the real question - Will Service B use the same instance of class X or a separate instance. How can singleton class help me here? 回答1: Each Service will run in it's own operating System (OS) Process space, and each process space has it's own class

How to cache a WSDL with Java-WS

纵然是瞬间 提交于 2019-12-22 08:28:52
问题 I've created an app that interacts with a SOAP service using java WS. I generate classes and manage the WSDL using the built in netbeans functions. Every time I run the application, it has to download the WSDL and parse it again. The WSDL is frozen at each version so I don't think this is necessary. I've tried to reference it as a local file, but then my app complains it can't find the file when it's installed on another machine. Does anyone know how I can stop Java WS needing to re-parse the

Closing StreamSource

浪尽此生 提交于 2019-12-13 03:49:02
问题 I was getting a too many open files error on my web service and just wanted to make sure that there's nothing else that I have to close. I added a close() on outWriter ( StringWriter ), but the JavaDoc said that this has no effect. getCachedExtractSoapBodyXslt() gets the javax.xml.transform.Transformer object. String payload; StreamResult result=null; StringWriter outWriter=null; try { // Programmatically extract the SOAP Body from message outWriter = new StringWriter(); result = new

How to use variables in JNLP arguments

旧时模样 提交于 2019-12-11 15:57:41
问题 Having the following sample jnlp: <?xml version="1.0" encoding="UTF-8"?> <jnlp spec="1.0+" codebase="$$codebase" href="$$name"> <information> <title>Some Example</title> <vendor>Some Sample Vendor</vendor> <homepage href="http://www.somesamplevendorhomepage.com"/> <description>Some Sample Description</description> <icon kind="splash" href="link_to_some_splash.jpg"/> <offline-allowed/> </information> <security> <all-permissions/> </security> <update check="always" policy="always"/>

Tweak loading times of Jersey over AppEngine

空扰寡人 提交于 2019-12-06 22:34:01
问题 my application service is not able to start or respond to even warmup requests as the time taken by Jersey to scan the libraries is inordinate. I have created application and hardcoded all the paths of the Resources for jersey. <servlet-name>Jersey REST Service</servlet-name> <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> <init-param> <param-name>javax.ws.rs.Application</param-name> <param-value>com.livily.rest.JerseyApplication</param-value> </init-param

How to cache a WSDL with Java-WS

烂漫一生 提交于 2019-12-05 14:02:40
I've created an app that interacts with a SOAP service using java WS. I generate classes and manage the WSDL using the built in netbeans functions. Every time I run the application, it has to download the WSDL and parse it again. The WSDL is frozen at each version so I don't think this is necessary. I've tried to reference it as a local file, but then my app complains it can't find the file when it's installed on another machine. Does anyone know how I can stop Java WS needing to re-parse the WSDL, or at least cache it locally? Cogsy I've figured it out... This page has the info Developing

How to log SOAP messages on client side?

早过忘川 提交于 2019-12-05 02:13:20
问题 Good day. I'm learning how to write a connector to external SOAP RCP styled service. I'm using jaxws-maven-plugin plugin to generate Java classes from the WSDL file. And I'm using Spring to create the web service client bean: @Configuration public class StoreServiceConfig { @Bean public StoreWS storeWS() throws IOException { JaxWsPortProxyFactoryBean factoryBean = new JaxWsPortProxyFactoryBean(); factoryBean.setServiceInterface(StoreWS.class); factoryBean.setWsdlDocumentUrl(new

what is a singleton class? Can it help me running single instance of a class for two related services?

断了今生、忘了曾经 提交于 2019-12-04 21:20:20
This might sound complex but i will ask anyway: I am running a service A which uses class X . I want to start another service B which uses classes A besides new classes. Service A is already running. I do a hot deployment of Service B . Here is the real question - Will Service B use the same instance of class X or a separate instance. How can singleton class help me here? Each Service will run in it's own operating System (OS) Process space, and each process space has it's own class instances. A "singleton" class is normally coded using static fields in a class, which would be local to the

XSD and WSDL in different directories

蓝咒 提交于 2019-12-04 12:26:10
问题 At my work used jaxws-maven-plugin for code generation. I have two projects are "common" and'' client ". Structure roughly as follows: app/ common/ resource/ some.xsd client/ resource/ some.wsdl How can I generate classes from wsdl in the project "client", using the xsd from the project "common"? pom.xml: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxws-maven-plugin</artifactId> <executions> <execution> <goals> <goal>wsimport</goal> </goals> <configuration> <verbose>true<

How can I get JAXB2 to emit CamelCase bindings?

安稳与你 提交于 2019-12-04 03:22:55
问题 I'm generating Java classes from a WSDL using the jaxws-maven-plugin's wsimport goal. Out of the box, this generates hideous classes and methods from the XML schema; e.g., a class called MYOBJECT from an XML element named MY_OBJECT. I've found that I can customize my JAXB2 bindings with an external file; this would be acceptable for a small number of classes and methods, but the overhead of manually naming everything in this case is undesirable. Some searching uncovers references to an XJC