You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by dd du <da...@gmail.com> on 2008/01/29 05:06:20 UTC

AxisFault: Transport error: 403 Error: Forbidden

Hi, all,

I have developed and deployed axis2-based webservice into my webserver
(Netscape Enterprise Server), my web service client can access and call it's
service over HTTP connection, now we need to use HTTPS (SSL) connection,
after I setup my certificate with both my web server and my browser, I can
use https connection to access the axis2 happyaxis.jsp and my webservice
wsdl file, and my other web applications, I did not change anything to the
axis2 configuration including axis2.xml, but when my web service client
called my web service, it threw org.apache.axis2.AxisFault: Transport error:
403 Error: Forbidden.

Questions:
1. do I need to change the axis2.xml file to configure the transportsender
and transportreceiver, or anything else?
2. After I debug into the code, it called open source HttpClient, and
HttpMethodDirector which has a method: private void authenticateHost(final
HttpMethod method), inside this call, there is a code block:
AuthScheme authscheme = authstate.getAuthScheme();
  LOG.debug("authenticateHost authscheme==["+authscheme+"]");
        if (authscheme == null) {
            return;
        }

Now I can see when this code block is called, the authscheme is null, so it
will never do authentication to the host, so how can I setup axis2 to have
the scheme?

Thanks in advance.
Dave

Re: AxisFault: Transport error: 403 Error: Forbidden

Posted by Saminda Abeyruwan <sa...@gmail.com>.
Hi,

When you invoke the ws using https, your client side axsi2.xml needs to
provide following,

<transportSender name="https"
                     class="
org.apache.axis2.transport.http.CommonsHTTPTransportSender">
        <parameter name="PROTOCOL">HTTP/1.1</parameter>
        <parameter name="Transfer-Encoding">chunked</parameter>
        <!-- This parameter has been added to overcome problems encounted in
SOAP action parameter -->
        <parameter name="OmitSOAP12Action">true</parameter>
    </transportSender>

for synchronous invocations.

Thank you

Saminda



On Jan 29, 2008 9:36 AM, dd du <da...@gmail.com> wrote:

> Hi, all,
>
> I have developed and deployed axis2-based webservice into my webserver
> (Netscape Enterprise Server), my web service client can access and call it's
> service over HTTP connection, now we need to use HTTPS (SSL) connection,
> after I setup my certificate with both my web server and my browser, I can
> use https connection to access the axis2 happyaxis.jsp and my webservice
> wsdl file, and my other web applications, I did not change anything to the
> axis2 configuration including axis2.xml, but when my web service client
> called my web service, it threw org.apache.axis2.AxisFault: Transport
> error: 403 Error: Forbidden.
>
> Questions:
> 1. do I need to change the axis2.xml file to configure the transportsender
> and transportreceiver, or anything else?
> 2. After I debug into the code, it called open source HttpClient, and
> HttpMethodDirector which has a method: private void authenticateHost(final
> HttpMethod method), inside this call, there is a code block:
> AuthScheme authscheme = authstate.getAuthScheme();
>   LOG.debug("authenticateHost authscheme==["+authscheme+"]");
>         if (authscheme == null) {
>             return;
>         }
>
> Now I can see when this code block is called, the authscheme is null, so
> it will never do authentication to the host, so how can I setup axis2 to
> have the scheme?
>
> Thanks in advance.
> Dave
>
>



-- 
Saminda Abeyruwan

Senior Software Engineer
WSO2 Inc. - www.wso2.org