java-metro-framework

Metro vs Java's JAX-WS?

依然范特西╮ 提交于 2019-11-28 23:56:18
问题 What is/are the difference/s of Java's JAX-WS and Metro? Are they the same of are they two different JAX-WS implementations? According to my research, JAX-WS is already a part of JDK 6. However, JAX-WS does not come with the standard bundle of JDK so I looked for a Java EE jar. However, it seems that Oracle does not host a compiled Java EE jar but instead provides Glassfish which is a Java EE server. I was able to run my web service on Glassfish. What JAX-WS implementation does Glassfish use?

Is this JAX-WS client call thread safe?

十年热恋 提交于 2019-11-28 20:14:23
Since initialization of the WS client service and port takes ages I like to initialize them once at startup and reuse the same instance of the port. Initalization would look something like this: private static RequestContext requestContext = null; static { MyService service = new MyService(); MyPort myPort = service.getMyServicePort(); Map<String, Object> requestContextMap = ((BindingProvider) myPort).getRequestContext(); requestContextMap = ((BindingProvider)myPort).getRequestContext(); requestContextMap.put(BindingProvider.USERNAME_PROPERTY, uName); requestContextMap.put(BindingProvider

Metro-like theme for WPF [closed]

一个人想着一个人 提交于 2019-11-28 19:52:56
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I would like to know where i can get the theme that looks like Zune application for Windows (or MetroTwit) for WPF. I google it but i

Are JAX-WS clients thread safe?

烂漫一生 提交于 2019-11-28 07:30:56
Because the initialization of the WS client side port is so costly we would like to reuse the same instance. We would also like to set different values in the BindingProvider/RequestContext before each call. Initially we would like to do this: MyService service = new MyService(wsdlURL, name); MyPort myPort = service .getMyServicePort(); then later, before each call do this: Map requestContext = ((BindingProvider)myPort ).getRequestContext(); requestContext.put(BindingProvider.USERNAME_PROPERTY, uName); requestContext.put(BindingProvider.PASSWORD_PROPERTY, pWord); myPort.someFunctionCall(); My

How can I make a WebMethod parameter required

浪子不回头ぞ 提交于 2019-11-27 18:22:08
We use the "start from Java" approach to creating JAX-WS 2.0 web services using the Metro 1.5 stack. When we point a standard tool like SoapUI at one of our web services it indicates that parameters to WebMethods are optional. The generated xsd shows minOccurs=0. I need a way to make WebMethod parameters required (maybe minOccurs=1 in the xsd) in the "start from Java" approach. I would think there is a Java annotation for this, but I haven't been able to find one. The XmlElement annotation has required attribute, but XmlElement cannot be applied to WebMethod parameters. Is there a way to make

Old JaxB and JDK8 Metaspace OutOfMemory Issue

风流意气都作罢 提交于 2019-11-27 13:33:48
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 reproduces this behavior: import java.io.ByteArrayInputStream; import javax.xml.bind.JAXBContext; import javax

What are the impacts of setting establishSecurityContext=“False” if i use https?

故事扮演 提交于 2019-11-27 13:09:43
My WFC service uses wsHttpBinding configured with: <security mode="TransportWithMessageCredential"> <message establishSecurityContext="True" clientCredentialType="UserName"/> <transport clientCredentialType="None" proxyCredentialType="None"/> </security> One of our partner is trying to invoke our services using the java the Metro library. They have this problem. I have to set establishSecurityContext="False" for this to work. We did a quick test and it works indeed when I set it to false. What would be the impacts of not using secure sessions (by setting establishSecurityContext="False"). I'm

Is this JAX-WS client call thread safe?

落花浮王杯 提交于 2019-11-27 12:47:40
问题 Since initialization of the WS client service and port takes ages I like to initialize them once at startup and reuse the same instance of the port. Initalization would look something like this: private static RequestContext requestContext = null; static { MyService service = new MyService(); MyPort myPort = service.getMyServicePort(); Map<String, Object> requestContextMap = ((BindingProvider) myPort).getRequestContext(); requestContextMap = ((BindingProvider)myPort).getRequestContext();

Java web service without a web application server

*爱你&永不变心* 提交于 2019-11-27 09:17:30
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 request, do I need to implement a http server? I would like to use the nice j2ee annotation such as

Are JAX-WS clients thread safe?

依然范特西╮ 提交于 2019-11-27 01:49:45
问题 Because the initialization of the WS client side port is so costly we would like to reuse the same instance. We would also like to set different values in the BindingProvider/RequestContext before each call. Initially we would like to do this: MyService service = new MyService(wsdlURL, name); MyPort myPort = service .getMyServicePort(); then later, before each call do this: Map requestContext = ((BindingProvider)myPort ).getRequestContext(); requestContext.put(BindingProvider.USERNAME