users@jax-ws.java.net

Re: how to annotate a Java SE based endpoint with MemberSubmissionAddressing?

From: Owen Hall <owen.hall_at_oracle.com>
Date: Sun, 26 Feb 2012 13:53:53 -0800

I'm not using an IDE at all. I'm compiling from the command line.
Beginning in Java 6, the Sun JDK does not compile against rt.jar but
against ct.sym. This file does not contain Sun implementation
private/proprietary API classes in rt.jar and unfortunately
MemberSubmissionAddressing is not listed in ct.sym (which, again, is in
the package com.sun.xml.*internal*.ws.developer with the JRE and not in
the package com.sun.xml.ws.developer as it is with the unbundled version
of JAX-WS RI). I've just now learned you can override this behavior
using the undocumented option "-XDignore.symbol.file=true".

If you are able to compile using
"com.sun.xml.ws.developer.MemberSubmissionAddressing" then I'm inclined
to believe your JDK is using the Java Endorsed Standards Override
Mechanism where the unbundled JAX-WS RI api jar files have been placed
in $JAVA_HOME/lib/endorsed or the system property java.endorsed.dirs is
being set to $JAXWS_HOME/lib.

This is described in this post --

http://weblogs.java.net/blog/ramapulavarthi/archive/2007/01/problems_using.html

On 2/26/2012 4:38 AM, Andreas Loew wrote:
> Hi Owen,
>
> Am 25.02.2012 01:26, schrieb owen.hall_at_oracle.com:
>> I'm want to use MemberSubmissionAddressing for a Java SE based
>> endpoint. The annotation is in this Java SE package --
>> com.sun.xml.internal.ws.developer. There is no way to import this
>> package with Java 6 SE because it is implementation private. How are
>> you supposed to use this annotation then? I thought there might be a
>> builder in javax.xml.ws.wsaddressing but there isn't. I'm completely
>> stumped as to how to use this type of addressing.
>
> hmm - it looks to me like you are fooled by your IDE of choice (which
> one is that? just tested and have no issues accessing this annotation
> from NetBeans 7.1...) here and are running into an IDE-based
> restriction which tries to lock you away from using so-called
> "internal" APIs.
>
> I think you have two choices:
>
> * Add a recent Metro version to your runtime environment and use
> Metro's official class
> com.sun.xml.ws.developer.MemberSubmissionAddressing (note that you can
> still use a Java SE-style "standalone" endpoint when doing so)
> * Reconfigure your IDE somehow to make it allow you to access classes
> from "internal" packages.
>
> HTH & best regards,
>
> Andreas
>