[JBoss-user] [JBoss.NET] - Re: Webservice authentication

2004-09-08 Thread arielah
I got it to work with authentication. From the locator I was getting my interface 
(which extends the Remote). Instead I casted it, per your suggestion, to the stub:

AxisSoapBindingStub port = (AxisSoapBindingStub)service.getAxis();
  | port.setUsername(blah);
  | port.setPassword(blahlast);
  | 
  | 

I don't use Jboss.net, instead I'm using Axis 1.1 with JBoss 3.2.5, is there a 
disadvantage to that?
Thanks a lot.

ah.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3847554#3847554

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847554


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss.NET] - Re: Webservice authentication

2004-09-08 Thread nehring
I have run Axis 1.1 installed as a war under JBoss and JBoss-net services in the same 
server instance without any trouble.   Using JBoss-net (which is also built on Axis 
1.1) has an advantange in that you don't need to mess with the Axis deploy/undeploy 
descriptors or plug your apps under the Axis.war directory structure.

I really like packaging the webservices as separate WSRs and deploying them like other 
EARs or WARs - by just dropping them into the server's deploy directory.

But, moving forward in JBoss-4, we're supposed to use the ws4ee way of doing things.  
It's still Axis 1.1 based as far as I've read, but the deployment mechanics are J2EE 
1.4 compliant.   I'm experimenting with ws4ee with the intent to port all my 
webservices over to the church approved way of doing things.

r,
Lance

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3847596#3847596

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847596


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss.NET] - Re: Webservice authentication

2004-09-07 Thread nehring
I would use code similar to below.  The idea is to:
1)  locate the SOAP service  (wsdl2java should have generated a Locator)
2)  Instantiate the stub class.
3)  Set the username and password in the stub.
4)  Make the SOAP call to a remote method.

The names of the Locator and Stub classes have been changed below to protect the 
innocent, but you'll get the idea.   The answer to your question  are the calls to the 
setUsername() and setPassword() methods.   These are provided by the 
org.apache.axis.client.Stub class that your stub extends.


  | package client;
  | 
  | import client.stub.MySOAPServiceLocator;
  | import client.stub.HelloSoapBindingStub; 
  | 
  | 
  | public class TestVersion
  | {
  |public static void main( String[] args ) throws Exception
  |{
  |   // Instantiate the webservice request.
  |   MySOAPServiceLocator l = new MySOAPServiceLocator();
  |   HelloSoapBindingStub tstub = (HelloSoapBindingStub) l.getHello();
  |   
  |   // Get the version from the SOAP service.
  |   // Assumes that the SOAP service has a method named getVersion
  |   // that returns a String.
  |   String version = null;
  |   try
  |   {
  |  tstub.setUsername( user1 );
  |  tstub.setPassword( pass1 );
  |  version = tstub.getVersion();
  |  System.out.println(Version:  + version);
  |   }
  |   catch( org.apache.axis.AxisFault af )
  |   {
  |  System.out.println(WRONG LOGIN: +af.getMessage());
  |   }
  |}
  | }
  | 

r,
Lance

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3847465#3847465

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847465


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss.NET] - Re: Webservice authentication

2004-09-07 Thread arielah
nehring, 

What is the getHello method? My locate doesn't have any access to my defined methods. 
In the client code I'm doing the following below. Where first I get the locate, then 
from it I get my EJB remote interface (that was generate from wsdl2java) where I can 
call my defined methods. I'm not using my stub class AxisSoapBindingStub that was 
generated.


  |  RequestManagerServiceLocator service = new   
RequestManagerServiceLocator();
  | 
  |   Person p = new Person();
  | p.setFamiliarName(blah);
  | p.setLast(blahlast);
  | 
  | //RequestManager extends java.rmi.Remote
  | RequestManager port = service.getAxis();
  | p = port.testPerson(good one.. and now to break it again., p);
  | 
  | 

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3847467#3847467

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847467


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss.NET] - Re: Webservice authentication

2004-09-07 Thread nehring
Your method likely will not be named getHello.   In the Locator code generated by 
wsdl2java, you should see a few methods that return your Stub.  In mine, I see that 
one method has no arguments and one takes a URL object as an argument to return the 
Stub.

For example, I have web service named FTSCMI with a lengthy wsdl.  
When I run wsdl2java (using ant), I get 4 files:

CmiSOAP.java   (contains an interface)
CmiSOAPService.java  (contains an interface)
CmiSOAPServiceLocator.java  (contains the service locator)
FTSCMISoapBindingStub.java  (contains the stub)

You should see methods in the stub that correspond to  the web methods exposed in your 
web service.   Using those methods from the Stub class will save some pain and helps 
isolate the SOAP stuff from your client-side business code.  This works for me with 
MIME/DIME attachments and plain parametersI can't say that I've used Java Objects 
as parameters since I usually have to interop with MS .Net

I may be able to whip out a complete example using authentication in the next day or 
so.   Note that I'm running JBoss-3.2.5 and I use the axis service that is embedded by 
JBoss as /jboss-net.

r,
Lance

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3847470#3847470

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847470


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user