Hi,

My understanding is that the spec treats the uri of endpoint from the referenced WSDL and uri of wsa:Address from the wsa:EndpointReference at the same level (Line 73, Item 1 of the WS binding spec uses "or"). Therefore, these two are exclusive.

Anyway, I agree with you the spec is not clear. Let's bring it up to spec guys to clarify before we change the code.

Thanks,
Raymond

----- Original Message ----- From: "ant elder" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, July 15, 2007 2:23 AM
Subject: Re: svn commit: r556249 - /incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/axis2/Axis2ServiceBindingProvider.java


For a similar reason as line 84/85 says "...the wsdlElement attribute must
refer to a binding element in the WSDL and not an endpoint or service"? I
agree the spec isn't 100% clear but it seems a mistake to me that line 85
doesn't continue on saying a similar thing for the uri attribute. If you do specify both the wsdl port and a uri then the uri is completely and silently ignored which i've found quite confusing in the past and likely other users
may too.

How about keeping the exception for now until we have our logging strategy
in place and then changing it so a warning msg is produced instead of
throwing the exception?

   ...ant

On 7/14/07, Raymond Feng <[EMAIL PROTECTED]> wrote:

Hi, Ant.

It was me who commented out the code when I debugged a test case and ran
into this exception. The WS binding spec says the following:

"The rules for resolving the URI at which an SCA service is hosted, or SCA
reference targets,
72 when used with binding.ws (in precedence order) are:
73 1. The URIs in the endpoint(s) of the referenced WSDL
74 or
75 The URI specified by the wsa:Address element of the
wsa:EndpointReference,
76 2. The explicitly stated URI in the "uri" attribute of the binding.ws
element, which may be
77 relative,
78 3. The implicit URI as defined by the Assembly specification"

Why is it an error if both uri and WSDL endpoint are present? The spec
seems
to say we should use the WSDL endpoint over the binding uri in this case
and
they are not exclusive. Maybe I miss some points. Please clarify.

Thanks,
Raymond

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 14, 2007 2:19 AM
Subject: svn commit: r556249 -

/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/axis2/Axis2ServiceBindingProvider.java


> Author: antelder
> Date: Sat Jul 14 02:18:59 2007
> New Revision: 556249
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=556249
> Log:
> Remove unused import,
> add back in throwing exception when using wsdl port endpoint but a uri
is
> specified on the scdl binding
> (not sure why that got commented out, all the tests pass with it in and
it
> makes it much easier to debug so adding it back and see if anyone
> complains)
>
> Modified:
>
>
incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/axis2/Axis2ServiceBindingProvider.java
>
> Modified:
>
incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/axis2/Axis2ServiceBindingProvider.java
> URL:
>
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/axis2/Axis2ServiceBindingProvider.java?view=diff&rev=556249&r1=556248&r2=556249
>
==============================================================================
> ---
>
incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/axis2/Axis2ServiceBindingProvider.java
> (original)
> +++
>
incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/axis2/Axis2ServiceBindingProvider.java
> Sat Jul 14 02:18:59 2007
> @@ -65,7 +65,6 @@
>     private ConfigurationContext configContext;
>     private MessageFactory messageFactory;
>     private Axis2ServiceBindingProvider callbackProvider;
> -    private InterfaceContract bindingInterfaceContract;
>
>     // TODO: what to do about the base URI?
>     private static final String BASE_URI = "http://localhost:8080/";;
> @@ -193,9 +192,9 @@
>             wsdlURI = getEndpoint(wsBinding.getPort());
>         }
>         if (wsdlURI != null && wsdlURI.isAbsolute()) {
> -//            if (wsBinding.getURI() != null &&
> (wsBinding.getServiceName() != null && wsBinding.getBindingName() ==
> null)) {
> -//                throw new IllegalArgumentException("binding URI
cannot
> be used with absolute WSDL endpoint URI");
> -//            }
> + if (wsBinding.getURI() != null && > (wsBinding.getServiceName
()
> != null && wsBinding.getBindingName() == null)) {
> +                throw new IllegalArgumentException("binding URI cannot
be
> used with absolute WSDL endpoint URI");
> +            }
>             return URI.create(wsdlURI.toString());
>         }
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to