This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.ossandme.client; | |
import org.apache.hello_world_soap_zmq.Greeter; | |
import org.apache.hello_world_soap_zmq.SOAPService; | |
public final class Client { | |
public static void doOperation() throws Exception { | |
// Create client |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.ossandme.client; | |
import javax.jws.WebParam; | |
import javax.jws.WebService; | |
import javax.xml.ws.RequestWrapper; | |
@WebService | |
public class Callback { | |
@RequestWrapper(localName = "sayHiResponse", targetNamespace = "http://apache.org/hello_world_soap_zmq/types") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
@Controller | |
public class ApplicationController { | |
@RequestMapping(value = "/create-client", method = RequestMethod.GET) | |
public String getCreateClientForm() { | |
return "NewClientForm"; | |
} | |
@RequestMapping(headers = "Content-Type=application/json", value = "submit-create-client", method = RequestMethod.POST) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.ossandme; | |
import javax.ws.rs.*; | |
@Path("/{userid}/comments/{title}/feed") | |
public interface CommentResource { | |
@GET | |
public String retrieveComment(@PathParam("userid") String userID, @PathParam("title") String title); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Event < ActiveRecord::Base | |
attr_accessible :locality, :country, :date, :title, :tags | |
has_and_belongs_to_many :tags | |
def self.in_country(country) | |
if country.present? | |
where('country = ?', country) | |
else | |
scoped |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HelloWorld | |
def say_hello(name) | |
return 'Hello ' + name | |
end | |
def give_age(age) | |
return 'Your age is ' + age.to_s | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NoMethodError: undefined method `start_with?' for #<Java::OrgJrubyAstJava_signature::ReferenceTypeNode:0x3b9fa8f7> | |
as_java_type at /opt/jruby-1.7.4/lib/ruby/shared/jruby/compiler/java_signature.rb:20 | |
parameters at /opt/jruby-1.7.4/lib/ruby/shared/jruby/compiler/java_signature.rb:48 | |
each at file:/opt/jruby-1.7.4/lib/jruby.jar!/jruby/java/java_ext/java.util.rb:7 | |
map at org/jruby/RubyEnumerable.java:713 | |
parameters at /opt/jruby-1.7.4/lib/ruby/shared/jruby/compiler/java_signature.rb:48 | |
types at /opt/jruby-1.7.4/lib/ruby/shared/jruby/compiler/java_signature.rb:54 | |
java_signature at /opt/jruby-1.7.4/lib/ruby/shared/jruby/core_ext/class.rb:44 | |
Foo at lib/example.rb:12 | |
(root) at lib/example.rb:11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text; | |
using ZeroMQ; | |
using System.Messaging; | |
namespace ConsoleApplication | |
{ | |
class Bridge | |
{ | |
static void Main(string[] args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
public class MyConsumer { | |
private static final int SO_TIMEOUT = 100000; // socket timeout | |
private static final int BUFFER_SIZE = 64 * 1024; // maximum socket receive buffer in bytes | |
private static final int FETCH_SIZE = 100000; // maximum bytes to fetch from topic | |
public static void main(String args[]) { | |
MyConsumer myConsumer = new MyConsumer(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.ossandme; | |
... | |
// Naive implementation | |
public class AhcProcessor extends AbstractInterceptingMessageProcessor { | |
@Override | |
public MuleEvent process(final MuleEvent event) throws MuleException { | |
... |