Hello, I am new to web services and soap. I am using axis2 1.1.1 to load Spring 2.0 and expose a POJO as a web service. Additionally, I have a passwordCallbackClass for the rampart wss4j InflowSecurity which authenticates a username and password via kerberos via JAAS. Here is my services.xml:
<serviceGroup>

  <service name="SpringInitV1" class="myservice.SpringInit">
    <description>
        Initialize Spring
    </description>
    <parameter name="ServiceClass">myservice.SpringInit</parameter>
    <parameter name="ServiceTCCL">composite</parameter>
    <parameter name="load-on-startup">true</parameter>
    <operation name="springInit">
<messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
    </operation>
  </service>

<service name="MyService" targetNamespace="http://example.com/MyService";>
    <description>
        MyService Web Service
    </description>
    <transports>
      <transport>http</transport>
    </transports>
    <schema schemaNamespace="http://example.com/MyService/service/xsd";>
<mapping namespace="http://example.com/MyService/service/types/xsd"; package="myservice.types"></mapping>
    </schema>
    <parameter name="ServiceClass">myservice.MyServicePojo</parameter>
<parameter name="ServiceObjectSupplier">org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier</parameter>
    <parameter name="SpringBeanName">myservice</parameter>
    <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>
    <module ref="rampart" />
    <parameter name="InflowSecurity">
      <action>
        <items>UsernameToken</items>
<passwordCallbackClass>myservice.MyServiceSecurityManager</passwordCallbackClass>
      </action>
    </parameter>
  </service>

</serviceGroup>
I have a client written in perl (SOAP::Lite) which runs in a loop and makes requests to one of the methods exposed through the POJO. Here is a snippet:
my $soap = SOAP::Lite  -> uri($uri)  -> proxy($proxy)  -> outputxml(1);

my $Username = SOAP::Data->name('Username' => $cur_username);
my $Password = SOAP::Data->name('Password' => $cur_password)
->attr({Type => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}); my $UsernameToken = SOAP::Data->name('UsernameToken') ->value(\SOAP::Data->value($Username, $Password));
my $security = SOAP::Header->name(Security)
->attr({'xmlns' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'})
        ->value(\$UsernameToken);

$method = SOAP::Data->name('myServiceMethodName')->attr({xmlns => '$service_ns'}); my $param1 = SOAP::Data->name('param1') ->value(\SOAP::Data->value($param2, $param3)) ->attr({xmlns => '$service_type_ns'}); @param = SOAP::Data->value($param1)->attr({xmlns => '$service_ns'});

my $result = $soap->call($security, $method => @param);
The WSDL lists MyServiceSOAP11Binding and MyServiceSOAP11Binding bindings attached to the endpoint in the web service to which I am making the request. I'm using soap over an http transport.

It works perfectly in that I get the response I expect for that request. However, when I launch a parallel second client which loops and makes calls to a different method in the web service, then the two clients begin to intermittently receive responses destined to each other. Apparently, Axis2 is returning the first completed response to the first client waiting for a response. What am I doing wrong? Is this a configuration problem in axis2? I want a synchronous request/response behavior from the web service. Do I need to incorporate WS-Addressing into the request sent from the client? I was under the impressing that WS-Addressing was only required to redirect the response to a different endpoint than the one that made the request.

Thx


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to