dev@jax-ws.java.net

Re: SOAP/TCP transport?

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Thu, 19 Oct 2006 11:35:03 +0200

Hi,

>> Well, right now its not integrated at all, we just working on that.
>> I just have WSIT integration code locally and its not in repository yet.
> OK. So I guess you are saying that the migration is almost complete
> except the commit.
Right.

>>> I thought @BindingType is really just a syntax sugar, and one can
>>> always fallback to those DDs to get more flexibility. So would it be
>>> acceptable to ask people to write DD if they want to deploy one
>>> endpoint to two transports? Besides, you need a DD anyway to find
>>> out the port number, don't you?
>> Ok, in case of "sugar" :) I dont really need that annotation to be
>> extended somehow and rely just on DD.
>> As for port number - I want endpoint address to be resolved at
>> runtime. (last issue at Wiki page I mentioned earlier)
> I'm not sure what you mean by "resolved at runtime", but I take it
> that you want the URL to have the port number in it (in terms of
> <soap:binding location="..."/>)? That makes sense.
What actually I mean is /<soap:address location="..."/>/ value to be
generated at runtime for TCP binding the similar way as it is generating
for HTTP binding right now.
And you're right there is API (seems PortAddressResolver), but as I told
- not sure I can set custom Resolver for specific WS port at runtime.

> Paul Sandoz wrote:
>> Kohsuke Kawaguchi wrote:
>>> I liked the following better:
>>>
>>> <service name="TestService">
>>> <port name="TestServicePort" binding="tns:TestServiceBinding">
>>> <soap:address
>>> location="tcp://localhost:5774/WSpex-tcp/TestService"/>
>>> </port>
>>> </service>
>>>
>>> I thought the above is enough to hook up the transport. Why is the
>>> additional policy declaration needed?
>> If a service supports both the HTTP transport and the TCP transport
>> then we wanted the the client to automatically select the most
>> optimal and appropriate transport without the developer having to
>> make any changes to their code. (same for FI, when clients and
>> services know each others capabilities they can automatically, when
>> configured to do so, choose the optimal route.)
>> The two port model (two ports, one using TCP and one using HTTP, with
>> the same port type) makes this tricky to do given the current JAX-WS
>> client API (it is possible but i felt we would not be conforming to
>> the JSR i.e. returning a port that is not the one requested).
>> We definitely would like to go the route of the two port model in the
>> future for WSIT if the JAX-WS client APIs can be massaged or
>> interpreted creatively :-)
>> IIRC the two port model can be supported now, and that could be the
>> approach for none WSIT use.
Speaking about "hook for transport"...
One more thing is that specifiing /<soap:address location="tcp://..."/>
/should require WS binding referenced from WS port has TCP BindingID.
And as I told, I think good idea is to generate /soap:address location
/at runtime - IMHO only hook for TCP transport we can have is TCP
BindingID in WS binding section.
/

    <binding name="AddNumbersBindingTCP" type="tns:AddNumbersPortType">
            <soap:binding
transport="*http://schemas.xmlsoap.org/soap/tcp*" style="document" />
            ..................................
    </binding>
    <service name="AddNumbersServiceTCP">
            <port name="AddNumbersPort" binding="tns:AddNumbersBindingTCP">
                <soap:address location="REPLACE_WITH_ACTUAL_URL" />
            </port>
    </service>/


Thanks.

WBR,
Alexey.
>>> (From the page)
>>>> Once WS is TCP enabled, how to set correct endpoint address?
>>>> Expose WSDL with correct tcp endpoint address
>>>> (REPLACE_WITH_ACTUAL_URL)
>>>
>>> I thought we already have PortAddressResolver for this purpose. We
>>> used it successfully in the servlet transport. Is it not suffice?
>>
>> Well, yes, seems its what I need. Unfortunatelly I didnt look there
>> last time, but remember recently one thing was missed - its how
>> during runtime set custom resolver for specific WS port (in my case
>> SOAP/TCP enabled).
>>
>> WBR,
>> Alexey.
>>
>> PS: May be we can move this discussion to dev_at_jax-ws?
>
> Yes. Definitely.
>