Oleksiy Stashok wrote:
>
>
> Paul Sandoz wrote:
>
>> Oleksiy Stashok wrote:
>>
>>> Hi,
>>>
>>> i have a task in tcp transport during handshaking encode possible
>>> binding's content types (including parameters) as integer values.
>>>
>>> |But first need to get a list of binding supported content types.
>>> What is the best (or single) way to do that?
>>
>>
>> There are some fixed assumptions.
>
> So there is no way to get that values dynamically?
> Just using instanceof's ?
>
If, in JAX-WS, you know the binding type then i think you can make the
'fixed assumptions' on the set of MIME types.
IIRC on the client side the TransportFactory.doCreate method passes in
the binding information. I presume it is possible to get the same
information on the server side as well.
See com.sun.xml.ws.api.BindingID for a list of bindings supported by
JAX-WS. Also see the javax.xml.ws.BindingType from which a BindingID
instance is created.
Paul.
> Thanks.
> Alexey.
>
>>
>> For the SOAP 1.1 binding there will be "text/xml" and for the SOAP 1.2
>> binding there will be "application/soap+xml". In both cases soapAction
>> would be a parameter.
>>
>> For everthing else things could be negotiated on connection
>> initiation, including FI and MTOM.
>>
>> For MTOM i think these are the required MIME types [1].
>>
>> So we could for now:
>>
>> - assume SOAP 1.1 for connection negotiation messages:
>>
>> SOAP 1.1 static MIME type: text/xml
>> SOAP 1.1 parameters: soapAction
>>
>> - negotiate the following MIME types for SOAP 1.1:
>>
>> MTOM static MIME type:
>> Multipart/Related; start-info="text/xml"; type="application/xop+xml"
>>
>> MTOM parameters: boundary, soapAction
>>
>> FI static MIME type: application/fastinfoset
>> FI parameters: soapAction
>>
>> Paul.
>>
>> [1] https://jax-ws.dev.java.net/jax-ws-ea3/docs/mtom-swaref.html
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jax-ws.dev.java.net
> For additional commands, e-mail: dev-help_at_jax-ws.dev.java.net
>
--
| ? + ? = To question
----------------\
Paul Sandoz
x38109
+33-4-76188109