Showing posts with label experience. Show all posts
Showing posts with label experience. Show all posts

WSO2 Identity Server Dropbox Authenticator


Each authenticator provides you a way to authenticate the user using specific external authentication system. For example if you want to authenticate a user who logs into your application using Dropbox authenticator, you need to configure the Dropbox authenticator for your identity provider .The Dropbox authenticator allows you to authenticate user using Dropbox through WSO2 IS. 


Before you can get started, you'll need to register your app with Dropbox by creating a new app in My apps. That page will guide you through the process of registering your app, including choosing which permission your app needs, and specifying an app name. After creating your app, you're ready to set up the authorization process in your app. The Dropbox SDKs will take care of some of the OAuth 2 process automatically for you, and you can use the tutorials and sample apps for reference.

Configuring the Dropbox App

Step 1. go to https://www.dropbox.com/developers/apps and create new app as described  in the Doc.

Step 2.Enter the name of your new app and redirect URL https://localhost:9443/commonauth in the window that appears.

Step 3.  Copy App key and App Secret from above page

Deploying travelocity.com sample app

The next step is to deploy the sample app in order to use it in this scenario.
  1. You can download travelocity.com.war file from here.
  2. Deploy this sample web app on a web container.
    1. Use the Apache Tomcat server to do this.
    2. Since this sample is written based on Servlet 3.0, it needs to be deployed on Tomcat 7.x.
    3. Copy the .war file into the webapps folder. For example, <APACHE_HOME>/apache-tomcat-7.0.50/webapps.
Once this is done, the next step is to configure the WSO2 Identity Server by adding a service provider and identity provider.

Now you have to configure WSO2 Identity Server by adding a new identity provider.
  1. Download the WSO2 Identity Server from here and run it.
  2. Log in to the management console as an administrator.
  3. In the Identity Providers section under the Main tab of the management console, click Add.
  4. Give a suitable name for Identity Provider Name.

  1. Go to Dropbox Configuration under Federated Authenticators.
  2. Enter the values as given in the above figure.
    • Client Id: App key for your app.
    • Client Secret: App Secret for your app.
    • Callback URL: Service Provider's URL where code needs to be sent .
  3. Select both checkboxes to Enable the Foursquare Authenticator and make it the Default.
  4. Click Register.
You have now added the identity provider.


Configuring the service provider

The next step is to configure the service provider.
  1. Return to the management console.
  2. In the Service Providers section under the Main tab, click Add.
  3. Since you are using travelocity as the sample, enter travelocity.com in the Service Provider Name text box and click Register.
  4. In the Inbound Authentication Configuration section, click Configure under the SAML2 Web SSO Configuration section.

  5. Now set the configuration as follows:
    1. Issuer: travelocity.com
    2. Assertion Consumer URL: http://localhost:8080/travelocity.com/home.jsp
  6. Select the following check-boxes:
    1. Enable Response Signing.
    2. Enable Single Logout.
    3. Enable Attribute Profile.
    4. Include Attributes in the Response Always.
  7. Click Update to save the changes. Now you will be sent back to the Service Providers page.
  8. Go to the Local and Outbound Authentication Configuration section.
  9. Select the identity provider you created from the dropdown list under Federated Authentication.

  10. Ensure that the Federated Authentication radio button is selected and click Update to save the changes.

 You have now added and configured the service provider.


Testing the sample

  1. To test the sample, go to the following URL: http://<TOMCAT_HOST>:<TOMCAT_PORT>/travelocity.com/index.jsp E.g., http://localhost:8080/travelocity.com
  2. Click the link to log in with SAML from WSO2 Identity Server.
You are redirected to the Foursquare Login page. Enter your Dropbox credentials and you will be taken to the home page of the travelocity.com app.
After Successfully Login you will get a page with claims. Dropbox will provide below information for claims


fielddescription
uidThe user's unique Dropbox ID.
display_nameThe user's display name.
name_details/given_nameThe user's given name.
name_details/surnameThe user's surname.
name_details/familiar_nameThe locale-dependent familiar name for the user.
referral_linkThe user's referral link.
countryThe user's two-letter country code, if available.
localeLocale preference set by the user (e.g. en-us).
emailThe user's email address.
email_verifiedIf true, the user's email address has been verified to belong to that user.
is_pairedIf true, there is a paired account associated with this user.
teamIf the user belongs to a team, contains team information. Otherwise, null.
team/nameThe name of the team the user belongs to.
team/team_idThe ID of the team the user belongs to.
quota_info/normalThe user's used quota outside of shared folders (bytes).
quota_info/sharedThe user's used quota in shared folders (bytes). If the user belongs to a team, this includes all usage contributed to the team's quota outside of the user's own used quota (bytes).
quota_info/quotaThe user's total quota allocation (bytes). If the user belongs to a team, the team's total quota allocation (bytes).



Run Integration Test with WSO2 ESB EJB2 Connector and Jboss 5.1

As we discussed earlier EJB2 connector is a tool to make calls between remote EJB2.X objects and wso2 ESB. there are two type of calls we can call.Stateless and stateful where stateless is a one time call and stateful maintain a state between remote object and client. Integration Test for EJB2.X connector written based on Jboss 5.1 server so there are some pre configuration we need to  set before we run the integration test.

in this blog lets see how to configure ESB before run the test and what are the libraries we need to add to ESB and Test Client. Integration test is very important to check the stability of connector(to validate the methods).

 Pre-requisites

  1. Maven 3.X
  2. Java 1.7 or above
  3. Jboss 5.1

The org.wso2.esb.integration.integration-base project is required. The test suite has been configured to download this project automatically. If the automatic download fails, download the following project and compile it using the mvn clean install command to update your local repository

Tested Platform: 

  • UBUNTU 14.04
  • WSO2 ESB 4.9.0

Dependency jars

  1. EJB2StatefulJboss.jar
  2. EJB2StatelessJboss.jar
  3. jbossall-client.jar
Make sure the ESB 4.9.0 zip file with latest patches available at "{CONNECTOR_HOME}/repository/" and add Dependency jar files into "{ESB_HOME}/repository/component/lib"
 
 jbossall-client.jar will avoid OSGI issues other wise we need to copy below jar files into lib folder

  • jbossall-client.jar
  • commons-logging.jar
  • concurrent.jar
  • ejb3-persistence.jar
  • hibernate-annotations.jar
  • jboss-aop-client.jar
  • jboss-appclient.jar
  • jboss-aspect-jdk50-client.jar
  • jboss-client.jar
  • jboss-common-core.jar
  • jboss-deployers-client-spi.jar
  • jboss-deployers-client.jar
  • jboss-deployers-core-spi.jar
  • jboss-deployers-core.jar
  • jboss-deployment.jar
  • jboss-ejb3-common-client.jar
  • jboss-ejb3-core-client.jar
  • jboss-ejb3-ext-api.jar
  • jboss-ejb3-proxy-clustered-client.jar
  • jboss-ejb3-proxy-impl-client.jar
  • jboss-ejb3-proxy-spi-client.jar
  • jboss-ejb3-security-client.jar
  • jboss-ha-client.jar
  • jboss-ha-legacy-client.jar
  • jboss-iiop-client.jar
  • jboss-integration.jar
  • jboss-j2se.jar
  • jboss-javaee.jar
  • jboss-jsr77-client.jar
  • jboss-logging-jdk.jar
  • jboss-logging-log4j.jar
  • jboss-logging-spi.jar
  • jboss-main-client.jar
  • jboss-mdr.jar
  • jboss-messaging-client.jar
  • jboss-remoting.jar
  • jboss-security-spi.jar
  • jboss-serialization.jar
  • jboss-srp-client.jar
  • jboss-system-client.jar
  • jboss-system-jmx-client.jar
  • jbosscx-client.jar
  • jbossjts-integration.jar
  • jbossjts.jar
  • jbosssx-as-client.jar
  • jbosssx-client.jar
  • jmx-client.jar
  • jmx-invoker-adaptor-client.jar
  • jnp-client.jar
  • slf4j-api.jar
  • slf4j-jboss-logging.jar
  • xmlsec.jar
  
for the actual client written in Integration test we already added Dependency 
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<version>${jboss.lib.version}</version>
<type>pom</type>
</dependency>

and we need to copy EJB2StatelessJboss.jar and EJB2StatefulJboss.jar into "{EJB_HOME}/ejb2-connector/ejb2-connector-1.0.9/org.wso2.carbon.connector/src/test/resource/ESB/jar/"

now run mvn clean install to run the test. you will get below output

PASSED: statefulBean
        Stateful Bean Jboss
PASSED: statelessBean
        Stateless Bean Jboss

===============================================
    Ejb2-Connector-Test
    Tests run: 2, Failures: 0, Skips: 0
===============================================


WSO2 ESB EJB 2.x Connector

Enterprise JavaBeans is an architecture for transactional, component-based distributed computing. The specification for EJBs lays out not just the format of a bean itself, but also a set of services that must be provided by the container in which the bean runs. This makes EJBs a powerful development methodology for distributed application development. Neither the bean developer nor the client application programmer needs to be concerned with service details such as transaction support, security, remote object access, and many other complicated and error-prone issues. These are provided transparently for the developers by the EJB server and container.

The effect of the EJB architecture is to make server-side development much easier for the Java application programmer. Since the implementation details are hidden from the developer, and since services such as transaction support and security are provided in an easy-to-use manner, EJBs can be developed relatively quickly. Furthermore, EJBs offer portability. A bean that is developed on one EJB server should run on other EJB servers that meet the EJB specification. Portability has not been tested yet for most servers, but it is a bright promise for the future. for more..

EJB2 Connector

EJB2 Connector used to create a client Dynamically from the esb Configuration and if method is not a void method then it will add the return value into messagecontext property. it’s have two methods called Stateless bean and Stateful bean. and EJB2 Connector will support with multiple Servers and its tested with Jboss 5.1 and GlasFish 4. before start the ESB copy the client libraries and service jar inside the component->Lib folder.

Operation details

  • Init Operation
  • Stateless Bean
  • Stateful Bean
This section provides further details on the operations related to theEJB2 connector.

Init Operation

init method will contain JNDI Naming Property and in order identify correct property we need to set key value and property value name should be start with that key name. these values are depend on the backend server we are using above one is example for glassfish 4

Init

<ejbconnector.init>
<key>raj</key>
<raj.java.naming.factory.initial>com.sun.enterprise.naming.SerialInitContextFactory</raj.java.naming.factory.initial>
<raj.org.omg.CORBA.ORBInitialHost>localhost</raj.org.omg.CORBA.ORBInitialHost>
<raj.org.omg.CORBA.ORBInitialPort>3700</raj.org.omg.CORBA.ORBInitialPort>
</ejbconnector.init>
  • key: unique identifier for each context
  • key.{name}: this depend on server properties and configuration(property value name)
  • key.{name}.Value:value of the key.{name}(property value)

Stateless Bean

A stateless session bean is a session bean with no conversational state. All instances of a particular stateless session bean class are identical.
A stateless session bean and its client do not share state or identity between method invocations. A stateless session bean is strictly a single invocation bean. It is employed for reusable business services that are not connected to any specific client, such as generic currency calculations, mortgage rate calculations, and so on. Stateless session beans may contain client-independent, read-only state across a call. Subsequent calls are handled by other stateless session beans in the pool. The information is used only for the single invocation.
OC4J maintains a pool of these stateless beans to service multiple clients. An instance is taken out of the pool when a client sends a request. There is no need to initialize the bean with any information.

Stateless Bean


<ejbconnector.stateless>
<jndiName>HelloBean</jndiName>
<method>sayHello</method>
<param.arg1>Rajjaz</param.arg1>
</ejbconnector.stateless>
<ejbconnector.stateless>
<jndiName>HelloBean</jndiName>
<method>sayHello</method>
<return>out</return>
</ejbconnector.stateless>
  • method: name of the method.
  • param.arg{X}:this will be name of the arguments and it want to be in a flow like param.arh1,key,arg2..
  • jndiName: Java API for a directory service.

Stateful Bean

A stateful session bean is a session bean that maintains conversational state.
Stateful session beans are useful for conversational sessions, in which it is necessary to maintain state, such as instance variable values or transactional state, between method invocations. These session beans are mapped to a single client for the life of that client.
A stateful session bean maintains its state between method calls. Thus, there is one instance of a stateful session bean created for each client. Each stateful session bean contains an identity and a one-to-one mapping with an individual client.
When the container determines that it must remove a stateful session bean from memory (in order to release resources), the container maintains the bean's state by passivation (serializing the bean to disk). This is why the state that you passivate must be serializable. However, this information does not survive system failures. When the bean instance is requested again by its client, the container activates the previously passivated bean instance.
The type of state that is saved does not include resources. The container invokes the ejbPassivate method within the bean to provide the bean with a chance to clean up its resources, such as sockets held, database connections, and hash tables with static information. All these resources can be reallocated and re-created during the ejbActivate method.
If the bean instance fails, the state can be lost, unless you take action within your bean to continually save state. However, if you must make sure that state is persistently saved in the case of failovers, you may want to use an entity bean for your implementation. Alternatively, you could also use the SessionSynchronization interface to persist the state transactionally.

Stateful Bean

<ejbconnector.stateful>
<jndiName>HelloStateful</jndiName>
<method>setName</method>
<param.arg1>Rajjaz</param.arg1>
</ejbconnector.stateful>
<ejbconnector.stateful>
<jndiName>HelloStateful</jndiName>
<method>getName</method>
<return>out</return>
</ejbconnector.stateful>
  • method: name of the method
  • param.arg{X}:this will be name of the arguments and it want to be in a flow like param.arh1,key,arg2..
  • jndiName:Java API for a directory service.

Sample configuration

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="ejb2Stateless"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<property name="argument1" expression="json-eval($.argument1)"/>
<property name="argument2" expression="json-eval($.argument2)"/>
<property name="method" expression="json-eval($.method)"/>
<property name="jndiName" expression="json-eval($.jndiName)"/>
<property name="return" expression="json-eval($.return)"/>
<ejb2.init>
<key>raj</key>
<raj.java.naming.factory.initial>org.jnp.interfaces.NamingContextFactory</raj.java.naming.factory.initial>
<raj.java.naming.factory.url.pkgs>org.jboss.naming:org.jnp.interfaces</raj.java.naming.factory.url.pkgs>
<raj.java.naming.provider.url>localhost</raj.java.naming.provider.url>
</ejb2.init>
<ejb2.stateless>
<jndiName>{$ctx:jndiName}</jndiName>
<method>{$ctx:method}</method>
<param.arg1>{$ctx:argument1}</param.arg1>
<param.arg2>{$ctx:argument2}</param.arg2>
<return>{$ctx:return}</return>
</ejb2.stateless>
<property name="out" expression="get-property('Result')"/>
<payloadFactory media-type="json">
<format>{ "Result": $ctx:out}</format>
<args/>
</payloadFactory>
<respond/>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
<description/>
</proxy>

Getting Started with Simple wso2 ESB EJB Mediator Sample


The EJB mediator calls an external Enterprise JavaBean(EJB) and stores the result in the message payload or in a message context property. Currently, this mediator supports EJB3 Stateless Session Beans and Stateful Session Beans.

Before Start first look what is EJB Mediator and what is EJB now Let's see how to Run a Simple Hello Name using EJB Mediator. in order to run the the sample we need to configure our Environment So the Requirements are
In the context of EJB the the implementation is focused on statefull and stateless session beans, so later when dicussing the sample scenarios and will dig in to the details on how to configure those with the WSO2 Ejb mediator
So let us now focus now on configuring EJB service invocation with WSO2 ESB.

Configure the ESB

  • Please download Jboss 7(jboss-as-7.1.1.Final Latest)  we do have test this with different application servers but for this demonstration we will be using Jboss 7 there you need to  copy jboss-client.jar to ESB_HOME/repository/components/lib
  • Please find the HelloName.jar (Ejb service) you will be find the HelloName  jar attached with this article (will discuss what this demo service and its implementation separately) please copy the HelloName.jar file to  JBOSS_HOME/standalone/deployments/  and  ESB_HOME/repository/components/lib
  • As next step you may have to configure AS connection properties and the you will be able define them in  synapse.properties (ESB_HOME/repository/conf ) it has following properties which is required to communicate with the AS,depending on the application server which you may use the configuration parameteres might get change, the following is required when you need to connect EJB services hosted in Jboss AS 7
  • Start ESB and Jboss AS

Configure Ejb Mediator for stateless bean

Idea of this demo such as when requests closest location he has to pass the name and  in this scenario when the requests comes first we need to invoke the sayHello method which is exposed as EJB service, and to invoke the method it requires to check HelloWorld so it we picking the name and pass it to ejb Container and the return result will be assign to the synapse property context  and using enrich mediator we can transform the incoming request as requires by the source, let see how this can be configured in ESB level

ejb Proxy

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="ejb"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<property name="response" value="init" scope="default" type="STRING"/>
<log level="custom">
<property name="response" value="{//name}"/>
</log>
<ejb beanstalk="jack"
class="org.NewBeanRemote"
method="sayHello"
target="response"
jndiName="ejb:/EJBModule3/NewBean!org.NewBeanRemote">
<args>
<arg xmlns:m="http://org" value="{//m:name}"/>
</args>
</ejb>
<payloadFactory media-type="xml">
<format>
<ejb xmlns="">
<response>$ctx.response</response>
</ejb>
</format>
<args/>
</payloadFactory>
<respond/>
</inSequence>
</target>
<description/>
</proxy>

in above proxy we need to set beanstalk , class, method, target and  jndiName we already looked about these parameters in previous post about EJB Mediator. here my beanstalk id is jack bu we can set unique id for that the important thing is we are going to use this name in synapse properties to set the property values. my class name is org.NewBeanRemote and method name is sayHello . the value which my method returning is naming as response in target finally we can catch the jndi name from JBoss server console.

synapse property

synapse.beanstalks=jack
synapse.beanstalks.jack.java.naming.factory.url.pkgs=org.jboss.ejb.client.naming
synapse.beanstalks.jack.cache.warn.limit.stateless=5
synapse.beanstalks.jack.cache.warn.limit.stateful=5
synapse.beanstalks.jack.cache.timeout.stateless=1
synapse.beanstalks.jack.cache.timeout.stateful=1
after  set the synapse properties value we will sent the below request to the proxy which we create as ejb.

Soap Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<sayHello xmlns="http://org">
<name>rajjaz</name>
</sayHello>
</soapenv:Body>
</soapenv:Envelope> 

 if everything success you will get bellow response to your soap Request

Soap Response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ejb>
<response>Hello rajjaz</response>
</ejb>
</soapenv:Body>
</soapenv:Envelope>

Debug Log


[2015-10-09 10:39:09,699] DEBUG - wire >> "POST /services/ejb.ejbHttpSoap11Endpoint HTTP/1.1[\r][\n]"
[2015-10-09 10:39:09,700] DEBUG - wire >> "Accept-Encoding: gzip,deflate[\r][\n]"
[2015-10-09 10:39:09,700] DEBUG - wire >> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
[2015-10-09 10:39:09,700] DEBUG - wire >> "SOAPAction: "urn:mediate"[\r][\n]"
[2015-10-09 10:39:09,701] DEBUG - wire >> "Content-Length: 201[\r][\n]"
[2015-10-09 10:39:09,701] DEBUG - wire >> "Host: rajjaz-ThinkPad-T540p:8280[\r][\n]"
[2015-10-09 10:39:09,701] DEBUG - wire >> "Connection: Keep-Alive[\r][\n]"
[2015-10-09 10:39:09,702] DEBUG - wire >> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
[2015-10-09 10:39:09,702] DEBUG - wire >> "[\r][\n]"
[2015-10-09 10:39:09,702] DEBUG - wire >> "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">[\n]"
[2015-10-09 10:39:09,702] DEBUG - wire >> " <soapenv:Body>[\n]"
[2015-10-09 10:39:09,702] DEBUG - wire >> " <sayHello xmlns="http://org">[\n]"
[2015-10-09 10:39:09,702] DEBUG - wire >> "<name>rajjaz</name>[\n]"
[2015-10-09 10:39:09,702] DEBUG - wire >> " </sayHello>[\n]"
[2015-10-09 10:39:09,702] DEBUG - wire >> " </soapenv:Body>[\n]"
[2015-10-09 10:39:09,703] DEBUG - wire >> "</soapenv:Envelope>"
[2015-10-09 10:39:09,707] DEBUG - ProxyServiceMessageReceiver Proxy Service ejb received a new message from : 127.0.0.1
[2015-10-09 10:39:09,708] DEBUG - ProxyServiceMessageReceiver Message To: /services/ejb.ejbHttpSoap11Endpoint
[2015-10-09 10:39:09,708] DEBUG - ProxyServiceMessageReceiver SOAPAction: urn:mediate
[2015-10-09 10:39:09,708] DEBUG - ProxyServiceMessageReceiver WSA-Action: urn:mediate
[2015-10-09 10:39:09,708] DEBUG - ProxyService Setting default fault-sequence for proxy
[2015-10-09 10:39:09,708] DEBUG - ProxyServiceMessageReceiver Using the anonymous in-sequence of the proxy service for mediation
[2015-10-09 10:39:09,708] DEBUG - SequenceMediator Start : Sequence <anonymous>
[2015-10-09 10:39:09,708] DEBUG - SequenceMediator Sequence <SequenceMediator> :: mediate()
[2015-10-09 10:39:09,708] DEBUG - SequenceMediator Mediation started from mediator position : 0
[2015-10-09 10:39:09,708] DEBUG - SequenceMediator Building message. Sequence <SequenceMediator> is content aware
[2015-10-09 10:39:09,709] DEBUG - PropertyMediator Start : Property mediator
[2015-10-09 10:39:09,709] DEBUG - PropertyMediator Setting property : response at scope : default to : init (i.e. constant : init)
[2015-10-09 10:39:09,709] DEBUG - PropertyMediator End : Property mediator
[2015-10-09 10:39:09,709] DEBUG - LogMediator Start : Log mediator
[2015-10-09 10:39:09,709] INFO - LogMediator response = {//name}
[2015-10-09 10:39:09,710] DEBUG - LogMediator End : Log mediator
[2015-10-09 10:39:09,933] DEBUG - PayloadFactoryMediator #mediate. Transformed payload format>>> <pfPadding><ejb><response>Hello rajjaz</response></ejb></pfPadding>
[2015-10-09 10:39:09,933] DEBUG - RespondMediator Start : Respond Mediator
[2015-10-09 10:39:09,940] DEBUG - RespondMediator End : Respond Mediator
[2015-10-09 10:39:09,940] DEBUG - SequenceMediator End : Sequence <anonymous>
[2015-10-09 10:39:09,941] DEBUG - wire << "HTTP/1.1 200 OK[\r][\n]"
[2015-10-09 10:39:09,941] DEBUG - wire << "Host: rajjaz-ThinkPad-T540p:8280[\r][\n]"
[2015-10-09 10:39:09,941] DEBUG - wire << "SOAPAction: "urn:mediate"[\r][\n]"
[2015-10-09 10:39:09,941] DEBUG - wire << "Accept-Encoding: gzip,deflate[\r][\n]"
[2015-10-09 10:39:09,941] DEBUG - wire << "Content-Type: text/xml;charset=UTF-8; charset=UTF-8[\r][\n]"
[2015-10-09 10:39:09,941] DEBUG - wire << "Date: Fri, 09 Oct 2015 05:09:09 GMT[\r][\n]"
[2015-10-09 10:39:09,941] DEBUG - wire << "Transfer-Encoding: chunked[\r][\n]"
[2015-10-09 10:39:09,941] DEBUG - wire << "Connection: Keep-Alive[\r][\n]"
[2015-10-09 10:39:09,941] DEBUG - wire << "[\r][\n]"
[2015-10-09 10:39:09,941] DEBUG - wire << "ce[\r][\n]"
[2015-10-09 10:39:09,941] DEBUG - wire << "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ejb><response>Hello rajjaz</response></ejb></soapenv:Body></soapenv:Envelope>[\r][\n]"
[2015-10-09 10:39:09,941] DEBUG - wire << "0[\r][\n]"
[2015-10-09 10:39:09,941] DEBUG - wire << "[\r][\n]"

References