Ajith,
Thank you for the response. The problem is actually stranger than I
originally described. I am in fact receiving the correct soap response
except for the fact the the tag that wraps the <return> tag is wrong.
I am running two clients in parallel, one which makes repeated calls to
methodONE and another that makes repeated calls to methodTWO. The client
calling methodONE will intermittently receive the following response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header />
<soapenv:Body>
<ns:methodTWOResponse xmlns:ns="myServiceNS">
<ns:return>
correct methodONEResponse xml
</ns:return>
</ns:methodTWOResponse >
</soapenv:Body>
</soapenv:Envelope>
And the client calling methodTWO will intermittently receive this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header />
<soapenv:Body>
<ns:methodONEResponse xmlns:ns="myServiceNS">
<ns:return>
correct methodTWOResponse xml
</ns:return>
</ns:methodONEResponse >
</soapenv:Body>
</soapenv:Envelope>
Again, I am using Axis2 1.1.1, load Spring 2.0 and exposing a POJO as a
web service. I am sorry for inaccurately describing the problem in my
original post. I was verifying the response by simply checking this tag,
and not actually parsing the xml. It doesn't appear to have anything to
do with WS-Addressing or HTTP channels after all. Anyone have any
ideas/suggestions?
Thx
Ajith Ranabahu wrote:
hi,
Is there a chance that these two clients share the same HTTP channel ?
it is highly unlikely but if the two requests are in different
channels then there is no chance to mix them up even when there is no
use of WS-Addressing (AFAIK)
I guess the best thing to do would be to monitor the traffic using
tcpmon (http://ws.apache.org/commons/tcpmon/) and see whether there is
a connection getting reused. Also if this fails try enabling
WS-Addressing
Ajith
On 9/20/07, August Visco <[EMAIL PROTECTED]> wrote:
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]