[
https://issues.apache.org/jira/browse/AXIS-2746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608378#action_12608378
]
Daniel Woo commented on AXIS-2746:
----------------------------------
To fix this, I re-compiled the file CommonsHTTPSender.java, force
httpClient.getParams().setAuthenticationPreemptive(true); in line 137. Then
everything works.
This is definitely a good fix, I think axis should be able to have more control
over CommonsHTTPSender, eg, able to setAuthenticationPreemptive(). In axis2 i
did not encounter this problem, axis2 looks much more smart. But here I have to
adhere to axis1 for some reasons. Hopefully you guys can fix this by
configuring CommonsHTTPSender in client-config.wsdd, eg, add a sub element to
specify additional paramters to better control apache httpclient.
Below is the correct http traffic I got.
POST /sc62server/PWS/ChangeManagement.wsdl HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction: "Retrieve"
User-Agent: Axis/1.4
Authorization: Basic U01RQ0ludFVzZXI6cGVyZg==
Host: coconut.asiapacific.hpqcorp.net:13080
Transfer-Encoding: chunked
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=14A5053D07A325F860CF230C007BDFC4; Path=/sc62server
Keep-Alive: timeout=1200000, max=1000
Connection: Keep-Alive
Content-Type: text/xml;charset=utf-8
Content-Length: 976
Date: Thu, 26 Jun 2008 10:10:51 GMT
> Axis 1.4 with apache commons httpclient 3.1, throws "session no longer valid"
> -----------------------------------------------------------------------------
>
> Key: AXIS-2746
> URL: https://issues.apache.org/jira/browse/AXIS-2746
> Project: Axis
> Issue Type: Bug
> Components: Basic Architecture
> Affects Versions: 1.4
> Environment: jdk 1.5, axis 1.4, httpclient 3.1
> Reporter: Daniel Woo
>
> 1. add codec 1.3 and httpclient 3.1 to classpath
> 2. change client-config.wsdd, replace the line below
> <transport name="http"
> pivot="java:org.apache.axis.transport.http.HTTPSender"></transport>
> To this:
> <transport name="http"
> pivot="java:org.apache.axis.transport.http.CommonsHTTPSender"></transport>
> 3. generate a stub and execute the stub, to access two exposed actions, the
> server has basic http authentication
> 4. exceptions will be thrown
> AxisFault
> faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
> faultSubcode:
> faultString: Session no longer valid
> faultActor: Server
> faultNode:
> faultDetail:
> {http://xml.apache.org/axis/}stackTrace:Session no longer valid
> at
> org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
> at
> org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
> at
> org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
> at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
> at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
> at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Source)
> at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> at
> org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
> at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
> at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
> at
> org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
> at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
> at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
> at org.apache.axis.client.Call.invoke(Call.java:2767)
> at org.apache.axis.client.Call.invoke(Call.java:2443)
> at org.apache.axis.client.Call.invoke(Call.java:2366)
> at org.apache.axis.client.Call.invoke(Call.java:1812)
> at
> com.hp.ov.sm.ws.change.QCIntChangeService_BindingStub.retrieveQCIntChangeKeysList(Unknown
> Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]