You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Oleg Kalnichevski <ol...@apache.org> on 2007/12/22 15:20:16 UTC
[HttpCore] We already provde limited support for SIP, don't we?
Roland
There's an ongoing discussion on Axis2 lists regarding an SIP transport
for Axis2:
http://www.nabble.com/-Axis2--SOAP-over-SIP-td14427627.html
We already provide limited support for SIP in core, don't we? Is it the
same thing we worked on a while ago?
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Re: [HttpCore] SIP contrib status
Posted by Roland Weber <os...@dubioso.net>.
PS:
> It should be possible to send SIP messages with HttpCore.
> Just make sure to pass SipVersion.SIP_2_0 to the constructor
> of the HttpMessage, RequestLine or ResponseLine you create.
If you are creating a response, you will also want to pass
the EnglishSipReasonPhraseCatalog to BasicHttpResponse.
The DefaultHttpResponseFactory can be instantiated with
the reason phrase catalog as an argument.
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Re: [HttpCore] SIP contrib status
Posted by Roland Weber <os...@dubioso.net>.
Hi Paul,
> I'll take a look soon.... I need to get my head around the SIP
> protocol a little first... I guess the other problem is I can't find
> any other SIP/SOAP systems to interoperate with!
That means you can set new standards ;-)
I would try to let SOAP aside for a while and focus on getting
the SIP part working. Unfortunately, I won't have time to play
around with it myself.
> I'm reading some old documents that propose a special SERVICE verb for
> SIP, but since they are out-of-date I'm assuming this hasn't been
> implemented a lot.
The draft from 2000. Maybe you want to contact the folks
on IETF's "sipping" list? [1] They should be aware of the
current state of things. I'm not sure whether there is a
searchable archive of the mailing list.
But if some commercial vendors actually built products
based on the draft [2], that's what you'll have to stick
to. The products that is, not the draft :-(
cheers,
Roland
[1] https://www1.ietf.org/mailman/listinfo/sipping
[2] http://www1.ietf.org/mail-archive/web/sipping/current/msg01854.html
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Re: [HttpCore] SIP contrib status (was: We already provde limited support for SIP, don't we?)
Posted by Paul Fremantle <pz...@gmail.com>.
Roland
I'll take a look soon.... I need to get my head around the SIP
protocol a little first... I guess the other problem is I can't find
any other SIP/SOAP systems to interoperate with!
I'm reading some old documents that propose a special SERVICE verb for
SIP, but since they are out-of-date I'm assuming this hasn't been
implemented a lot.
Paul
On Jan 2, 2008 8:51 AM, Roland Weber <os...@dubioso.net> wrote:
> Hi all,
>
> I've added some more contrib code for SIP:
> http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/contrib/src/main/java/org/apache/http/contrib/sip/
>
> Note that all this code is completely untested.
> All I can say is that it compiles and doesn't
> generate JavaDoc errors. With that in mind...
>
> It should be possible to send SIP messages with HttpCore.
> Just make sure to pass SipVersion.SIP_2_0 to the constructor
> of the HttpMessage, RequestLine or ResponseLine you create.
> I just fixed the constructor for BasicHttpEntityEnclosingRequest,
> which was still expecting HttpVersion instead of ProtocolVersion.
> If you encounter other instances of this problem, please report
> or fix them.
>
> It should be possible to receive SIP messages with HttpCore.
> Just pass BasicSipLineParser to the constructor when creating
> the HttpMessageParser in the create{Request|Response}Parser
> method of your connection implementation.
>
>
> Additional contributions like DefaultSip{Client|Server}Connection
> and DefaultNSip{Client|Server}Connection would be welcome.
> Eventually, we might have a DummySipClient and DummySipGateway
> that actually show how this stuff has to be used.
>
> Let me know how/if it works.
>
> cheers,
> Roland
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>
--
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
paul@wso2.com
"Oxygenating the Web Service Platform", www.wso2.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
[HttpCore] SIP contrib status (was: We already provde limited support
for SIP, don't we?)
Posted by Roland Weber <os...@dubioso.net>.
Hi all,
I've added some more contrib code for SIP:
http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/contrib/src/main/java/org/apache/http/contrib/sip/
Note that all this code is completely untested.
All I can say is that it compiles and doesn't
generate JavaDoc errors. With that in mind...
It should be possible to send SIP messages with HttpCore.
Just make sure to pass SipVersion.SIP_2_0 to the constructor
of the HttpMessage, RequestLine or ResponseLine you create.
I just fixed the constructor for BasicHttpEntityEnclosingRequest,
which was still expecting HttpVersion instead of ProtocolVersion.
If you encounter other instances of this problem, please report
or fix them.
It should be possible to receive SIP messages with HttpCore.
Just pass BasicSipLineParser to the constructor when creating
the HttpMessageParser in the create{Request|Response}Parser
method of your connection implementation.
Additional contributions like DefaultSip{Client|Server}Connection
and DefaultNSip{Client|Server}Connection would be welcome.
Eventually, we might have a DummySipClient and DummySipGateway
that actually show how this stuff has to be used.
Let me know how/if it works.
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Re: [HttpCore] We already provde limited support for SIP, don't we?
Posted by Roland Weber <os...@dubioso.net>.
Hi Paul,
Paul Fremantle wrote:
> Hehe This is cool. I didn't realize there was any SIP support in HTTPCore.
You didn't read the release notes for alpha6? I am *shocked*! ;-)
http://www.apache.org/dist/httpcomponents/httpcore/RELEASE_NOTES.txt
> I'd much rather use this than a servlet model because of the
> non-blocking nature.
>
> I'll take a look over the holidays and maybe start in earnest in the new year.
I've added some contrib code [1] that should save you some work,
in particular the definition of the status codes and default
reason phrases. Now it pays out that we have a dedicated reason
phrase catalog.
There are some funny little details about SIP (RFC 3261 and others)
that you should keep in mind. SIP does explicitly NOT allow for
chunked encoding. All entities must have a Content-Length. I think
that even for messages without an entity, a Content-Length of 0
should/must be specified. I didn't check the defined methods though,
maybe all of them allow for an entity. One approach to enforce this
would be dedicated BasicSipRequest/Response classes that throw an
exception if a chunked entity or one with unknown length is added.
But we might still need additional checks for sending messages
without an entity, or when the HTTP message implementations are
used for sending.
There is no expect-continue handshake. That can be disabled on
the client side by setting the respective parameter. The server
can trigger an error in the ExpectationVerifier.
Some headers have a "compact form" using a single character as
the name. Compact form and full form are equivalent and may be
mixed in the same message. On the receiving side, this may be
handled by a protocol interceptor that looks for compact forms
and adds the respective full form header and/or vice versa. But
keeping the headers in the correct order may become a problem.
Maybe it's better/easier to modify the message parser and
instantiate special SipHeader objects that know both forms
of their header name. That would also help to re-use code that
currently depends on the full name, like the content length
strategies which check for the "Content-Length:" header but
not the compact form "l:".
On the sending side, I would delegate the responsibility to
the application for starters. When digging into details, it
may be necessary to switch between full and compact forms for
example in the message formatter. Then it becomes interesting
when and where the Content-Length header is set, and whether
it is possible to create a SipHeader there.
I can't promise that I'll soon find time and motivation
to dig much further into this stuff. It's a can of worms.
cheers,
Roland
[1]
http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/contrib/src/main/java/org/apache/http/contrib/sip/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Re: [HttpCore] We already provde limited support for SIP, don't we?
Posted by Paul Fremantle <pz...@gmail.com>.
Hehe This is cool. I didn't realize there was any SIP support in HTTPCore.
I'd much rather use this than a servlet model because of the
non-blocking nature.
I'll take a look over the holidays and maybe start in earnest in the new year.
Happy Christmas everyone!
Paul
On Dec 22, 2007 2:39 PM, Roland Weber <os...@dubioso.net> wrote:
> Hi Oleg,
>
> > There's an ongoing discussion on Axis2 lists regarding an SIP transport
> > for Axis2:
> >
> > http://www.nabble.com/-Axis2--SOAP-over-SIP-td14427627.html
>
> Interesting.
>
> > We already provide limited support for SIP in core, don't we? Is it the
> > same thing we worked on a while ago?
>
> Theoretically - yes. I've refactored the parsing to make sure
> that we can substitute the protocol specification HTTP/1.1
> with SIP/2.0. Unfortunately, I never had the time to verify
> that it works. One of the many things that I thought I could
> take care of between christmases.
>
> With a SipProtocol class and modified parser factories, both
> core-main and core-NIO should be able to send and receive
> SIP messages instead of HTTP messages. The basic framework
> of the o.a.http.protocol package can be re-used too, though
> specific protocol handlers will be required.
>
> Of course there's no way we're going to implement anything
> close to a Siplet container. But the NIO-based transport
> doesn't rely on a Servlet container either, does it? So yes,
> it should be possible to build something on HttpCore.
>
> cheers,
> Roland
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>
--
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
paul@wso2.com
"Oxygenating the Web Service Platform", www.wso2.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Re: [HttpCore] We already provde limited support for SIP, don't we?
Posted by Roland Weber <os...@dubioso.net>.
Hi Oleg,
> There's an ongoing discussion on Axis2 lists regarding an SIP transport
> for Axis2:
>
> http://www.nabble.com/-Axis2--SOAP-over-SIP-td14427627.html
Interesting.
> We already provide limited support for SIP in core, don't we? Is it the
> same thing we worked on a while ago?
Theoretically - yes. I've refactored the parsing to make sure
that we can substitute the protocol specification HTTP/1.1
with SIP/2.0. Unfortunately, I never had the time to verify
that it works. One of the many things that I thought I could
take care of between christmases.
With a SipProtocol class and modified parser factories, both
core-main and core-NIO should be able to send and receive
SIP messages instead of HTTP messages. The basic framework
of the o.a.http.protocol package can be re-used too, though
specific protocol handlers will be required.
Of course there's no way we're going to implement anything
close to a Siplet container. But the NIO-based transport
doesn't rely on a Servlet container either, does it? So yes,
it should be possible to build something on HttpCore.
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org