axis web service logging issue - java

in my axis webservice client project i have client-config.wsdd file in which i use java:org.apache.axis.handlers.LogHandler which is
<deployment name="defaultClientConfig"
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<handler name="log"
type="java:org.apache.axis.handlers.LogHandler">
<parameter name="LogHandler.fileName" value="../logs/xyz-Axis.log" />
</handler>
<globalConfiguration>
<parameter name="disablePrettyXML" value="false" />
<requestFlow>
<handler type="log" />
</requestFlow>
<responseFlow>
<handler type="log" />
</responseFlow>
</globalConfiguration>
<transport name="http"
pivot="java:org.apache.axis.transport.http.HTTPSender" />
<transport name="local"
pivot="java:org.apache.axis.transport.local.LocalSender" />
<transport name="java"
pivot="java:org.apache.axis.transport.java.JavaSender" />
</deployment>
for generating log file so i can see request and response of webservice.
but some how it's not working, or i can't able to find it please help

you need to define client-config.wsdd into root level of project and need to change in
<handler name="log"
type="java:org.apache.axis.handlers.LogHandler">
<parameter name="LogHandler.fileName" value="xyz-Axis.log"/>
so the xyz-Axis.log will generate at same level of client-config.wsdd

Related

missing wsse security header in request while running axis2 rampart

I am developing web service using axis2 1.6.4 with transport level security and username token authentication using eclipse europa ide.I have created web service and deploy to axis2.Its working successfully on local project ,but when i run on axis2 server its showing error
"missing wsse:security header in request".So please advice me any solution for this problem.
here is my services.xml
<service name="Temp_Secure" >
<Description>
Please Type your service description here
</Description>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
<parameter name="ServiceClass" locked="false">rampart.service.Temp_Secure</parameter>
<module ref="addressing"/>
<module ref="rampart"/>
<wsp:Policy wsu:Id="UTOverTransport" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken RequireClientCertificate="false"/>
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256/>
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Lax/>
</wsp:Policy>
</sp:Layout>
<sp:IncludeTimestamp/>
</wsp:Policy>
</sp:TransportBinding>
<sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" />
</wsp:Policy>
</sp:SignedSupportingTokens>
<ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
<ramp:passwordCallbackClass>rampart.service.PWCBHandler</ramp:passwordCallbackClass>
</ramp:RampartConfig>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
</service>
and here is client code
public static void main(String[] args) throws XMLStreamException {
ConfigurationContext ctx = null;
System.setProperty("javax.net.ssl.trustStore", "C:/Program Files/Java/jdk1.7.0/bin/server1.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "admin1");
try {
ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem("../Ws-Client/WebContent/WEB-INF", "../Ws-Client/WebContent/WEB-INF/conf/axis2.xml");
} catch (AxisFault e) {
// TODO Auto-generated catch block
System.err.println(e.getMessage());
}
Temp_SecureStub stub = null;
try {
stub = new Temp_SecureStub(ctx,"https://localhost:8443/axis2/services/Temp_Secure");
} catch (AxisFault e) {
// TODO Auto-generated catch block
System.err.println(e.getMessage());
}
ServiceClient sc = stub._getServiceClient();
try {
sc.engageModule("rampart");
} catch (AxisFault e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
Options options = sc.getOptions();
options.setUserName("apache");
options.setPassword("admin1");
float celciusValue = 0;
float farnht = 0;
try {
celciusValue = stub.farenhit2Celcius(100);
farnht = stub.celcius2Farenhit(100);
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("farenhit value for 100 c is : " + celciusValue);
System.out.println("farenhit value for 100 c is : " + farnht);
}
and here is client axis2.xml
<axisconfig name="AxisJava2.0">
<module ref="rampart"/>
<!-- ================================================= -->
<!-- Parameters -->
<!-- ================================================= -->
<parameter name="hotdeployment">true</parameter>
<parameter name="hotupdate">false</parameter>
<parameter name="enableMTOM">false</parameter>
<parameter name="enableSwA">false</parameter>
<parameter name="EnableChildFirstClassLoading">false</parameter>
<parameter name="exposeServiceMetadata">true</parameter>
<!--This will give out the timout of the configuration contexts, in milliseconds-->
<parameter name="ConfigContextTimeoutInterval">30000</parameter>
<parameter name="sendStacktraceDetailsWithFaults">false</parameter>
<parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
<parameter name="userName">admin</parameter>
<parameter name="password">axis2</parameter>
<parameter name="disableREST" locked="false">false</parameter>
<!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
<parameter name="disableSOAP12" locked="true">false</parameter>
<!--POJO deployer , this will alow users to drop .class file and make that into a service-->
<deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
<deployer extension=".jar" directory="servicejars"
class="org.apache.axis2.jaxws.framework.JAXWSDeployer"/>
<deployer extension=".jar" directory="transports"
class="org.apache.axis2.deployment.TransportDeployer"/>
<parameter name="useGeneratedWSDLinJAXWS">false</parameter>
<!-- The way of adding listener to the system-->
<!-- <listener class="org.apache.axis2.ObserverIMPL">-->
<!-- <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
<!-- </listener>-->
<threadContextMigrators>
<threadContextMigrator listId="JAXWS-ThreadContextMigrator-List"
class="org.apache.axis2.jaxws.addressing.migrator.EndpointContextMapMigrator"/>
</threadContextMigrators>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
<messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
<messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-only"
class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
</messageReceivers>
<messageFormatters>
<messageFormatter contentType="application/x-www-form-urlencoded"
class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
<messageFormatter contentType="multipart/form-data"
class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
<messageFormatter contentType="application/xml"
class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
<messageFormatter contentType="text/xml"
class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
<messageFormatter contentType="application/soap+xml"
class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
</messageFormatters>
<messageBuilders>
<messageBuilder contentType="application/xml"
class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
<messageBuilder contentType="application/x-www-form-urlencoded"
class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
<messageBuilder contentType="multipart/form-data"
class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
</messageBuilders>
<!-- ================================================= -->
<!-- Transport Ins -->
<!-- ================================================= -->
<transportReceiver name="http"
class="org.apache.axis2.transport.http.AxisServletListener">
<parameter name="port">8081</parameter>
</transportReceiver>
<transportReceiver name="https"
class="org.apache.axis2.transport.http.AxisServletListener">
<parameter name="port">8443</parameter>
</transportReceiver>
<transportSender name="local"
class="org.apache.axis2.transport.local.LocalTransportSender"/>
<transportSender name="http"
class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
<parameter name="PROTOCOL">HTTP/1.1</parameter>
<parameter name="Transfer-Encoding">chunked</parameter>
</transportSender>
<transportSender name="https"
class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
<parameter name="PROTOCOL">HTTP/1.1</parameter>
<parameter name="Transfer-Encoding">chunked</parameter>
</transportSender>
<module ref="addressing"/>
<module ref="rampart"/>
<clustering class="org.apache.axis2.clustering.tribes.TribesClusteringAgent" enable="false">
<parameter name="AvoidInitiation">true</parameter>
<parameter name="membershipScheme">multicast</parameter>
<!--
The clustering domain/group. Nodes in the same group will belong to the same multicast
domain. There will not be interference between nodes in different groups.
-->
<parameter name="domain">wso2.carbon.domain</parameter>
<parameter name="synchronizeAll">true</parameter>
<!--
The maximum number of times we need to retry to send a message to a particular node
before giving up and considering that node to be faulty
-->
<parameter name="maxRetries">10</parameter>
<!-- The multicast address to be used -->
<parameter name="mcastAddress">228.0.0.4</parameter>
<!-- The multicast port to be used -->
<parameter name="mcastPort">45564</parameter>
<!-- The frequency of sending membership multicast messages (in ms) -->
<parameter name="mcastFrequency">500</parameter>
<!-- The time interval within which if a member does not respond, the member will be
deemed to have left the group (in ms)
-->
<parameter name="memberDropTime">3000</parameter>
<!--
The IP address of the network interface to which the multicasting has to be bound to.
Multicasting would be done using this interface.
-->
<parameter name="mcastBindAddress">127.0.0.1</parameter>
<!-- The host name or IP address of this member -->
<parameter name="localMemberHost">127.0.0.1</parameter>
<!--
The TCP port used by this member. This is the port through which other nodes will
contact this member
-->
<parameter name="localMemberPort">4000</parameter>
<!--
Preserve message ordering. This will be done according to sender order.
-->
<parameter name="preserveMessageOrder">true</parameter>
<!--
Maintain atmost-once message processing semantics
-->
<parameter name="atmostOnceMessageSemantics">true</parameter>
<!--
Properties specific to this member
-->
<parameter name="properties">
<property name="backendServerURL" value="https://${hostName}:${httpsPort}/services/"/>
<property name="mgtConsoleURL" value="https://${hostName}:${httpsPort}/"/>
</parameter>
<members>
<member>
<hostName>127.0.0.1</hostName>
<port>4000</port>
</member>
<member>
<hostName>127.0.0.1</hostName>
<port>4001</port>
</member>
</members>
<groupManagement enable="false">
<applicationDomain name="apache.axis2.application.domain"
description="Axis2 group"
agent="org.apache.axis2.clustering.management.DefaultGroupManagementAgent"/>
</groupManagement>
<nodeManager class="org.apache.axis2.clustering.management.DefaultNodeManager"
enable="true"/>
<stateManager class="org.apache.axis2.clustering.state.DefaultStateManager"
enable="true">
<replication>
<defaults>
<exclude name="local_*"/>
<exclude name="LOCAL_*"/>
</defaults>
<context class="org.apache.axis2.context.ConfigurationContext">
<exclude name="local_*"/>
</context>
<context class="org.apache.axis2.context.ServiceGroupContext">
<exclude name="local_*"/>
</context>
<context class="org.apache.axis2.context.ServiceContext">
<exclude name="local_*"/>
</context>
</replication>
</stateManager>
</clustering>
<!-- ================================================= -->
<!-- Phases -->
<!-- ================================================= -->
<phaseOrder type="InFlow">
<!-- System predefined phases -->
<phase name="Transport">
<handler name="RequestURIBasedDispatcher"
class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
<order phase="Transport"/>
</handler>
<handler name="SOAPActionBasedDispatcher"
class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
<order phase="Transport"/>
</handler>
</phase>
<phase name="Addressing">
<handler name="AddressingBasedDispatcher"
class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
<order phase="Addressing"/>
</handler>
</phase>
<phase name="Security"/>
<phase name="PreDispatch"/>
<phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
<handler name="RequestURIBasedDispatcher"
class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
<handler name="SOAPActionBasedDispatcher"
class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
<handler name="RequestURIOperationDispatcher"
class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
<handler name="SOAPMessageBodyBasedDispatcher"
class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
<handler name="HTTPLocationBasedDispatcher"
class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
<handler name="GenericProviderDispatcher"
class="org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher"/>
<handler name="MustUnderstandValidationDispatcher"
class="org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher"/>
</phase>
<phase name="RMPhase"/>
<!-- System predefined phases -->
<!-- After Postdispatch phase module author or service author can add any phase he want -->
<phase name="OperationInPhase">
<handler name="MustUnderstandChecker"
class="org.apache.axis2.jaxws.dispatchers.MustUnderstandChecker">
<order phase="OperationInPhase"/>
</handler>
</phase>
<phase name="soapmonitorPhase"/>
</phaseOrder>
<phaseOrder type="OutFlow">
<!-- user can add his own phases to this area -->
<phase name="soapmonitorPhase"/>
<phase name="OperationOutPhase"/>
<!--system predefined phase-->
<!--these phase will run irrespective of the service-->
<phase name="RMPhase"/>
<phase name="PolicyDetermination"/>
<phase name="MessageOut"/>
<phase name="Security"/>
</phaseOrder>
<phaseOrder type="InFaultFlow">
<phase name="Addressing">
<handler name="AddressingBasedDispatcher"
class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
<order phase="Addressing"/>
</handler>
</phase>
<phase name="Security"/>
<phase name="PreDispatch"/>
<phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
<handler name="RequestURIBasedDispatcher"
class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
<handler name="SOAPActionBasedDispatcher"
class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
<handler name="RequestURIOperationDispatcher"
class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
<handler name="SOAPMessageBodyBasedDispatcher"
class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
<handler name="HTTPLocationBasedDispatcher"
class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
<handler name="GenericProviderDispatcher"
class="org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher"/>
<handler name="MustUnderstandValidationDispatcher"
class="org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher"/>
</phase>
<phase name="RMPhase"/>
<!-- user can add his own phases to this area -->
<phase name="OperationInFaultPhase"/>
<phase name="soapmonitorPhase"/>
</phaseOrder>
<phaseOrder type="OutFaultFlow">
<!-- user can add his own phases to this area -->
<phase name="soapmonitorPhase"/>
<phase name="OperationOutFaultPhase"/>
<phase name="RMPhase"/>
<phase name="PolicyDetermination"/>
<phase name="MessageOut"/>
<phase name="Security"/>
</phaseOrder>
</axisconfig>
and PWCBHandler class
public class PWCBHandler implements CallbackHandler {
public void handle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException {
for (int i = 0; i < callbacks.length; i++) {
// Client uses this callbackt o retrieve the password
WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
if(pwcb.getIdentifier().equals("apache")) {
pwcb.setPassword("admin1");
return;
}
}
}
}
and here is stack Trace
[ERROR] Missing wsse:Security header in request
org.apache.axis2.AxisFault: Missing wsse:Security header in request
at org.apache.rampart.handler.RampartReceiver.setFaultCodeAndThrowAxisFault(RampartReceiver.java:186)
at org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:99)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:168)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:364)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at rampart.client.Temp_SecureStub.farenhit2Celcius(Temp_SecureStub.java:451)
at rampart.client.TempConvClient.main(TempConvClient.java:128)
Caused by: org.apache.rampart.RampartException: Missing wsse:Security header in request
at org.apache.rampart.RampartEngine.process(RampartEngine.java:110)
at org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92)
... 10 more

which datasource api supports both connection pooling and XA transactions?

In the below Mule flow, i have to implement both connection pooling and XA transaction for JDBC connectivity. which datasource API supports both connection pooling and XA distributed transaction and how to implement it using spring beans and configure it to jdbc component?
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:core="http://www.mulesoft.org/schema/mule/core"
xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core" xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting"
xmlns:jbossts="http://www.mulesoft.org/schema/mule/jbossts" xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking"
xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/jbossts http://www.mulesoft.org/schema/mule/jbossts/current/mule-jbossts.xsd
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd">
<!-- <jdbc-ee:mysql-data-source name="MySQL_REP_Data_Source" user="${rep.db.user}"
password="${rep.db.password}" url="${rep.db.url}" transactionIsolation="UNSPECIFIED"
doc:name="MySQL Data Source" /> -->
<spring:beans>
<spring:bean id="MySQL_Data_Source"
class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"
name="Bean">
<spring:property name="driverClass" value="com.mysql.jdbc.Driver" />
<spring:property name="jdbcUrl" value="${rep.db.url}" />
<spring:property name="user" value="${rep.db.user}" />
<spring:property name="password" value="${rep.db.password}" />
<spring:property name="maxIdleTime" value="180" />
<spring:property name="minPoolSize" value="10" />
<spring:property name="acquireIncrement" value="-1" />
<spring:property name="maxPoolSize" value="100" />
</spring:bean>
</spring:beans>
<spring:beans>
<spring:bean id="MySQL_REP_Data_Source" name="MySQL_REP_Data_Source"
class="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource">
<spring:property name="user" value="${rep.db.user}" />
<spring:property name="password" value="${rep.db.password}" />
<spring:property name="url" ref="${rep.db.url}" />
</spring:bean>
</spring:beans>
<jbossts:transaction-manager doc:name="Transaction Manager">
<property key="com.arjuna.ats.arjuna.coordinator.defaultTimeout"
value="${trans.default.timeout}" /> <!-- timeout in seconds -->
<property key="com.arjuna.ats.arjuna.coordinator.txReaperTimeout"
value="${trans.reaper.timeout}" /> <!-- timeout in milliseconds -->
</jbossts:transaction-manager>
<jdbc-ee:connector name="Reporting_Database"
dataSource-ref="MySQL_REP_Data_Source" validateConnections="true"
queryTimeout="-1" pollingFrequency="0" doc:name="Database">
<reconnect blocking="false" frequency="10000" count="3"></reconnect>
</jdbc-ee:connector>
<vm:connector name="VM_Connector" validateConnections="true"
doc:name="VM_Connector" createMultipleTransactedReceivers="true"
numberOfConcurrentTransactedReceivers="4">
</vm:connector>
<flow name="ApiKeyLoadImplFlow" doc:name="ApiKeyLoadImplFlow"
initialState="started">
<vm:inbound-endpoint exchange-pattern="request-response"
doc:name="Impl_ApiKeyLoad_Req" path="ImplApiKeyLoadReq"
connector-ref="VM_Connector" responseTimeout="${vm.response.timeout}">
<xa-transaction action="BEGIN_OR_JOIN" />
</vm:inbound-endpoint>
<logger message="Start of Api Key Load Implementation" level="DEBUG"
doc:name="ENTRY_LOG" />
<set-variable variableName="FlowData" value="#[payload]"
doc:name="FlowData" />
<set-variable variableName="#['UserId']" value="#[payload.getUserID()]"
doc:name="UserID" />
<choice doc:name="Choice">
<when expression="#[payload.getType().equalsIgnoreCase('incremental')]">
<choice doc:name="Choice">
<when expression="#[flowData.getAction().equalsIgnoreCase('update')]">
<flow-ref name="CheckApiKeyExistFlow" doc:name="CheckApiKeyExistsFlow" />
<choice doc:name="Choice">
<when expression="#[payload.size() == '0']">
<set-payload doc:name="FlowData" value="#[variable:FlowData]" />
<flow-ref name="InsertApiKeyFlow" doc:name="InsertApiKeyFlow" />
</when>
<when expression="#[payload.size() != '0']">
<set-payload doc:name="FlowData" value="#[variable:FlowData]" />
<flow-ref name="UpdateApiKeyFlow" doc:name="UpdateApiKeyFlow" />
</when>
<otherwise>
<set-payload value="#['Internal Server Error']"
doc:name="Internal_Server_Error" />
<logger message="Status for UserId #[flowVars.UserId] : #[payload]"
level="WARN" doc:name="Internal_Server_Status" />
</otherwise>
</choice>
</when>
<when expression="#[flowData.getAction().equalsIgnoreCase('delete')]">
<flow-ref name="CheckApiKeyExistFlow" doc:name="CheckApiKeyExistsFlow" />
<choice doc:name="Choice">
<when expression="#[payload.size() == '0']">
<set-payload value="#['DataNotFound']" doc:name="Data_Not_Found" />
<logger message="Status for UserId #[flowVars.UserId] : #[payload]"
level="WARN" doc:name="Data_Not_Found_Status" />
</when>
<when expression="#[payload.size() != '0']">
<set-payload doc:name="FlowData" value="#[variable:FlowData]" />
<flow-ref name="DeleteApiKeyFlow" doc:name="DeleteApiKeyFlow" />
</when>
<otherwise>
<set-payload value="#['Internal Server Error']"
doc:name="Internal_Server_Error" />
<logger message="Status for UserId #[flowVars.UserId] : #[payload]"
level="WARN" doc:name="Internal_Server_Status" />
</otherwise>
</choice>
</when>
<otherwise>
<set-payload value="#['InvalidAction']" doc:name="Invalid_Action" />
<logger message="Status for UserId #[flowVars.UserId] : #[payload]"
level="WARN" doc:name="Invalid_Action_Status" />
</otherwise>
</choice>
</when>
<when expression="#[payload.getType().equalsIgnoreCase('full')]">
<set-payload doc:name="FlowData" value="#[variable:FlowData]" />
<flow-ref name="InsertApiKeyFlow" doc:name="InsertApiKeyFlow" />
</when>
<otherwise>
<set-payload value="#['Internal Server Error']"
doc:name="Internal_Server_Error" />
<logger message="Status for UserId #[flowVars.UserId] : #[payload]"
level="WARN" doc:name="Internal_Server_Status" />
</otherwise>
</choice>
<logger message="End of Api Key Load Implementation" level="DEBUG"
doc:name="EXIT_LOG" />
<catch-exception-strategy doc:name="Catch Exception Strategy">
<logger level="WARN" doc:name="Exception_Log"
message="Exception in ApiKeyLoadImplFlow #[System.getProperty('line.separator')] Error Description = #[exception.getMessage()]" />
</catch-exception-strategy>
</flow>
<sub-flow name="CheckApiKeyExistFlow" doc:name="CheckApiKeyExistFlow">
<logger message="Start of Check Api Key Implementation" level="DEBUG"
doc:name="START_LOG" />
<jdbc-ee:outbound-endpoint exchange-pattern="request-response"
queryKey="checkdata" queryTimeout="-1" connector-ref="Reporting_Database"
doc:name="Check_Value_Exists">
<xa-transaction action="JOIN_IF_POSSIBLE" />
<jdbc-ee:query key="checkdata"
value="${ftp.db.t_bmrs_api_keys.checkdata.query}" />
</jdbc-ee:outbound-endpoint>
<logger message="End of Check Api Key Exists Implementation"
level="DEBUG" doc:name="EXIT_LOG" />
</sub-flow>
</mule>
You need to have a javax.sql.XADataSource that implements connection pooling. You will usually need a JDBC driver specific data source for this, because supporting XA (distributed transactions) requires close coordination with how the database system implements two-phase commit.
Note that contrary to what the name suggests, a javax.sql.ConnectionPoolDataSource should not provide connection pooling, it is a data source for a connection pool.

Multinesting Gradle Projects in IntelliJ Idea

I am using IntelliJ Idea 14.1.4 and Gradle, and I am trying to create sub projects and nested sub projects:
Project
|--Research
|--Development
|--Algorithms
The reason for this is that research algorithms are separate from the development implementation. They are written in different languages (Python vs. Java) and used by different programmers, however I still want to maintain one Gradle project, so eventually researchers would be able to use stable existing algorithms implementations when developing new ones.
My problem is that Idea doesn't recognize properly the Gradle structure of the second level Gradle sub project: Project is recognized well, Research and Development are recognized well, but the Algorithms sub project is not recognized:
The code inspection of the gradle.build file in Algorithms project is highlighted as a warning with a message that test cannot be applies to Groovy.lang.closure Note that below is the complete build.gradle:
test{
useTestNG()
testLogging.showStandardStreams = true
}
Also, when I try in Idea Run->Edit Configurations->Defaults->Gradle and trying to choose Gradle project, I see that in the pop-up menu Development and Research do appear as sub-projects of Project, but Algorithms appears as a stand alone project.
Making the project however does create all the binaries and manually running a test case also works well.
When I run Gradle for command line, it appears to be working well and recognizing all nested projects: All the code is being compiled and tests are being ran. So the question here is if there is an Idea issue here which is not working correctly with Gradle, or am I doing something wrong?
Code for build.gradle inside Project:
allprojects {
group 'com.project'
version 'v0.1'
repositories {
mavenCentral()
}
}
Code for settings.gradle inside Project
rootProject.name = 'Project'
include 'Development'
include 'Development:Algorithms'
include 'Research'
Code for build.gradle of Development sub-project:
subprojects {
apply plugin: 'java'
repositories {
jcenter()
}
dependencies{
testCompile 'org.testng:testng:6.9.4'
}
}
Other code samples that I might be writing wrong (most of them are auto generated by Idea:
Project.iml:
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="Project" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="com.project" external.system.module.version="v0.1" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build" />
<output-test url="file://$MODULE_DIR$/build" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Development.iml
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":Development" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="com.project" external.system.module.version="v0.1" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build" />
<output-test url="file://$MODULE_DIR$/build" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Algorithms.iml
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":Development:Algorithms" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="com.project" external.system.module.version="v0.1" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes/main" />
<output-test url="file://$MODULE_DIR$/build/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library" scope="TEST">
<library>
<CLASSES>
<root url="jar://$APPLICATION_HOME_DIR$/plugins/testng/lib/testng.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
I would like to point the following:
All projects and sub-projects have the same group: com.project
In Algorithms.iml the original (auto generated) value of external.linked.project.id was :Algorithms. I have tried setting it to :Development:Algorithms to see if it will change anything. After each change I have ran rebuild.
In Algorithms.iml the original (auto generated) value of external.root.project.path was $MODULE_DIR$/... I have tried setting it to $MODULE_DIR$/../.. to see if it will change anything. After each change I have ran rebuild.
****************************Edit********************************
Further investigation shows an issue with the workspace.xml file:
There is a GradleLocalSettingsElement there that was automatically created, but appears to be wrong: There are two different entries: one for Development and Devlopment:Algorithms and onw for the rest, so I might have did something wrong when I created the project.
My question is if there is a reference for the structure of this file and specifically for the elements inserted by the Gradle plugin?
<map>
<entry>
<key>
<ExternalProjectPojo>
<option name="name" value="Development" />
<option name="path" value="$PROJECT_DIR$/Development" />
</ExternalProjectPojo>
</key>
<value>
<list>
<ExternalProjectPojo>
<option name="name" value="Development" />
<option name="path" value="$PROJECT_DIR$/Development" />
</ExternalProjectPojo>
<ExternalProjectPojo>
<option name="name" value=":Development:Algorithms" />
<option name="path" value="$PROJECT_DIR$/Development/Algorithms" />
</ExternalProjectPojo>
</list>
</value>
</entry>
<entry>
<key>
<ExternalProjectPojo>
<option name="name" value="Project" />
<option name="path" value="$PROJECT_DIR$" />
</ExternalProjectPojo>
</key>
<value>
<list>
<ExternalProjectPojo>
<option name="name" value="Project" />
<option name="path" value="$PROJECT_DIR$" />
</ExternalProjectPojo>
<ExternalProjectPojo>
<option name="name" value=":Development" />
<option name="path" value="$PROJECT_DIR$/Development" />
</ExternalProjectPojo>
<ExternalProjectPojo>
<option name="name" value=":Research" />
<option name="path" value="$PROJECT_DIR$/Research" />
</ExternalProjectPojo>
</list>
</value>
</entry>
</map>

Axis Custom Handler not being run for wsdl

We have a legacy web service using Axis 1.4 to receive SOAP calls. Currently the servlet-mapping in the web.xml is using the url-pattern /services/* so that anything under services will map to the AxisServlet. Our wsdd file looks something like this:
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="MyService" provider="java:RPC">
<parameter name="allowedMethods" value="*"/>
<parameter name="className" value="com.foo.MyService"/>
<wsdlFile>path/to/wsdl.wsdl</wsdlFile>
</service>
<transport name="http">
<requestFlow>
<handler type="java:org.apache.axis.handlers.http.URLMapper"/>
<handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
</requestFlow>
</transport>
<globalConfiguration>
<requestFlow>
<handler type="java:com.foo.AxisRequestHandler"/>
</requestFlow>
<responseFlow>
<handler type="java:com.foo.AxisResponseHandler"/>
</responseFlow>
</globalConfiguration>
</deployment>
We now no longer want everything under services to go to Axis, only services/MyService so that we can use other technologies for other requests under services.
So, I changed the web.xml url-pattern for thew AxisServlet to services/MyService. Then, I wanted to remove the URLMapper from the wsdd and have my AxisRequestHandler send all requests to MyService. So, the wsdd now looks like this:
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="MyService" provider="java:RPC">
<parameter name="allowedMethods" value="*"/>
<parameter name="className" value="com.foo.MyService"/>
<wsdlFile>path/to/wsdl.wsdl</wsdlFile>
</service>
<transport name="http">
<requestFlow>
<handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
</requestFlow>
</transport>
<globalConfiguration>
<requestFlow>
<handler type="java:com.foo.AxisRequestHandler"/>
</requestFlow>
<responseFlow>
<handler type="java:com.foo.AxisResponseHandler"/>
</responseFlow>
</globalConfiguration>
</deployment>
And in the AxisRequestHandler I have this:
public void invoke(MessageContext context) throws AxisFault
{
context.setTargetService("MyService");
}
This all works great when actually making the SOAP calls. However, when I go to /services/MyService?wsdl to server up the WSDL file, I get the following error:
I've put debug logs in the AxisRequestHandler, and whenever I hit the wsdl, it never hits my handler. Is there something I'm missing here?
After debugging through the Axis code a while, I found that there is a generateWSDL method for the handlers. I added this to AxisRequestHandler:
public void generateWSDL(MessageContext context) throws AxisFault
{
context.setTargetService("MyService");
}
This method gets called when hitting /services/MyService?wsdl , causing the right service to be set.

Axis2 Migration

We had an application using axis2 1.0. We recently migrated to axis2 1.4. After migration we are facing the following error at runtime:
public static org.apache.axis2.context.ConfigurationContext org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromURIs(java.net.URL,java.net.URL) throws org.apache.axis2.AxisFault] threw exception;
nested exception is org.apache.axis2.AxisFault: Invalid phases please recheck axis2.xml {0} for the handler {1}
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(AccessController.java:224)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at com.wellpoint.integration.saf.api.SAFServiceFactory.<init>(SAFServiceFactory.java:45)
at com.wellpoint.integration.saf.api.SAFServiceFactory.<init>(SAFServiceFactory.java:39)
at com.wellpoint.integration.saf.api.SAFServiceFactory.getInstance(SAFServiceFactory.java:54)
at com.idea.app.service.IdeaValidateServiceImpl.getGroupRecordFromSAF(IdeaValidateServiceImpl.java:168)
at com.idea.app.service.IdeaValidateServiceImpl.ValidateGroupInfo(IdeaValidateServiceImpl.java:87)
at com.idea.app.validators.GroupNumberValidator.isValidGroup(GroupNumberValidator.java:185)
at com.idea.app.validators.GroupNumberValidator.validate(GroupNumberValidator.java:97)
at org.richfaces.component.html.HtmlInputText.validateValue(HtmlInputText.java:52)
at javax.faces.component.UIInput.validate(UIInput.java:875)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
at javax.faces.component.UIInput.processDecodes(UIInput.java:642)
at javax.faces.component.UIForm.processDecodes(UIForm.java:209)
at org.ajax4jsf.component.AjaxViewRoot$1.invokeContextCallback(AjaxViewRoot.java:392)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:238)
at org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java:409)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1384)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:852)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:785)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:859)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
The following listing is the axis2.xml:
<axisconfig name="AxisJava2.0">
<!-- ================================================= -->
<!-- Parameters -->
<!-- ================================================= -->
<parameter name="hotdeployment">true</parameter>
<parameter name="hotupdate">false</parameter>
<parameter name="enableMTOM">false</parameter>
<parameter name="enableSwA">false</parameter>
<!--Uncomment if you want to enable file caching for attachments -->
<!--parameter name="cacheAttachments">true</parameter>
<parameter name="attachmentDIR"></parameter>
<parameter name="sizeThreshold">4000</parameter-->
<!--Uncomment if you want to plugin your own attachments lifecycle implementation -->
<!--<attachmentsLifecycleManager class="org.apache.axiom.attachments.lifecycle.impl.LifecycleManagerImpl"/>-->
<!--Uncomment if you want to enable the reduction of the in-memory cache of WSDL definitions -->
<!--In some server environments, the available memory heap is limited and can fill up under load -->
<!--Since in-memory copies of WSDL definitions can be large, some steps can be taken-->
<!--to reduce the memory needed for the cached WSDL definitions. -->
<!--parameter name="reduceWSDLMemoryCache">true</parameter-->
<!--This will give out the timout of the configuration contexts, in milliseconds-->
<parameter name="ConfigContextTimeoutInterval">30000</parameter>
<!--During a fault, stack trace can be sent with the fault message. The following flag will control -->
<!--that behavior.-->
<parameter name="sendStacktraceDetailsWithFaults">false</parameter>
<!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
<!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
<!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
<!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
<parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
<parameter name="userName">admin</parameter>
<parameter name="password">axis2</parameter>
<!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
<!--ServicesDirectory only works on the following cases-->
<!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
<!---When creating URL Based configurator with URL file:// -->
<!--- War based configurator with expanded case , -->
<!--All the other scenarios it will be ignored.-->
<!--<parameter name="ServicesDirectory">service</parameter>-->
<!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
<!--<parameter name="ModulesDirectory">modules</parameter>-->
<!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
<!--root which can configured using the following contextRoot parameter-->
<!--<parameter name="contextRoot">axis2</parameter>-->
<!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-->
<!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
<!--context path to proper Axis2 servlets-->
<!--<parameter name="servicePath">services</parameter>-->
<!--<parameter name="restPath">rest</parameter>-->
<!-- Following parameter will completely disable REST handling in Axis2-->
<parameter name="disableREST" locked="true">false</parameter>
<!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
<parameter name="disableSOAP12" locked="true">false</parameter>
<!--POJO deployer , this will alow users to drop .class file and make that into a service-->
<!-- <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>-->
<!-- <deployer extension=".jar" directory="servicejars" class="org.apache.axis2.jaxws.framework.JAXWSDeployer"/>-->
<!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
<!-- Following parameter will set the host name for the epr-->
<!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
<!-- If you have a front end host which exposes this webservice using a different public URL -->
<!-- use this parameter to override autodetected url -->
<!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
<!-- The way of adding listener to the system-->
<!-- <listener class="org.apache.axis2.ObserverIMPL">-->
<!-- <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
<!-- </listener>-->
<!-- threadContextMigrators>
<threadContextMigrator listId="JAXWS-ThreadContextMigrator-List" class="org.apache.axis2.jaxws.addressing.migrator.EndpointContextMapMigrator"/>
</threadContextMigrators -->
<!-- ================================================= -->
<!-- Message Receivers -->
<!-- ================================================= -->
<!--This is the deafult MessageReceiver for the system , if you want to have MessageReceivers for -->
<!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
<!--any operation -->
<!--Note : You can ovrride this for a particular service by adding the same element with your requirement-->
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
<messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only" class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
<messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
</messageReceivers>
<!-- ================================================= -->
<!-- Message Formatter -->
<!-- ================================================= -->
<!--Following content type to message formatter mapping can be used to implement support for different message -->
<!--format serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
<messageFormatters>
<messageFormatter contentType="application/x-www-form-urlencoded" class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
<messageFormatter contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
<messageFormatter contentType="application/xml" class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
<messageFormatter contentType="text/xml" class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
<messageFormatter contentType="application/soap+xml" class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
</messageFormatters>
<!-- ================================================= -->
<!-- Message Builders -->
<!-- ================================================= -->
<!--Following content type to builder mapping can be used to implement support for different message -->
<!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
<messageBuilders>
<messageBuilder contentType="application/xml" class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
<messageBuilder contentType="application/xml" class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
<messageBuilder contentType="application/x-www-form-urlencoded" class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
<messageBuilder contentType="multipart/form-data" class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
</messageBuilders>
<!-- ================================================= -->
<!-- Transport Ins -->
<!-- ================================================= -->
<!-- <transportReceiver name="http"-->
<!-- class="org.apache.axis2.transport.http.SimpleHTTPServer">-->
<!-- <parameter name="port" locked="false">6060</parameter>-->
<!--If you want to give your own host address for EPR generation-->
<!--uncommet following paramter , and set as you required.-->
<!--<parameter name="hostname" locked="false">http://myApp.com/ws</parameter>-->
<!-- </transportReceiver>-->
<!--Uncomment if you want to have SMTP transport support-->
<!--<transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">-->
<!--<parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>-->
<!--<parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>-->
<!--<parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>-->
<!--<parameter name="transport.mail.pop3.port" locked="false">110</parameter>-->
<!--<parameter name="transport.mail.replyToAddress" locked="false">axis2#127.0.0.1</parameter>-->
<!--</transportReceiver>-->
<!-- <transportReceiver name="tcp"-->
<!-- class="org.apache.axis2.transport.tcp.TCPServer">-->
<!-- <parameter name="port" locked="false">6060</parameter>-->
<!--If you want to give your own host address for EPR generation-->
<!--uncommet following paramter , and set as you required.-->
<!--<parameter name="hostname" locked="false">tcp://myApp.com/ws</parameter>-->
<!-- </transportReceiver>-->
<!--Uncomment this if you want JMS transport support-->
<!-- <transportReceiver name="jms" class="org.apache.axis2.transport.jms.SimpleJMSListener">-->
<!-- <parameter name="transport.jms.Destination" locked="false">${filter.jms.queue.response}</parameter>-->
<!-- <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">${filter.jms.ConnectionFactoryJNDIName}</parameter>-->
<!-- <parameter name="java.naming.factory.initial" locked="false">${filter.jms.java.naming.factory.initial}</parameter>-->
<!-- <parameter name="java.naming.provider.url" locked="false">${filter.jms.java.naming.provider.url}</parameter>-->
<!-- <parameter name="transport.jms.Destination" locked="false">jms/soap/ResponseQ</parameter>-->
<!-- <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">jms/LocalQCF</parameter>-->
<!-- <parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>-->
<!-- <parameter name="java.naming.provider.url" locked="false">file:/</parameter>-->
<!-- </transportReceiver>-->
<!-- ================================================= -->
<!-- Transport Outs -->
<!-- ================================================= -->
<!-- <transportSender name="tcp"-->
<!-- class="org.apache.axis2.transport.tcp.TCPTransportSender"/>-->
<transportSender name="local" class="com.wellpoint.integration.saf.integration.axis2.transport.local.LocalTransportSender"/>
<!-- Custom Transport Layer for RPC - AXIS2 Implementation -->
<!-- transportSender name="rpc"
class="com.wellpoint.integration.saf.integration.axis2.transport.rpc.RPCTransportSender"/>-->
<transportSender name="jms" class="com.wellpoint.integration.saf.integration.axis2.transport.jms.JMSSender"/>
<!-- <transportSender name="jms"-->
<!-- class="org.apache.axis2.transport.jms.JMSSender"/>-->
<transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
<parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
<!-- <parameter name="Transfer-Encoding" locked="false">chunked</parameter>-->
</transportSender>
<transportSender name="https" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
<parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
<!-- <parameter name="Transfer-Encoding" locked="false">chunked</parameter>-->
</transportSender>
<!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver
<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
<parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>
<parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>
<parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>
<parameter name="transport.mail.smtp.port" locked="false">25</parameter>
</transportSender>
-->
<!-- ================================================= -->
<!-- Global Modules -->
<!-- ================================================= -->
<!-- Comment this to disable Addressing -->
<!-- <module ref="addressing"/>-->
<!-- <module ref="logging"/>-->
<!-- <module ref="soapmonitor"/>-->
<!--Configuring module , providing parameters for modules whether they refer or not-->
<!--<moduleConfig name="addressing">-->
<!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
<!--</moduleConfig>-->
<!-- ================================================= -->
<!-- Phases -->
<!-- ================================================= -->
<phaseOrder type="InFlow">
<!-- System pre defined phases -->
<phase name="Transport">
<handler name="RequestURIBasedDispatcher" class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
<order phase="Transport"/>
</handler>
<handler name="SOAPActionBasedDispatcher" class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
<order phase="Transport"/>
</handler>
</phase>
<phase name="Addressing">
<handler name="AddressingBasedDispatcher" class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
<order phase="Addressing"/>
</handler>
</phase>
<phase name="Security"/>
<phase name="PreDispatch"/>
<phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
<handler name="RequestURIBasedDispatcher" class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
<handler name="SOAPActionBasedDispatcher" class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
<handler name="RequestURIOperationDispatcher" class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
<handler name="SOAPMessageBodyBasedDispatcher" class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
<handler name="HTTPLocationBasedDispatcher" class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
</phase>
<phase name="RMPhase"/>
<!-- System pre defined phases -->
<!-- After Postdispatch phase module author or or service author can add any phase he want -->
<phase name="OperationInPhase"/>
<phase name="LoggingPhase">
<handler name="LoggingHandler" class="com.wellpoint.integration.saf.integration.axis2.module.logging.LogHandler"/>
</phase>
<!-- <phase name="soapmonitorPhase"/> -->
</phaseOrder>
<phaseOrder type="OutFlow">
<!-- user can add his own phases to this area -->
<phase name="OperationOutPhase"/>
<phase name="LoggingPhase">
<handler name="LoggingHandler" class="com.wellpoint.integration.saf.integration.axis2.module.logging.LogHandler"/>
</phase>
<!-- <phase name="soapmonitorPhase"/> -->
<!--system predefined phase-->
<!--these phase will run irrespective of the service-->
<phase name="RMPhase"/>
<phase name="PolicyDetermination"/>
<phase name="MessageOut"/>
<phase name="Security"/>
</phaseOrder>
<phaseOrder type="InFaultFlow">
<phase name="Addressing">
<handler name="AddressingBasedDispatcher" class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
<order phase="Addressing"/>
</handler>
</phase>
<phase name="Security"/>
<phase name="PreDispatch"/>
<phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
<handler name="RequestURIBasedDispatcher" class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
<handler name="SOAPActionBasedDispatcher" class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
<handler name="RequestURIOperationDispatcher" class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
<handler name="SOAPMessageBodyBasedDispatcher" class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
<handler name="HTTPLocationBasedDispatcher" class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
</phase>
<phase name="RMPhase"/>
<!-- user can add his own phases to this area -->
<phase name="OperationI
The problem was caused by versions mismatch of axis2 depenencies like axiom and wsdl. I am not sure specifically which jar it was but it seems older versions were downloaded by maven as part of transitive dependencies of some other artifact. This problem may come up due to other reasons may be but if you get it give a look if the axis2 dependencies(axiom,bcel,wsdl,neethi) are the correct versions of or not.
Hope it helps someone...

Categories