[protobuf] Re: Protobuf in JAX-WS

2011-04-01 Thread Canggih
Or, maybe can I handle request and read the callback without using JAX
WS (without java.xml.ws library)?

On Apr 1, 10:04 am, Ben Wright compuware...@gmail.com wrote:
 Unfortunately JAX-WS (Java API for XML Web Services) only works
 directly with XML (anyone feel free to correct me if I'm
 misinformed in this regard as I've never fully explored using JAX-WS
 without XML)

 You have a couple of options though...

 If you want to stick with XML based web services you can go with using
 Base64 encoded protocol buffer message(s) in appropriate XML fields.
 Likewise you can return data this way.  The drawbacks of this are that
 you're essentially throwing away a lot of the good that comes from web
 services being well defined in terms of argument and return data
 types. (Base64 is an encoding scheme for putting binary data in human
 readable data streams such as XML by only using displayable
 characters... encoding suffers a 4/3 size penalty as it takes four 6-
 bit chars to encode three 8-bit bytes)

 If you're more flexible you can implement a non-XML based web service
 using a RESTful model, or thin HTTP requests, to post and get protocol
 buffers directly as raw bytes.  There are also some remoting
 services built on top of protocol buffers that act much like web
 services.  I have not used any of them so I'll leave it to someone
 more versed in those to speak to them.

 If you want more info you can ask more questions or do a search on
 RESTful web services (and yes JAX-WS supports RESTful but still
 using XML...)

 Best of luck,
 Ben Wright

 On Mar 31, 10:38 pm, Canggih PW cangca...@gmail.com wrote:







  hi,

  Sorry, i'm new in Java.

  Currently, i make a web service using python (for server) and java (for 
  client).
  Client-Server can updates data synchronously, i'm using long polling 
  method. All
  i know about how to implement those thing is using JAX WS, to send request 
  and
  read the callback response. But, JAX WS using XML. How can i using protobuf 
  in
  JAX-WS, or there are any other library in java that can do it?

  Thanks in advance
  Canggih

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Protobuf in JAX-WS

2011-04-01 Thread Canggih
thanks.
Actually, i'm using Restful web services. But, i'm confuse, how to use
it for long polling method. I have search it, but the result is using
JAX WS to handle the request and get callback response.
is there a way to do it in pure protobuf? Maybe using another library?

Thanks in advance
Canggih

On Apr 1, 10:04 am, Ben Wright compuware...@gmail.com wrote:
 Unfortunately JAX-WS (Java API for XML Web Services) only works
 directly with XML (anyone feel free to correct me if I'm
 misinformed in this regard as I've never fully explored using JAX-WS
 without XML)

 You have a couple of options though...

 If you want to stick with XML based web services you can go with using
 Base64 encoded protocol buffer message(s) in appropriate XML fields.
 Likewise you can return data this way.  The drawbacks of this are that
 you're essentially throwing away a lot of the good that comes from web
 services being well defined in terms of argument and return data
 types. (Base64 is an encoding scheme for putting binary data in human
 readable data streams such as XML by only using displayable
 characters... encoding suffers a 4/3 size penalty as it takes four 6-
 bit chars to encode three 8-bit bytes)

 If you're more flexible you can implement a non-XML based web service
 using a RESTful model, or thin HTTP requests, to post and get protocol
 buffers directly as raw bytes.  There are also some remoting
 services built on top of protocol buffers that act much like web
 services.  I have not used any of them so I'll leave it to someone
 more versed in those to speak to them.

 If you want more info you can ask more questions or do a search on
 RESTful web services (and yes JAX-WS supports RESTful but still
 using XML...)

 Best of luck,
 Ben Wright

 On Mar 31, 10:38 pm, Canggih PW cangca...@gmail.com wrote:







  hi,

  Sorry, i'm new in Java.

  Currently, i make a web service using python (for server) and java (for 
  client).
  Client-Server can updates data synchronously, i'm using long polling 
  method. All
  i know about how to implement those thing is using JAX WS, to send request 
  and
  read the callback response. But, JAX WS using XML. How can i using protobuf 
  in
  JAX-WS, or there are any other library in java that can do it?

  Thanks in advance
  Canggih

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Protobuf in JAX-WS

2011-03-31 Thread Ben Wright
Unfortunately JAX-WS (Java API for XML Web Services) only works
directly with XML (anyone feel free to correct me if I'm
misinformed in this regard as I've never fully explored using JAX-WS
without XML)

You have a couple of options though...

If you want to stick with XML based web services you can go with using
Base64 encoded protocol buffer message(s) in appropriate XML fields.
Likewise you can return data this way.  The drawbacks of this are that
you're essentially throwing away a lot of the good that comes from web
services being well defined in terms of argument and return data
types. (Base64 is an encoding scheme for putting binary data in human
readable data streams such as XML by only using displayable
characters... encoding suffers a 4/3 size penalty as it takes four 6-
bit chars to encode three 8-bit bytes)

If you're more flexible you can implement a non-XML based web service
using a RESTful model, or thin HTTP requests, to post and get protocol
buffers directly as raw bytes.  There are also some remoting
services built on top of protocol buffers that act much like web
services.  I have not used any of them so I'll leave it to someone
more versed in those to speak to them.

If you want more info you can ask more questions or do a search on
RESTful web services (and yes JAX-WS supports RESTful but still
using XML...)

Best of luck,
Ben Wright

On Mar 31, 10:38 pm, Canggih PW cangca...@gmail.com wrote:
 hi,

 Sorry, i'm new in Java.

 Currently, i make a web service using python (for server) and java (for 
 client).
 Client-Server can updates data synchronously, i'm using long polling method. 
 All
 i know about how to implement those thing is using JAX WS, to send request and
 read the callback response. But, JAX WS using XML. How can i using protobuf in
 JAX-WS, or there are any other library in java that can do it?

 Thanks in advance
 Canggih

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.