metro

JAXB marshals XML differently to OutputStream vs. StringWriter

I apologize if this has been answered, but the search terms I have been using (i.e. JAXB @XmlAttribute condensed or JAXB XML marshal to String different results) aren't coming up with anything. I am using JAXB to un/marshal objects annotated with @XmlElement and @XmlAttribute annotations. I have a formatter class which provides two meth...

Run webservice inside embedded grizzly webserver

HI all, I have written a web service which is running fine in java 6 embedded web server (com.sun.net.httpserver.HttpServer). I have now to switch to grizzly as the java server has a selection key bug, but I do not find any way how I can directly publish the webservice to grizzly. My code is now as following: final GrizzlyWebServer ws ...

How to execute a jax-ws soap request from a string or inputstream

Hi, I am using jax-ws ri (metro) and would like to execute a webservice call without an http container. I have an XML file containing the SOAP message (exactly the same as the HTTP POST BODY) and would like to execute in the same virtual machine a soap action. How can I do this? SOAP MESSAGE AS XML FILE -> WS Endpoint or Port -> SOAP M...

Netbeans webservice client works only when running from IDE

Using Netbeans 6.8 and metro 2.0 I have written a simple application that makes calls to a webservice and displays the results in java swing components. When I run the application in the Netbeans IDE (using F6), the application works perfectly. However, when I attempt to run the compiled application from the .jar file in the dist folde...

Java Metro Security: StreamMessage has been already consumed

I'm using metro 2.0.1 for a client application who connects to WCF Service With security. Everything works fine in my unit tests but when I call the method in my Java application I get the following exception: Exception in thread "main" java.lang.AssertionError: StreamMessage has been already consumed. See the nested exception for where...

Accessing XML payload of Metro 2.0 Request/Response Web Service

I am developing a web service, using Metro 2.0 and Tomcat 6, and I have a requirement to be able to log the XML payload of the request and response of a web method for development/support reasons. The payload would only be logged when in debug mode. The Web Service uses a servlet implementation (com.sun.xml.ws.transport.http.servlet.WS...

Calling External Web Service via a Servlet

The current architecture has a web application (in a WAR distribution), being used to provide information to the web client via a Servlet. This Servlet garners this information from an external service via Glassfish Metro (SOAP), and then formats it accordingly for the client (JavaScript). A proxy component (JAR) has been developed to m...

Using Metro, adding a MTOMFeature to client side causes a MIMEParsingException, why?

We have an MTOM-enabled web service that is published with Grails and the Metro 1.0.2 plugin: @MTOM @WebService(targetNamespace="http://com.domain") class TestService { @WebMethod int uploadFile(@XmlMimeType("application/octet-stream")DataHandler data) { data.dataSource.inputStream.eachLine { println "readi...

Optimizing inter service calls with Metro JAX-WS

We are working on a SOA Project. The different modules are built as web services on the jax-ws metro glassfish stack. The tables related to a module are owned by the web service for that module and all other services requiring the data from that table need to get it by calling the web service (instead of direct database call-that is the ...

Windows Phone 7 Styles on Desktop app

I' building an hobby project in WPF also decided to use Metro style theme to application. Is it possible to use Windows phone 7 styles in desktop application instead of recreating? ...

JAXBContext.newInstance memory leak

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.newInstanc...

Session with Metro WebService and Tomcat

Hi Folk, i'm trying to use session with metro webservice and tomcat but i have a strange issue, look at these line of code: MessageContext mc = wsCtxt.getMessageContext(); HttpSession session = ((javax.servlet.http.HttpServletRequest) mc.get(MessageContext.SERVLET_REQUEST)).getSession(); At the first call a session is created, at the ...

Sun Metro WebServices with Spring

I am using sun metro webservice stack with spring. every thing is working fine but i am unable customize namespace of the my service. my service always setting namespace as {http://www.springframework.org/schema/beans}. how do i customize my namespace for my service? ...

How to log SOAP messages which are sent by Metro stack

I'm trying to log my messages which are sent using a Metro stack into console. Could not find any way. ...

Troubleshoot | Webservice building using ANT

Hi, I've been given a Web-service written in Java using the metro web-stack. Now, I've written a ANT script to build the WSDL and generate a war file with the contents and deploy into my tomcat. When I run the server, it doesn't recognize the WSDL, is this a correct process? How do I deploy the WSDL and then generate the client stubs...

Different client cert per "customer" for web service client with Glassfish and Metro WS

There is a system (Web service server) we should call "in the name of the customer" with different client certificates. How can I use different client certificate per thread or "customer" in web service client? What is the best practice to do suchlike stuff? Could you provide some description or sample code? Where to store certs and how ...

Import location in wsit-client.xml to file in another jar, using an URL string to locate a file on the classpath

Normally the wsit-client.xml has import statements like this: <import location="foo.xml" namespace="http://foo.org/" /> I've found that their can be online one wsit-client.xml on the classpath/META-INF, but can I refer to an xml who's located into another jar in that wsit-client.xml? Something like : <import location="classPathResour...