metro

Problem consuming Exchange Web Service 2010 with jax-ws metro

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=u...

Is it possible to customize the namespace prefix that JAXB uses when marshalling to a String?

For example, I've got a simple schema which imports another schema. The second schema (urn:just:attributes, just-attributes.xsd) just defines an attribute group. <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/MySchema" xmlns:tns="http://www.exampl...

Metro UsernameToken Policy

I created a web services client prototype using api's available in weblogic 10.3. I've been told I need to use Metro 2.0 instead (it's already being used for other projects). The problem I have encounter is that the WSDL does not include any Security Policy information but a UsernameToken is required for each method call. In weblogic I w...

How to pick CXF over Metro on Glassfish

Hello all, I'm having the following problem (reported there by someone else) when running my webapp under Glassfish, while 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 no...

Eclipse RCP classloading problem with Metro

Hello, I am attempting to invoke a web service using the Metro library (https://metro.dev.java.net/) from within an Eclipse RCP application. I bundled the relevant Metro jars (webservices-tools.jar, webservices-rt.jar, and webservices-api.jar) into a plugin and made my main application plugin depend on this new Metro plugin. I also add...

Can a web service call another web service in the same application server

I'm using Netbeans 6.5 to generate the JAX-WS Metro service and Glassfish 2.1 as the application server. Assume I have two web services e.g. ... @WebMethod(operationName = "doXXX") public String doXXX( @WebParam(name = "id") String id ... ... @WebMethod(operationName = "doYYY") public String doYYY( @WebParam(name = "result") Stri...

How can I make a WebMethod parameter required

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

What is the difference between Metro 1.5 and 2.0?

In a web service client project I am working on, I noticed that the Metro stack has been released in a 2.0 version, where we use 1.4. The documentation is not very approachable for people not intimately familiar with the project. What is the reason for the version bump, and is it worth it upgrading to the latest version? ...

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

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

What does the xendorsed attribute do for wsgen and wsimport?

I'm working simultaneously on projects using Metro 1.5 and Metro 2.0. I have not upgraded my JDK to Metro 2.0. When I run the Metro 2.0 version of wsgen or wsimport (from Ant) I get an Exception saying that I either need to upgrade my SDK or add xendorsed="true" to the Ant wsgen / wsimport targets. I can't upgrade the SDK to use Metro ...

Ws-Security headers using Metro

I have a web service which implements WS-Security but does not define a policy in the WSDL. I am able to consume this web service successfully using Axis 2 as client. I am trying to consume the same web service using Metro 2 but the wsse:security headers are not going. It works only if the service defines the security policy which is no...

How to secure Java webservices with login and session handling

I'd like to secure my (Java metro) webservice with a login. Here's how I'm planning to do that: Steps required when calling a webservice method are: call login(user,pwd), receive a session token 1.1 remember the token call servicemethod (token, arg1, arg2...) webservice checks if the token is known, if not throw exception otherwise p...

ASP.NET client to stateful java webservice client (metro)

Hi I have a webservice with the following annotations: @WebService @HttpSessionScope @Stateful @Addressing Now I created a ASP.NET (c#) client for this webservice, but when I call a method the following error is returned: This is a stateful web service and {http://jax-ws.dev.java.net/xml/ns/}objectId header is required. How can I...

Using Glassfish libraries in proprietary software

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-no? I mean, according to ...

Metro & StreamBuffer namespace error - am I understanding this correctly?

All, I'm (still) working on calling a WSE 3.0 .NET web service from Java/Metro 2.0. We've got the security requirements set so that we're encrypting the body & header of the messages & signing the headers. I'm able to send a request to their service & get a response, but Metro is unable to validate the signature & throws an error fro...

Metro web services on Google App Engine

Has anyone tried to implement Metro web services on GAE-Java. It is not lsited on http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine and I would like to know if GAE will support it ...

Has anyone gotten jax-ws-catalog.xml to resolve schemaLocation locally on Metro?

I have added a jax-ws-catalog.xml to my .war file in order to resolve the schemaLocation locally instead of remotely in . I've followed the example at https://jax-ws.dev.java.net/guide/Developing_client_application_with_locally_packaged_WSDL.html When I deploy the .war and use soapUI to validate the web service it gets stuck trying to...

Why would I want to use anything other than WCF?

After completing several small projects with WCF, I'm quite happy with what it can do. However, having spent a brief amount of time looking into the alternatives, I'm struggling to find exactly what benefits/drawbacks I would experience from using Java based web services such as AXIS2 or Metro? Obviously open-source is perhaps one of t...

Java Client interoperating with WSE 3.0 Web Service

I have a Interoperable Security Token Service (STS) that authenticates the User and then issues a SAML token. I also have transaction services that expects the SAML token in the incoming SOAP request header. For a client to make a call to transaction service, it first needs to authenticate with the STS, get the SAML token and then make ...

Glassfish JAX-WS side by side SSL / insecure EJB webservice

Is it possible to run a single @WebService bean as both secure and insecure at the same time, preferably using the same URL except for the http/https protocol difference? I am able to run the service either secure or insecure using: <transport-guarantee>CONFIDENTIAL</transport-guarantee> or <transport-guarantee>NONE</transport-guara...