You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Sagara Gunathunga <sa...@gmail.com> on 2008/11/04 14:40:18 UTC

[AXIS2] Generated WSDL error for HTTPS transport

Hi,
I manage to expose a web service with HTTPS support on JBoss , I followed
following  steeps ( server is already configured for SSL).

1.  Restrict transport protocols in axis2.xml file by using
<transport>https</transport> element.

2. Configure the  transportReceiver for the certificate

<transportReceiver name="https"
class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
    <parameter name="port" locked="false">9002</parameter>
    <parameter name="non-blocking" locked="false">true</parameter>
        <parameter name="keystore" locked="false">
            <KeyStore>
                <Location>.keystore</Location>
                <Type>JKS</Type>
                <Password>11111111</Password>
                <KeyPassword>11111111</KeyPassword>
            </KeyStore>
        </parameter>
        <parameter name="truststore" locked="false">
            <TrustStore>
                <Location>.keystore</Location>
                <Type>JKS</Type>
                <Password>11111111</Password>
            </TrustStore>
        </parameter>
        <parameter name="SSLVerifyClient">optional</parameter>
        <!--    supports optional|require or defaults to none -->
    </transportReceiver>

with these settings application deployed well but in WSDL endpoint  address
for  HTTPS  binding not generated correctly instead  of
"server:port/contextroot " it has "null" value . as a example  (
*PayfoneService
*is the service name )

<wsdl:port name="PayfoneServiceHttpsSoap12Endpoint"
binding="ns:PayfoneServiceSoap12Binding">
*          <soap12:address
location="nullPayfoneService.PayfoneServiceHttpsSoap12Endpoint"/>*
</wsdl:port>
<wsdl:port name="PayfoneServiceHttpsEndpoint"
binding="ns:PayfoneServiceHttpBinding">
*          <http:address
location="nullPayfoneService.PayfoneServiceHttpsEndpoint"/>*
</wsdl:port>

Is there any way to solve this problem ...?



Thanks ,

Sagara Gunathunga

Blog - ssagara.blogspot.com
Web - http://sagaras.awardspace.com/

Re: [AXIS2] Generated WSDL error for HTTPS transport

Posted by Sagara Gunathunga <sa...@gmail.com>.
Hi,
Thanks Asankha for your reply , When i deploy Axis2 on JBoss as normal way (
with SSL configured for server ) without above two setting i can reach to
the WSDL over HTTP/S but that WSDL document only contains end point binding
for HTTP and SOAP protocols not for HTTPS , is there any way to generate
HTTPS binding for AXIS2 services . ( at this stage  we only  need HTTP/S
transport level security , without using security module )

Any way what is the current recommended way to handle HTTP/S with AXIS2
without using synapse-transport ..?


Thanks ,



On Tue, Nov 4, 2008 at 8:11 PM, Asankha C. Perera <as...@apache.org>wrote:

>  Sagara
>
> 1.  Restrict transport protocols in axis2.xml file by using
> <transport>https</transport> element.
>
> 2. Configure the  transportReceiver for the certificate
>
> <transportReceiver name="https"
> class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
> ...
>
> with these settings application deployed well but in WSDL endpoint
> address  for  HTTPS  binding not generated correctly instead  of
> "server:port/contextroot " it has "null" value . as a example  ( *PayfoneService
> *is the service name )
>
> <wsdl:port name="PayfoneServiceHttpsSoap12Endpoint"
> binding="ns:PayfoneServiceSoap12Binding">
> *          <soap12:address
> location="nullPayfoneService.PayfoneServiceHttpsSoap12Endpoint"/>*
> </wsdl:port>
> <wsdl:port name="PayfoneServiceHttpsEndpoint"
> binding="ns:PayfoneServiceHttpBinding">
> *          <http:addresslocation="nullPayfoneService.PayfoneServiceHttpsEndpoint"/>
> *
> </wsdl:port>
>
> Is there any way to solve this problem ...?
>
> What you have achieved is not https using the JBoss container.. You should
> simply be able to deploy Axis2 on JBoss and use it over http/s like with
> Tomcat.. The org.apache.axis2.transport.nhttp transport is deprecated for
> Axis2, and is now only maintained as org.apache.synapse.transport.nhttp and
> if you really want to use it, I suggest that you try the latest version
> (1.2) from here [1].. which is compatible with Axis2 1.4.x
>
> [1]
> http://repo2.maven.org/maven2/org/apache/synapse/synapse-transports/1.2/synapse-transports-1.2.jar
>
> asankha
>
> --
> Asankha C. Pererahttp://adroitlogic.org
> http://esbmagic.blogspot.com
>
>


-- 
Sagara Gunathunga

Blog - ssagara.blogspot.com
Web - http://sagaras.awardspace.com/

Re: [AXIS2] Generated WSDL error for HTTPS transport

Posted by "Asankha C. Perera" <as...@apache.org>.
Sagara
> 1.  Restrict transport protocols in axis2.xml file by using 
> <transport>https</transport> element.
>
> 2. Configure the  transportReceiver for the certificate 
>
> <transportReceiver name="https" 
> class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
> ...
>
> with these settings application deployed well but in WSDL endpoint  
> address  for  HTTPS  binding not generated correctly instead  of   
> "server:port/contextroot " it has "null" value . as a example  ( 
> *PayfoneService *is the service name )
>
> <wsdl:port name="PayfoneServiceHttpsSoap12Endpoint" 
> binding="ns:PayfoneServiceSoap12Binding">
> *          <soap12:address 
> location="nullPayfoneService.PayfoneServiceHttpsSoap12Endpoint"/>*
> </wsdl:port>
> <wsdl:port name="PayfoneServiceHttpsEndpoint" 
> binding="ns:PayfoneServiceHttpBinding">
> *          <http:address 
> location="nullPayfoneService.PayfoneServiceHttpsEndpoint"/>*
> </wsdl:port>
>
> Is there any way to solve this problem ...?
What you have achieved is not https using the JBoss container.. You 
should simply be able to deploy Axis2 on JBoss and use it over http/s 
like with Tomcat.. The org.apache.axis2.transport.nhttp transport is 
deprecated for Axis2, and is now only maintained as 
org.apache.synapse.transport.nhttp and if you really want to use it, I 
suggest that you try the latest version (1.2) from here [1].. which is 
compatible with Axis2 1.4.x

[1] 
http://repo2.maven.org/maven2/org/apache/synapse/synapse-transports/1.2/synapse-transports-1.2.jar

asankha

-- 
Asankha C. Perera
http://adroitlogic.org

http://esbmagic.blogspot.com