missing wsse security header in request while running axis2 rampart - java

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

Related

Authenticating SOAP service using certificate encodedValue in MULE ESB

I'm provided with a wsdl and have to access certain service (TestMessage) using the authentication credentials provided (username : test-Ser, password: XXXX). The wsdl file was generated from the given config file in C#.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="PProxyEndpoint">
<security>
<message clientCredentialType="UserName" establishSecurityContext="false" />
</security>
</binding>
<binding name="PProxyEndpointSvcCertSpecified">
<security>
<message clientCredentialType="UserName" negotiateServiceCredential="false"
establishSecurityContext="false" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://p-cer.test.ca/PService.svc"
binding="wsHttpBinding" bindingConfiguration="PProxyEndpoint"
contract="IPService" name="PProxyEndpoint">
<identity>
<certificate encodedValue="XXXXXXXXXXXXXXXXXX............" />
</identity>
</endpoint>
<endpoint address="http://p-cer.test.ca/PService.svc/SvcCertSpecified"
binding="wsHttpBinding" bindingConfiguration="PProxyEndpointSvcCertSpecified"
contract="IPService" name="PProxyEndpointSvcCertSpecified">
<identity>
<certificate encodedValue="XXXXXXXXXXXXXXXXXX............" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
The authentication code is in C# as below:
private static TestClient AuthUser()
{
TestClient client = new TestClient();
client.ClientCredentials.UserName.UserName = “XXXX”;
client.ClientCredentials.UserName.Password = “XXXXX”;
return client;
}
using (TestClient test = AuthUser())
{
TestListRequestItemWrapper ttt = new TestListRequestItemWrapper();
ttt.RequestItems = new ListRequestItem[1];
ttt.RequestItems[0] = new ListRequestItem();
TestListResponseItemWrapper resp = test.TestList(ttt);
}
I have to do same such thing in java, And I'm unable to do so. Please help.
How can I authenticate SOAP service using certificate encoded value in JAVA?
My configuration.xml in Mule ESB is as follow
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" basePath="test" doc:name="HTTP Listener Configuration"/>
<spring:beans>
<spring:bean name="myPasswordCallback" class="com.org.message.PasswordCallback"/>
</spring:beans>
<spring:beans>
<spring:bean id="wss4jInConfiguration" name="Bean" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
<spring:constructor-arg>
<spring:map>
<spring:entry key="action" value="UsernameToken "/>
<spring:entry key="passwordType" value="PasswordText"/>
<spring:entry key="user" value="vha-test.xml"/>
<spring:entry key="passwordCallbackRef" value-ref="myPasswordCallback">
</spring:entry>
</spring:map>
</spring:constructor-arg>
</spring:bean>
</spring:beans>
<http:listener-config name="HTTP_Listener_Configuration_3" host="0.0.0.0" port="8083" doc:name="HTTP Listener Configuration"/>
<ws:consumer-config name="Web_Service_Consumer" wsdlLocation="http://path.svc?wsdl" service="XService" port="XProxyEndpointSvcCertSpecified" serviceAddress="http://path.svc/SvcCertSpecified" doc:name="Web Service Consumer"/>
<flow name="testdemoFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<custom-transformer class="com.org.message.GetMessageExample" doc:name="Java"/>
<response>
<object-to-string-transformer doc:name="Object to String"/>
</response>
<cxf:jaxws-client serviceClass="com.org.IXmlService" doc:name="CXF" operation="GetMessageList" port="IXmlService" soapVersion="1.2">
<!-- <cxf:ws-security>
<cxf:ws-config>
<cxf:property key="action" value="UsernameToken"/>
<cxf:property key="user" value="uname"/>
<cxf:property key="passwordCallbackClass" value="com.org.message.PasswordCallback"/>
<cxf:property key="passwordType" value="PasswordText"/>
</cxf:ws-config>
</cxf:ws-security> -->
<cxf:inInterceptors>
<spring:bean class="org.apache.cxf.interceptor.LoggingInInterceptor" />
<spring:bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
<spring:constructor-arg>
<spring:map>
<spring:entry key="action" value="Signature" />
<spring:entry key="signaturePropFile" value="src/main/resources/ws-sign-security.properties" />
</spring:map>
</spring:constructor-arg>
</spring:bean>
</cxf:inInterceptors>
</cxf:jaxws-client>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
<message-properties-transformer doc:name="Message Properties">
<add-message-property key="Content-type" value="application/soap+xml"/>
<add-message-property key="charset" value="UTF-8"/>
</message-properties-transformer>
<http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="8084" method="POST" doc:name="HTTP"/>
</flow>
and below is another configuration.xml I've tried:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:ws="http://www.mulesoft.org/schema/mule/ws" xmlns:http="http://www.mulesoft.org/schema/mule/http" 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"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ws http://www.mulesoft.org/schema/mule/ws/current/mule-ws.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8081" basePath="wsdl" doc:name="HTTP Listener Configuration"/>
<ws:consumer-config name="Web_Service_Consumer" wsdlLocation="http://patyh.svc?wsdl" service="XService" port="XProxyEndpoint" serviceAddress="http://path.svc" doc:name="Web Service Consumer">
<ws:security>
<ws:wss-username-token username="uname" password="password" passwordType="TEXT" addCreated="true" addNonce="true"/>
<ws:wss-timestamp expires="60000"/>
</ws:security>
</ws:consumer-config>
<flow name="wsdltestFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<ws:consumer config-ref="Web_Service_Consumer" operation="PingWithAuthorization" doc:name="Web Service Consumer"/>
<logger level="INFO" doc:name="Logger" message="req gen : #[payload]"/>
</flow>
</mule>
I'm still not able to authenticate with any of the XMl

WSO2ESB Proxy - Payload mediator auto population

I want to populate payload mediator with the response from a first service and this payload is going to be sent to another service. I used context expression and everything seems correct. But payload mediator is not getting populated. When the message built to send to the second service, payload remains blank. I used ctx path expression shown below to populate.
Here is the proxy service configuration,
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="CreditProxy"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<log level="full">
<property name="sequence" value="inSequence - request for CreditProxy"/>
</log>
<property xmlns:sam="http://samples.esb.wso2.org"
name="ORG_ID"
expression="//sam:credit/sam:id"/>
<property xmlns:sam="http://samples.esb.wso2.org"
name="ORG_AMOUNT"
expression="//sam:credit/sam:amount"/>
<enrich>
<source type="inline" clone="true">
<sam:get xmlns:sam="http://samples.esb.wso2.org">
<sam:id>?</sam:id>
</sam:get>
</source>
<target type="body"/>
</enrich>
<enrich>
<source type="property" clone="true" property="ORG_ID"/>
<target xmlns:sam="http://samples.esb.wso2.org" xpath="//sam:get/sam:id"/>
</enrich>
<log level="full">
<property name="sequence" value="inSequence - request for PersonInfoService"/>
</log>
<property name="STATE" value="PERSON_INFO_REQUEST"/>
<send>
<endpoint>
<address uri="http://127.0.0.1:9764/services/PersonInfoService/"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<log level="full"/>
<property xmlns:ns="http://samples.esb.wso2.org"
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
xmlns:ax23="http://samples.esb.wso2.org/xsd"
name="address"
expression="/soapenv:Envelope/soapenv:Body/ns:getResponse/ns:return/ax23:address"
scope="default"
type="STRING"/>
<property xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
xmlns:ns="http://samples.esb.wso2.org"
xmlns:ax23="http://samples.esb.wso2.org/xsd"
name="id"
expression="/soapenv:Envelope/soapenv:Body/ns:getResponse/ns:return/ax23:id"
scope="default"
type="STRING"/>
<property xmlns:ns="http://samples.esb.wso2.org"
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
xmlns:ax23="http://samples.esb.wso2.org/xsd"
name="name"
expression="/soapenv:Envelope/soapenv:Body/ns:getResponse/ns:return/ax23:name"
scope="default"
type="STRING"/>
<payloadFactory media-type="xml">
<format>
<p:credit xmlns:p="http://samples.esb.wso2.org"><!--0 to 1 occurrence--><ax25:info xmlns:ax25="http://samples.esb.wso2.org"><!--0 to 1 occurrence--><xs:amount xmlns:xs="http://samples.esb.wso2.org/xsd">?</xs:amount>
<!--0 to 1 occurrence--><ax25:personInfo xmlns:ax25="http://samples.esb.wso2.org/xsd"><!--0 to 1 occurrence--><xs:address xmlns:xs="http://samples.esb.wso2.org/xsd">$1</xs:address>
<!--0 to 1 occurrence--><xs:id xmlns:xs="http://samples.esb.wso2.org/xsd">$2</xs:id>
<!--0 to 1 occurrence--><xs:name xmlns:xs="http://samples.esb.wso2.org/xsd">$3</xs:name>
</ax25:personInfo>
</ax25:info>
</p:credit>
</format>
<args>
<arg evaluator="xml" expression="$ctx:address"/>
<arg evaluator="xml" expression="$ctx:id"/>
<arg evaluator="xml" expression="$ctx:name"/>
</args>
</payloadFactory>
<send buildmessage="true">
<endpoint>
<address uri="http://127.0.0.1:9764/services/CreditService/"/>
</endpoint>
</send>
</outSequence>
<endpoint>
<address uri="http://127.0.0.1:9764/services/PersonInfoService/"/>
</endpoint>
</target>
<publishWSDL uri="file:./repository/samples/resources/proxy/CreditProxy.wsdl"/>
<description/>
</proxy>
What can be the reason for this?

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.

axis web service logging issue

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

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