On Jan 19, 3:11 pm, Skip <[email protected]> wrote:
> Hi,
>
> I've followed this (http://code.google.com/appengine/articles/soap.html)
> and created a SOAP client for a webservice (ASP.NET). The client is used by
> a G/A/E Backend. I've verified that backed+client works correctly against a
> development server that (1) uses HTTP and (2) requires no authorization. It
> fails authorization when connecting to a production server that requires
> Basic auth over an HTTPS connection. Here's the code:
>
> URL url = new URL("https://.../FOOService.asmx?WSDL";);
>
> HttpURLConnection con = (HttpURLConnection) url.openConnection();
> con.setRequestProperty("Authorization", "Basic "+CREDENTIALS);  //
> CREDENTIALS is base64 of "User:Pass"
>
> FOOService fs = new FOOService(url, new QName("http://.../";,
> "FOOService"));
> FOOServiceSoap ws = fs.getFOOServiceSoap();
>
> // etc...
>
> I've set logging to FINEST, but can't see the request headers being sent.
> Also the WWW-Authenticate response coming back indicates Authorization
> header is not being sent.
The 401 response may also indicate that the password was incorrect.
"If the request already included Authorization credentials, then the
401 response indicates that authorization has been refused for those
credentials."
Why don't you try sending an HTTPS request directly, without using
SOAP, just to see if you still get a 401 response. For how to do that
see http://code.google.com/appengine/docs/java/urlfetch/usingjavanet.html

It finally fails like this:
>
> Jan 19, 2012 10:57:28 PM
> com.google.appengine.repackaged.org.apache.http.impl.client.DefaultRequestD 
> irector
> updateAuthState
> FINE: Credentials not found
>
> What's the trick?  (I'm somewhat new to AppEngine and have a lot of
> contempt for SOAP)
>
> Thanks,
> -Skip

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to