Skip to content

Instantly share code, notes, and snippets.

View hasuniea's full-sized avatar
🎯
Focusing

Hasunie hasuniea

🎯
Focusing
View GitHub Profile
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^getamount/?$ getamount_of_next_index.jsp [NC,L] # Handle requests for "getamount"
package org.Service;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
import org.apache.axiom.om.OMAbstractFactory;
package org.model;
public class Order {
private String itemName;
private double price;
private int quantity;
public String getItemName() {
return itemName;
}
<service name="SampleOrderProcessService" scope="application">
<description>
Order Process Service
</description>
<operation name="addOrder">
<messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
</operation>
<operation name="getOrders">
<messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
</operation>
private List<Header> getHeaders() {
MessageContext messageContext = context.getMessageContext();
if (messageContext == null || !(messageContext instanceof WrappedMessageContext)) {
return null;
}
Message message = ((WrappedMessageContext) messageContext).getWrappedMessage();
List<Header> headers = CastUtils.cast((List<?>) message.get(Header.HEADER_LIST));
return headers;
}
<AnalyticsConfiguration>
<Enabled>true</Enabled>
<ReceiverServerUrl>tcp://localhost:7612</ReceiverServerUrl>
<AdminUsername>admin</AdminUsername>
<AdminPassword>admin</AdminPassword>
</AnalyticsConfiguration>
<AnalyticsDataConfiguration>
<!--Mode can be either as LOCAL, REMOTE or AUTO. If LOCAL mode is configured the analytics api will lookup -->
<!--necessary services within the the same node, and will invoke then directly without going through network.-->
<!--But If the current node is a light weight node, and doesn't have analytics data services, -->
<!--then the mode should be configured as REMOTE. If AUTO mode is configured, based on the data service availability
it will automatically switch the mode with LOCAL and REMOTE -->
<Mode>REMOTE</Mode>
<!--Note: The following parameters will be used only when the mode is configured to REMOTE.-->
<!--The URL of the analytics data service is being hosted-->
<URL>http://10.10.10.70:9764</URL>
$ sudo apt-add-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java7-installer
$ java -version
$ wget http://www.scala-lang.org/files/archive/scala-2.10.4.tgz
$ sudo mkdir /usr/local/src/scala
$ sudo tar xvf scala-2.10.4.tgz -C /usr/local/src/scala/
$ vi .bashrc