Re: Authenticating users

2005-11-19 Thread Ron Reynolds
by "Web Services are made out of Session EJBs" you mean you have Session 
EJBs that expose a SOAP-over-HTTP interface?  WSS4J uses 2 handlers, one 
client-side and one server-side (WSDoAllSender (client) and 
WSDoAllReceiver (server)) which plug into the handler chain supported by 
Axis to "intercept" the request on its way to the server.  WSDoAllSender 
adds a WSSecurity header to the SOAP message on send (configured using a 
properties file).  WSDoAllReceiver then processes the incoming message, 
validates whatever it's configured to validate and then passes the 
request on to your handlers/service (or rejects the message if it does 
not validate properly).  to add UsernameTokens to a request and process 
them on the server requires a CallbackHandler on the client side which 
can provide the password for a user.  this is then processed into a 
UsernameToken, included in the SOAP header, and on the server side 
you'll need another CallbackHandler which can provide the password for 
the user (pulled from LDAP) which WSS4J will compare to what's provided 
in the UsernameToken and thus authenicate the message before your 
service (however it's implemented) ever gets called.  it's quite 
transparent for the most part.  it also inserts a few entries in the 
MessageContext so you can later determine what kind of authenication has 
been done.


hth.
...ron.
Michael Rudolf wrote:

Is there any difference in case the Web Services are made out of 
Session EJBs? Or does WSS4J work the same way in that case?

Thanks!
Michael


you may want to look at WSS4J and UsernameTokens.  they're pretty
straight-forward as long as your client can support them.  they are 
part of
the WS-Security standard if you want to stick with "endorsed" 
authentication
mechanisms.  then on the server-side you'll typically need a JNDI 
interface to

your LDAP server to authenticate the user on that side.

hth.
ron.

 


Hi,
is there any tutorial or example for authenticating users of we 
services

by username and pass over HTTPS? Can anybody explain in more detail how
this works? Is there any alternative to it? I want to query axis web
sercvices from a portal. That uses LDAP for authetication. I would like
to use the same directory for authenticating the users at the web
services that are being queried.
Thanks for any help!
Michael


  






 







Re: Authenticating users

2005-11-19 Thread Michael Rudolf
Is there any difference in case the Web Services are made out of Session 
EJBs? Or does WSS4J work the same way in that case?

Thanks!
Michael


you may want to look at WSS4J and UsernameTokens.  they're pretty
straight-forward as long as your client can support them.  they are part of
the WS-Security standard if you want to stick with "endorsed" authentication
mechanisms.  then on the server-side you'll typically need a JNDI interface to
your LDAP server to authenticate the user on that side.

hth.
ron.

 


Hi,
is there any tutorial or example for authenticating users of we services
by username and pass over HTTPS? Can anybody explain in more detail how
this works? Is there any alternative to it? I want to query axis web
sercvices from a portal. That uses LDAP for authetication. I would like
to use the same directory for authenticating the users at the web
services that are being queried.
Thanks for any help!
Michael


   






 





Delete FB8C4097227557459572DC6041E796E1074C4F65

2005-11-19 Thread Kahn, Ralph



Re: WSDL2Java and wrapped vs document style

2005-11-19 Thread Anne Thomas Manes
I suspect that Axis's ability to recognize the wrapped convention isn't
sophisticated enough to deal with header parts. Please submit an
enhancement request.

AnneOn 11/18/05, Greg Adams <[EMAIL PROTECTED]> wrote:
Well, what I mean is that the deploy.wsdd created by WSDL2Java from the WSDL below has a service element like this:



when what I want is this:



It also generates wrapper classes for each request and response message...

The extra part in the message is bound to the header in the
soap:binding... Can't Axis use a wrapped convention in the service
interface like this:

public void setWidgetPrice(StateIdentifier state_header, String name, String price);

??
On 11/18/05, Ravi Krishnamurthy <[EMAIL PROTECTED]
> wrote:
Greg:guess you mean document/literal and not wrapped.May be because the message contains more than one part and the wrappedconvention needs only one part with name as parameters.regards,ravi

Greg Adams wrote:> Given the following WSDL:>> > > xmlns:soap="

http://schemas.xmlsoap.org/wsdl/soap/"> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/
"> xmlns:tns="urn:WidgetPrice"
> xmlns:s="http://www.w3.org/2001/XMLSchema"> xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/
"> targetNamespace="urn:WidgetPrice"> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
">> > > targetNamespace="urn:WidgetPrice">> > >
>
>
>
> > > > 

>
>
>
>
> > > > 
> > > >
>
>
> > > > 
>
>
> type="s:float" />>
> > > > >> 
> > > 
> > > element="tns:setWidgetPriceResponse" />> 
> > > 
> > > > element="tns:getWidgetPriceResponse" />
> >> > > 
> > > > 
> > > >> > type="tns:WidgetPriceSoap">> > transport="
http://schemas.xmlsoap.org/soap/http
" />> > > soapAction="urn:WidgetPrice/setWidgetPrice" style="document"/>
> 
>
>
> part="state_header" use="literal" />> > 
>
> > > > > soapAction="urn:WidgetPrice/getWidgetPrice" style="document" />> >
>
> part="state_header" use="literal" />> > 
>
> > > > 
> > binding="tns:WidgetPriceSoapBinding">> > location="

http://localhost:2892/NetWidgetPrice/Service.asmx" />> > > >>> Why does WSDL2Java automatically create a "document" style service,
> when what I want is a "wrapped" style service?>> Greg




Re: WSDL2Java and wrapped vs document style

2005-11-19 Thread Anne Thomas Manes
No. "wrapped" is not a valid option for the WSDL style attribute. The WSDL is correct.On 11/18/05, Ebert, Chris <
[EMAIL PROTECTED]> wrote:I think you need to say 'wrapped' in the binding instead of 'document'.
Chris-Original Message-From: Greg Adams [mailto:[EMAIL PROTECTED]]Sent: Friday, November 18, 2005 12:08To: 
axis-user@ws.apache.orgSubject: WSDL2Java and wrapped vs document styleGiven the following WSDL:xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/"xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:WidgetPrice"xmlns:s="http://www.w3.org/2001/XMLSchema"xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/"targetNamespace="urn:WidgetPrice"xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
targetNamespace="urn:WidgetPrice">
/>



type="s:float" />

element="tns:setWidgetPriceResponse" />

element="tns:getWidgetPriceResponse" />


type="tns:WidgetPriceSoap">transport="http://schemas.xmlsoap.org/soap/http" />style="document"/>part="state_header" use="literal" />
style="document" />part="state_header" use="literal" />
binding="tns:WidgetPriceSoapBinding">location="http://localhost:2892/NetWidgetPrice/Service.asmx" />
Why does WSDL2Java automatically create a "document" style service, whenwhat I want is a "wrapped" style service?
Greg


RE: WSDL2Java with DocumentLiteral Issue

2005-11-19 Thread Griffin, Mark
Follow-up, I figured this out. I need to specify the -W option since I
was using doc/literal and not wrapped. Works fine now.

markg

-Original Message-
From: Griffin, Mark 
Sent: Friday, November 18, 2005 1:30 PM
To: 'axis-user@ws.apache.org'
Subject: WSDL2Java with DocumentLiteral Issue


I working on some compatibility testing with Axis 1.3. I'm having some
difficultly getting the WSDL2Java to generate the java classes based on
the defined types in the WSDL.  I would expect a couple of bean classes
to be generated based upon the WSDL I'm using.  This would be consistent
with the other tools I've run this WSDL through.  With Axis I'm just
getting the interface, stub classes and nothing else.  I can invoke the
service that way but it requires me to pass the parameters as individual
elements instead of an object.  Which gets pretty clunky for large
documents.

Based upon the WSDL attached below, I would expect a RequestService bean
and a Response bean.  Here is the command line I'm using to generate the
classes: java -classpath
./;./wsdl4j-1.5.1.jar;./axis.jar;./commons-logging-1.0.4.jar;./commons-d
iscovery-0.2.jar;./jaxrpc;./saaj.jar;./j2ee.jar
org.apache.axis.wsdl.WSDL2Java -D -o ./source requestservice.wsdl

One note, if I remove the type definitions from the WSDL it will
generate a class.  But then it generates all the elements as plain
objects instead of the correct types.  Something I'm missing on the
command line?

Thanks, sorry for the large xml post.

Markg




http://www.meg.com/";
:wsdns1="http://www.meg.com";
:wsdl="http://schemas.xmlsoap.org/wsdl/";
:xsd="http://www.w3.org/2001/XMLSchema";
:http="http://schemas.xmlsoap.org/wsdl/http/";
:tns="http://www.meg.com/";
:mime="http://schemas.xmlsoap.org/wsdl/mime/";
:soap="http://schemas.xmlsoap.org/wsdl/soap/";>

   http://www.w3.org/2001/XMLSchema";
targetNamespace="http://www.meg.com"; xmlns:ti="http://www.meg.com";>
 
 
 
 
   
 
   
   
   
 
   
 
 
 
   
 
   
 
   
 
   

   http://www.w3.org/2001/XMLSchema";
targetNamespace="http://localhost/PgnRequestService/requestservice";
xmlns:tns="http://localhost/PgnRequestService/requestservice";
xmlns:ti="http://www.meg.com";>
 http://www.meg.com"/>
 
   
 
 
   
   
 
 
   
 
 
   
   
 
   

















http://schemas.xmlsoap.org/soap/http"/>












http://sn46:/soap/default"/>