java-metro-framework

Is it possible to get the raw XML payload using Metro web services framework?

…衆ロ難τιáo~ 提交于 2019-12-11 18:03:34
问题 I'm writing a web service client that runs in Apache Tomcat. I need to get the XML payload for the request/response so that I can log it. Dumping the bytes to stdOut is not what I want. I want to get it as bytes in my Java code, so that I can log it the way that I want. Is there any way to do this? 回答1: Yes, there is. It is one of main purposes of JAX-WS handlers. You will not get XML payload as raw bytes, but formatted; however if you want it is easy to turn it into raw bytes again. An

java.util.Date property rendered as xs:string in xsd using JAX-WS (Apache CXF / Metro)

帅比萌擦擦* 提交于 2019-12-11 13:15:12
问题 I generated some model classes based on a WSDL using apache cxf. I then added a jaxb bindingfile to convert all xs:dateTime and xs:date elements to java.util.date (instead of the default XMLGregorianCalendar): <jxb:javaType name="java.util.Date" xmlType="xs:date" parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDate" printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDate"/> <jxb:javaType name="java.util.Date" xmlType="xs:dateTime" parseMethod="org.apache.cxf.tools

JMX MBeans not visible after deploy

泄露秘密 提交于 2019-12-11 12:09:32
问题 ENVIRONMENT NetBeans 6.9.1, GlassFish 3.1, METRO 2.1 I want to make a list of available web services, so I'm querying JMX MBeanServer for *:type=WSEndpoint,* . The problem is, there are only ~56 Mbeans after deploy, and WSEndpoint beans are not registered. If I connect with JMXterm, the MBean count jumps up to ~380, and all WSEndpoint beans are visible. From JConsole, I don't see any folder , but after running JMXterm I do. Even if I call the web service, the MBeans stay unregistered. METRO

Metro + Jetty + OSGi = pain

烈酒焚心 提交于 2019-12-10 12:00:03
问题 I am trying to swap out Sun's HTTPServer for the much better Jetty server, within an OSGi bundle, running on Equinox. I have tried this: System.setProperty("com.sun.net.httpserver.HttpServerProvider","org.mortbay.jetty.j2se6.JettyHttpServerProvider"); but when endpoint.publish(url) is called, and the server is spawned, it complains of a ClassNotFoundException for org.mortbay.jetty.j2se6.JettyHttpServerProvider. However, the correct jars are in the bundle, and indeed in the Activator I can

Calling a .NET web service (WSE 3.0, WS-Security) from JAXWS-RI

烈酒焚心 提交于 2019-12-10 11:54:55
问题 I'm writing a JAXWS-RI client that must call a .NET Web Service that is using WS-Security. The service's WSDL does not contain any WS-Security info, but I have an example soap message from the service's authors and know that I must include wsse:Security headers, including X:509 tokens. I've been researching, and I've seen example of folks calling this type of web service from Axis and CXF (in conjunction with Rampart and/or WSS4J), but nothing about using plain JAXWS-RI itself. However, I'm

Override JAX-WS version used by Weblogic 10 - Dynamic WSDL with inline schemas

一曲冷凌霜 提交于 2019-12-09 17:21:46
问题 Has anyone successfully updated the JAX-WS version used by Weblogic 10.3.3? I've been trying to do what's described in the accepted answer from here for hours with no luck. I'm using Maven to resolve my dependencies and I've tried with combinations of the following libraries in my WAR module (Web service project): <dependency> <groupId>javax.xml.ws</groupId> <artifactId>jaxws-api</artifactId> <version>2.2.8</version> </dependency> <dependency> <groupId>com.sun.xml.ws</groupId> <artifactId

Using Glassfish libraries in proprietary software [closed]

≯℡__Kan透↙ 提交于 2019-12-09 11:01:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I would like to use some parts of Glassfish in a proprietary software that are under a CDDL + GPLv2 license. Am I allowed to do that? I haven't modified anything in the code of these libraries, so is this OK, or my software, because it uses these libraries, is still considered derivative work, and thus a big no

Compile WS client in Java 1.5 - Missing WebService -like annotations

删除回忆录丶 提交于 2019-12-08 00:13:48
问题 I am developing an application which should serve as a client to a Web Service. I have generated source files based on the WSDL file using the wsimport utility. It works fine on my development machine with JDK 1.7 (e.g. it compiles and runs fine). I cannot even compile the application in the test environment though, where I have JDK 1.5. I get a bunch of errors like the following: Cannot find symbol: class WebMethod Is suspect the problem is with the lesser version of JDK. What should I do to

Staying DRY with JAXB

Deadly 提交于 2019-12-07 08:01:01
问题 I'm developing a number of Java classes that must serialize to XML in the following format: <foo value="123"/> <!-- or this --> <bar value="abc"/> <!-- or this --> <baz value="true"/> In the beginning, Foo.java looked something like this: @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) class Foo { @XmlAttribute String value; // snip constructors // snip methods // getValue // equals, hashCode, toString // static valueOf(String), static valueOf(int) } It doesn't take much imagination to

Generating Metro Client Using Local WSDL File

家住魔仙堡 提交于 2019-12-07 03:25:12
问题 I have generated a Metro client using wsimport before, but in that case the WSDL was accessed over https. My commaned looked like this: wsimport https://service.net/services/Service?wsdl -d C:\ClientProject\src\main\java -keep and everything worked fine. Now I am trying to generate a client, however, I only have a local copy of the WSDL file. My project directory is set up like this (in c:\Devel): ClientProject |- src |- main |- java |- resources |- META-INF |- service.wsdl |- wsimport.bat