Hello Oleg,
Attached you will find two wire protocols, one using 3.0 RC3 where the call is
successful and one using 3.0 RC4 where it fails.
Karl
--
T-FS
Karl Ostendorf
Friedrichstr. 30
49610 Quakenbrück
Mail: [EMAIL PROTECTED]
Fon: +49 5431 941215
Oleg Kalnichevski wrote:
On Fri, 2005-11-18 at 17:27 +0100, Karl Ostendorf wrote:
Hello,
Our Axis 1.3 SOAP application to access Microsoft's Mappoint web services
stopped working after switching to http-client v3RC4 from v3RC3. Specifically
we started receiving 401 (Unauthorized) responses under RC4 where in RC3 it
just worked. After some debugging I traced the problem down to the
HttpMethodDirector.promptForCredentials method lines 856-857. Under RC4 the
call to params.getParameter to get the CredentialsProvider returns a null while
under RC3 it returns a valid CredentialsProvider.
The java code to access the MapPoint services we generated from the MapPoint
WSDL file using WSDL2Java from the Axis 1.3 package. MapPoint authenticates
clients via the DIGEST method and because the built-in Axis web client doesn't
support DIGEST we followed the documentation and configured Axis to use the
commons http-client. Additionally, we are accessing the service via SSL on the
staging servers.
I have included the code to reproduce the problem below. If any http-client
developer would like to tackle this problem please contact me. I might be able
to supply the login credentials to our account in order to spare someone from
having to create a new account and uploading the necessary polygon data to the
servers.
Karl,
Please send me the wire log [1] generated with 3.0rc4 that exhibits the
problem and with 3.0rc4 that does not
Oleg
[1] http://jakarta.apache.org/commons/httpclient/logging.html
The code below retrieves a URL for a polygon on the servers.
public String getUrl(int entityId) throws MalformedURLException,
javax.xml.rpc.ServiceException, RemoteException {
log.info("EntityID: " + entityId);
FindServiceLocator flocator = new FindServiceLocator();
FindServiceSoap_PortType finder = flocator.getFindServiceSoap();
((FindServiceSoap_BindingStub) finder).setUsername(this.username);
((FindServiceSoap_BindingStub) finder).setPassword(this.password);
// location
FindFilter filter = new FindFilter();
filter.setEntityTypeName(ENTITY_TYPE);
FindByIDSpecification spec = new FindByIDSpecification();
spec.setDataSourceName(DS_POLYGONS);
spec.setEntityIDs(new int[] { entityId });
spec.setFilter(filter);
FindResults found = finder.findByID(spec);
}
1925 header >> "CONNECT findv3.staging.mappoint.net:443 HTTP/1.1"
1996 header >> "User-Agent: Jakarta Commons-HttpClient/3.0-rc3[\r][\n]"
1998 header >> "Host: findv3.staging.mappoint.net[\r][\n]"
2001 header >> "Proxy-Connection: Keep-Alive[\r][\n]"
2007 header >> "[\r][\n]"
2256 header << "HTTP/1.0 200 Connection established[\r][\n]"
2408 header >> "POST /Find-30/FindService.asmx HTTP/1.1[\r][\n]"
2427 header >> "Content-Type: text/xml; charset=utf-8[\r][\n]"
2431 header >> "SOAPAction:
"http://s.mappoint.net/mappoint-30/FindByID"[\r][\n]"
2434 header >> "User-Agent: Axis/1.3[\r][\n]"
2437 header >> "Host: findv3.staging.mappoint.net[\r][\n]"
2440 header >> "Transfer-Encoding: chunked[\r][\n]"
2445 header >> "[\r][\n]"
3323 content >> "1fb[\r][\n]"
3324 content >> "<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><FindByID
xmlns="http://s.mappoint.net/mappoint-30/"><specification><DataSourceName>TFS107768.107768.polygons</DataSourceName><Filter><EntityTypeName>polygons</EntityTypeName></Filter><EntityIDs><int>1</int></EntityIDs></specification></FindByID></soapenv:Body></soapenv:Envelope>"
3325 content >> "[\r][\n]"
3325 content >> "0"
3329 content >> "[\r][\n]"
3330 content >> "[\r][\n]"
3502 header << "HTTP/1.1 100 Continue[\r][\n]"
3516 header << "HTTP/1.1 401 Unauthorized[\r][\n]"
3530 header << "Connection: close[\r][\n]"
3531 header << "Date: Sat, 19 Nov 2005 10:13:17 GMT[\r][\n]"
3532 header << "Server: Microsoft-IIS/6.0[\r][\n]"
3533 header << "P3P: CP="BUS CUR CONo FIN IVDo ONL OUR PHY SAMo TELo"[\r][\n]"
3534 header << "X-Powered-By: ASP.NET[\r][\n]"
3535 header << "WWW-Authenticate: Digest qop="auth", realm="MapPoint",
nonce="058ce1c31bf6f30f7915932311001c0969ae245318c3a877671ae55744a3"[\r][\n]"
3536 header << "Content-Length: 0[\r][\n]"
3600 header >> "CONNECT findv3.staging.mappoint.net:443 HTTP/1.1"
3605 header >> "User-Agent: Jakarta Commons-HttpClient/3.0-rc3[\r][\n]"
3609 header >> "Host: findv3.staging.mappoint.net[\r][\n]"
3612 header >> "Proxy-Connection: Keep-Alive[\r][\n]"
3618 header >> "[\r][\n]"
3798 header << "HTTP/1.0 200 Connection established[\r][\n]"
3824 header >> "POST /Find-30/FindService.asmx HTTP/1.1[\r][\n]"
3836 header >> "Content-Type: text/xml; charset=utf-8[\r][\n]"
3839 header >> "SOAPAction:
"http://s.mappoint.net/mappoint-30/FindByID"[\r][\n]"
3842 header >> "User-Agent: Axis/1.3[\r][\n]"
3845 header >> "Transfer-Encoding: chunked[\r][\n]"
3847 header >> "Authorization: Digest username="107768", realm="MapPoint",
nonce="058ce1c31bf6f30f7915932311001c0969ae245318c3a877671ae55744a3",
uri="/Find-30/FindService.asmx", response="a900983ea4ed8aa867ff97968c474b17",
qop="auth", nc="00000001", cnonce="e67d91e647da701da45ae7f100a61341"[\r][\n]"
3851 header >> "Host: findv3.staging.mappoint.net[\r][\n]"
3855 header >> "[\r][\n]"
4113 content >> "1fb[\r][\n]"
4114 content >> "<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><FindByID
xmlns="http://s.mappoint.net/mappoint-30/"><specification><DataSourceName>TFS107768.107768.polygons</DataSourceName><Filter><EntityTypeName>polygons</EntityTypeName></Filter><EntityIDs><int>1</int></EntityIDs></specification></FindByID></soapenv:Body></soapenv:Envelope>"
4115 content >> "[\r][\n]"
4115 content >> "0"
4116 content >> "[\r][\n]"
4117 content >> "[\r][\n]"
4294 header << "HTTP/1.1 100 Continue[\r][\n]"
4516 header << "HTTP/1.1 200 OK[\r][\n]"
4532 header << "Date: Sat, 19 Nov 2005 10:13:18 GMT[\r][\n]"
4533 header << "Server: Microsoft-IIS/6.0[\r][\n]"
4534 header << "P3P: CP="BUS CUR CONo FIN IVDo ONL OUR PHY SAMo TELo"[\r][\n]"
4535 header << "X-Powered-By: ASP.NET[\r][\n]"
4535 header << "X-AspNet-Version: 1.1.4322[\r][\n]"
4536 header << "Cache-Control: private, max-age=0[\r][\n]"
4537 header << "Content-Type: text/xml; charset=utf-8[\r][\n]"
4538 header << "Content-Length: 1233[\r][\n]"
4550 content << "<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><FindByIDResponse
xmlns="http://s.mappoint.net/mappoint-30/"><FindByIDResult><NumberFound>1</NumberFound><StartIndex>0</StartIndex><Results><FindResult><Score>1</Score><FoundLocation><LatLong><Latitude>10.4323825</Latitude><Longitude>50.0234183333334</Longitude></LatLong><Entity><ID>1</ID><TypeName>polygons</TypeName><Properties><Property><Name>LocationName</Name><Value
xsi:type="xsd:string">32u274n4oyi5277j4oq80e</Value></Property><Property><Name>NELat</Name><Value
xsi:type="xsd:double">10.4331533333333</Value></Property><Property><Name>SWLat</Name><Value
xsi:type="xsd:double">10.4316116666667</Value></Property><Property><Name>NELong</Name><Value
xsi:type="xsd:double">50.0247516666667</Value></Property><Property><Name>SWLong</Name><Value
xsi:type="xsd:double">50.022085</Value></Property></Properties></Entity><Address
/><DataSourceName>TFS107768.107768.polygons</DataSourceName></FoundLocation></FindResult></Results><TopScore>1</TopS"
4554 content <<
"core></FindByIDResult></FindByIDResponse></soap:Body></soap:Envelope>"
1930 header >> "CONNECT findv3.staging.mappoint.net:443 HTTP/1.1"
2002 header >> "User-Agent: Jakarta Commons-HttpClient/3.0-rc4[\r][\n]"
2006 header >> "Host: findv3.staging.mappoint.net[\r][\n]"
2009 header >> "Proxy-Connection: Keep-Alive[\r][\n]"
2015 header >> "[\r][\n]"
2194 header << "HTTP/1.0 200 Connection established[\r][\n]"
2341 header >> "POST /Find-30/FindService.asmx HTTP/1.1[\r][\n]"
2362 header >> "Content-Type: text/xml; charset=utf-8[\r][\n]"
2366 header >> "SOAPAction:
"http://s.mappoint.net/mappoint-30/FindByID"[\r][\n]"
2369 header >> "User-Agent: Axis/1.3[\r][\n]"
2373 header >> "Host: findv3.staging.mappoint.net[\r][\n]"
2376 header >> "Transfer-Encoding: chunked[\r][\n]"
2381 header >> "[\r][\n]"
2925 content >> "1fb[\r][\n]"
2926 content >> "<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><FindByID
xmlns="http://s.mappoint.net/mappoint-30/"><specification><DataSourceName>TFS107768.107768.polygons</DataSourceName><Filter><EntityTypeName>polygons</EntityTypeName></Filter><EntityIDs><int>1</int></EntityIDs></specification></FindByID></soapenv:Body></soapenv:Envelope>"
2927 content >> "[\r][\n]"
2931 content >> "0"
2932 content >> "[\r][\n]"
2932 content >> "[\r][\n]"
3105 header << "HTTP/1.1 100 Continue[\r][\n]"
3116 header << "HTTP/1.1 401 Unauthorized[\r][\n]"
3130 header << "Connection: close[\r][\n]"
3131 header << "Date: Sat, 19 Nov 2005 10:13:41 GMT[\r][\n]"
3132 header << "Server: Microsoft-IIS/6.0[\r][\n]"
3132 header << "P3P: CP="BUS CUR CONo FIN IVDo ONL OUR PHY SAMo TELo"[\r][\n]"
3134 header << "X-Powered-By: ASP.NET[\r][\n]"
3134 header << "WWW-Authenticate: Digest qop="auth", realm="MapPoint",
nonce="4da02d5cf00457a7122593231100904c92c9d9832c796c2a81bf3b8638ec"[\r][\n]"
3136 header << "Content-Length: 0[\r][\n]"
3196 header >> "CONNECT findv3.staging.mappoint.net:443 HTTP/1.1"
3201 header >> "User-Agent: Jakarta Commons-HttpClient/3.0-rc4[\r][\n]"
3206 header >> "Host: findv3.staging.mappoint.net[\r][\n]"
3208 header >> "Proxy-Connection: Keep-Alive[\r][\n]"
3214 header >> "[\r][\n]"
3392 header << "HTTP/1.0 200 Connection established[\r][\n]"
3418 header >> "POST /Find-30/FindService.asmx HTTP/1.1[\r][\n]"
3430 header >> "Content-Type: text/xml; charset=utf-8[\r][\n]"
3434 header >> "SOAPAction:
"http://s.mappoint.net/mappoint-30/FindByID"[\r][\n]"
3436 header >> "User-Agent: Axis/1.3[\r][\n]"
3439 header >> "Transfer-Encoding: chunked[\r][\n]"
3442 header >> "Authorization: Digest username="107768", realm="MapPoint",
nonce="4da02d5cf00457a7122593231100904c92c9d9832c796c2a81bf3b8638ec",
uri="/Find-30/FindService.asmx", response="5e2070488ae46efa833147acfa0f09a8",
qop=auth, nc=00000001, cnonce="f91a562bc4cd724171b8f50545cbb8a4"[\r][\n]"
3445 header >> "Host: findv3.staging.mappoint.net[\r][\n]"
3450 header >> "[\r][\n]"
3706 content >> "1fb[\r][\n]"
3707 content >> "<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><FindByID
xmlns="http://s.mappoint.net/mappoint-30/"><specification><DataSourceName>TFS107768.107768.polygons</DataSourceName><Filter><EntityTypeName>polygons</EntityTypeName></Filter><EntityIDs><int>1</int></EntityIDs></specification></FindByID></soapenv:Body></soapenv:Envelope>"
3708 content >> "[\r][\n]"
3709 content >> "0"
3710 content >> "[\r][\n]"
3711 content >> "[\r][\n]"
3888 header << "HTTP/1.1 100 Continue[\r][\n]"
4069 header << "HTTP/1.1 401 Unauthorized[\r][\n]"
4085 header << "Connection: close[\r][\n]"
4086 header << "Date: Sat, 19 Nov 2005 10:13:42 GMT[\r][\n]"
4088 header << "Server: Microsoft-IIS/6.0[\r][\n]"
4088 header << "P3P: CP="BUS CUR CONo FIN IVDo ONL OUR PHY SAMo TELo"[\r][\n]"
4089 header << "X-Powered-By: ASP.NET[\r][\n]"
4090 header << "WWW-Authenticate: Digest qop="auth", realm="MapPoint",
nonce="5b2ad83980fa773c22259323110019ac74b8aaa9eae4a770a22a43697d71"[\r][\n]"
4091 header << "Content-Length: 0[\r][\n]"
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]