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 haipeng du <ha...@gmail.com> on 2010/09/29 22:58:28 UTC

axis2: generate header using java2wsdl

How could I generate wsdl with header information. By now it just specify
body message.
Thanks.

-- 
Haipeng Du
Salt Lake City

Re: PreAuthentication with axis2

Posted by Bartolomeo Nicolotti <bn...@siapcn.it>.
Hello,

found this:

http://hc.apache.org/httpclient-3.x/authentication.html#Preemptive_Authentication

which has solved the problemwith this code:

   		HttpTransportProperties.Authenticator
        auth = new HttpTransportProperties.Authenticator();
			 auth.setUsername(user);
			 auth.setPassword(pwd);
			 auth.setPreemptiveAuthentication(true);

Best regards

Bartolomeo

Il giorno gio, 30/09/2010 alle 09.50 +0200, Bartolomeo Nicolotti ha
scritto:
> Hello,
> 
> we're using axis2 to generate a client to a webservice to which we've
> to authenticate with user/pwd passing:
> 
> HttpTransportProperties.Authenticator
>         auth = new HttpTransportProperties.Authenticator();
> auth.setUsername(user);
> auth.setPassword(pwd);
> 
> options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,auth);
> 
> The problem is that the generated client sends 2 http requests before
> to get authenticated.
> 
> The first HTTP request we get unauthotized, the second is the same
> except for this http header
> 
> Authorization: Basic ......
> 
> Is there a way to send this HTTP header in the first http request?
> Something like PreAuthentication?
> 
> Many thanks
> 
> Best reagards
> 
> Bartolomeo 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


PreAuthentication with axis2

Posted by Bartolomeo Nicolotti <bn...@siapcn.it>.
Hello,

we're using axis2 to generate a client to a webservice to which we've to
authenticate with user/pwd passing:

HttpTransportProperties.Authenticator
        auth = new HttpTransportProperties.Authenticator();
			 auth.setUsername(user);
			 auth.setPassword(pwd);
			 

options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,auth);

The problem is that the generated client sends 2 http requests before to
get authenticated.

The first HTTP request we get unauthotized, the second is the same
except for this http header

Authorization: Basic ......

Is there a way to send this HTTP header in the first http request?
Something like PreAuthentication?

Many thanks

Best reagards

Bartolomeo



Re: axis2: generate header using java2wsdl

Posted by haipeng du <ha...@gmail.com>.
I want to know how to generate head definition with java2wsdl.
Thanks a lot.

On Wed, Sep 29, 2010 at 3:12 PM, VANEKEM, Olivier
<Ol...@saga.be>wrote:

>  Check https://issues.apache.org/jira/browse/AXIS2-3948, it might be what
> you want to do.
>
>
>
> Rgds
>
>
>
> Olivier
>
> Wavre, Belgium
>
>
>
> *From:* haipeng du [mailto:haipengdu@gmail.com]
> *Sent:* mercredi 29 septembre 2010 22:58
> *To:* axis-user@ws.apache.org
> *Subject:* axis2: generate header using java2wsdl
>
>
>
> How could I generate wsdl with header information. By now it just specify
> body message.
> Thanks.
>
> --
> Haipeng Du
> Salt Lake City
>



-- 
Haipeng Du
Salt Lake City

RE: axis2: generate header using java2wsdl

Posted by "VANEKEM, Olivier" <Ol...@SAGA.BE>.
Check https://issues.apache.org/jira/browse/AXIS2-3948
<https://issues.apache.org/jira/browse/AXIS2-3948> , it might be what
you want to do.

 

Rgds

 

Olivier

Wavre, Belgium

 

From: haipeng du [mailto:haipengdu@gmail.com] 
Sent: mercredi 29 septembre 2010 22:58
To: axis-user@ws.apache.org
Subject: axis2: generate header using java2wsdl

 

How could I generate wsdl with header information. By now it just
specify body message.
Thanks.

-- 
Haipeng Du
Salt Lake City