PLS HELP ME URGENTLY ON THIS QUESTION

2005-11-21 Thread giribabu venugopal
i got URL from .net service Provider(web serice they are providing for us).
 
 
in that wsdl import and location tag is there, assume that i got (scehma file is jay.xsd)
url like http://server//data.asmx?scehma = jay
 
my scema file is 
 


http://tempuri.org/PrudentialData.xsd
" xmlns:mstns=" http://tempuri.org/PrudentialData.xsd" xmlns="
http://tempuri.org/PrudentialData.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema " xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" attributeFormDefault="qualified" elementFormDefault="qualified">


 
 

 
 
 

 
 
look like this please tell me how to read this schema  and get value from the service?
 
give any sample code to read this
 
 
thank u if u help it will be greatful for me.
 


RE: Response not conforming to WSDL

2005-11-21 Thread Kruger, Olaf

Well, I took a different tack onto the same problem... With a similar
result / problem... :-(

--(1) I have used java2wsdl to generate the wsdl from my service from
the EJB (remote) interface class; the result is shown below.

Notice a couple of things:
(a) the return element consists of a sequence of "items";
(b) a type "ArrayOfStatusOverview" is generated, also consisting of
"item" elements, but is _not_ used at all.

--(2) Now, at run-time, when executing the service, Axis generates the
following result as shown below - and (not so surprisingly) the result
is identical to my original post. That is, a similar problem: what is
returned not as a sequence of "item" elements, but as a sequence of
"findStatusOverviewReturn" elements.

Is this a known problem? Any thoughts?

Any suggestions for a work-around?

Cheers,
-olaf.



public interface ManageNetworkElementRemote
extends javax.ejb.EJBObject
{
public com.si.hix.networkprovisioning.appservice.iface.StatusDetails
findStatusDetails(String networkElementId)
throws java.rmi.RemoteException;
public
com.si.hix.networkprovisioning.appservice.iface.StatusOverview[]
findStatusOverview()
throws java.rmi.RemoteException;
}
*

http://com.si.hix.networkprovisioning.appservice";
xmlns:apachesoap="http://xml.apache.org/xml-soap";
xmlns:impl="http://com.si.hix.networkprovisioning.appservice";
xmlns:intf="http://com.si.hix.networkprovisioning.appservice";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

 
  http://com.si.hix.networkprovisioning.appservice";
xmlns="http://www.w3.org/2001/XMLSchema";>
   

 
 
 

   
   

 

   
   

 
  
 

   
  
 

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

 
 

 
  
   
   
  
 http://localhost:8080/hix/services/ManageNetworkElement"/>
  
   

***


  



Hix
5620
HIX 1
true


Hix
5620
HIX 2
true



  


CAUTION - This message may contain privileged and confidential information 
intended only for the use of the addressee named above. If you are not the 
intended recipient of this message you are hereby notified that any use, 
dissemination, distribution or reproduction of this message is prohibited. If 
you have received this message in error please notify Siemens Ltd., ABN 98 004 
347 880, or Siemens (NZ) Limited immediately.


Re: moved from axis 1_3 to axis2 and having a WSDL2Java issue

2005-11-21 Thread Ken Hawkins

Ah thanks for the heads up on SOAP-ENC!

ken;
On Nov 21, 2005, at 9:59 PM, Ruchith Fernando wrote:


Hi  Ken,

When I did java org.apache.axis2.wsdl.WSDL2Java -uri
http://affiliate.broadjam.net/server.php?wsdl -o [path]

I didn't get your error. The problem in your case is that you use
'double quotes' around the uri.

But Axis2 WSDL2Java will not work in your case because we do not
support SOAP-ENC yet.

Thanks,
Ruchith

On 11/22/05, Ken Hawkins <[EMAIL PROTECTED]> wrote:

Hi all,

This is the first on the list for me and please allow me to cut to  
the chase
I perviously was using axis 1_3 and WSDL2Java to generate java  
files from

http://affiliate.broadjam.net/server.php?wsdl this was
happening fine however now that I moved to axis2 the following  
call produces

errors:

java org.apache.axis.wsdl.WSDL2Java -uri
"http://affiliate.broadjam.net/server.php?wsdl";...
Exception in thread "main"
org.apache.axis.wsdl.codegen.CodeGenerationException:
Invalid WSDL Location
at
org.apache.axis.wsdl.codegen.CodeGenerationEngine. 
(CodeGenerationEngine.java:63)

at
org.apache.axis.wsdl.WSDL2Code.main(WSDL2Code.java:28)
at
org.apache.axis.wsdl.WSDL2Java.main(WSDL2Java.java:22)
Caused by: java.io.FileNotFoundException:
http:/affiliate.broadjam.net/server.php?wsdl (No such file
or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at
org.apache.axis.wsdl.codegen.CodeGenerationEngine.getWOM 
(CodeGenerationEngine.java:109)

at
org.apache.axis.wsdl.codegen.CodeGenerationEngine. 
(CodeGenerationEngine.java:57)

... 2 more

I will dig through and see however I couldn't find anything  
readily in the
archives and the calls seemed to have changed radically from 1_3  
to 2. this
is on a nusoap server and i will quickly ping that list as well  
however, is
there a communication problem between axis2 and nusoap that anyone  
is aware

of?

thanks,
ken;





--
Ruchith




Return more than one parameters

2005-11-21 Thread Eric Chow
hello,

How can I use JAXRPC call to return more than one parameters ?


I tried to use ParameterMode.INOUT, but nothing return ?

Any example ?


Best regards,
Eric


Re: moved from axis 1_3 to axis2 and having a WSDL2Java issue

2005-11-21 Thread Ruchith Fernando
Hi  Ken,

When I did java org.apache.axis2.wsdl.WSDL2Java -uri
http://affiliate.broadjam.net/server.php?wsdl -o [path]

I didn't get your error. The problem in your case is that you use
'double quotes' around the uri.

But Axis2 WSDL2Java will not work in your case because we do not
support SOAP-ENC yet.

Thanks,
Ruchith

On 11/22/05, Ken Hawkins <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> This is the first on the list for me and please allow me to cut to the chase
> I perviously was using axis 1_3 and WSDL2Java to generate java files from
> http://affiliate.broadjam.net/server.php?wsdl this was
> happening fine however now that I moved to axis2 the following call produces
> errors:
>
> java org.apache.axis.wsdl.WSDL2Java -uri
> "http://affiliate.broadjam.net/server.php?wsdl";...
> Exception in thread "main"
> org.apache.axis.wsdl.codegen.CodeGenerationException:
> Invalid WSDL Location
> at
> org.apache.axis.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:63)
> at
> org.apache.axis.wsdl.WSDL2Code.main(WSDL2Code.java:28)
> at
> org.apache.axis.wsdl.WSDL2Java.main(WSDL2Java.java:22)
> Caused by: java.io.FileNotFoundException:
> http:/affiliate.broadjam.net/server.php?wsdl (No such file
> or directory)
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.(FileInputStream.java:106)
> at
> org.apache.axis.wsdl.codegen.CodeGenerationEngine.getWOM(CodeGenerationEngine.java:109)
> at
> org.apache.axis.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:57)
> ... 2 more
>
> I will dig through and see however I couldn't find anything readily in the
> archives and the calls seemed to have changed radically from 1_3 to 2. this
> is on a nusoap server and i will quickly ping that list as well however, is
> there a communication problem between axis2 and nusoap that anyone is aware
> of?
>
> thanks,
> ken;
>
>


--
Ruchith


Re: Authenticating users

2005-11-21 Thread Michael Rudolf



passwords should (almost) always be stored in a non-reversable hash (MD5,
SHA-1, etc) - you'll certainly need to know the algorithm if you're going to
duplicate the plain-text->hash-value to compare, but it sounds like you won't
have the plaintext password (which is good from a security point of view) so
you'll want to consider a "single-sign-on" approach.  i'm not 100% savy on
LDAP beyond the basic JNDI-centric view (it's a tree of HashMaps of name-value
pairs with paths) but i'm certain there are single-sign-on approaches that
fully leverage LDAP that you'll want to at least consider.
 

Well that is what im trying to do herea single sign on solution. I 
want to logon at the servlet and that calls a web service as the logged 
on user. I thought this is possible with WSS4J though i guess i am 
running into trouble here.

Thx for the help!
Michael


for my authentication i actually use digitally signed messages - the client
application specifies the user and includes the uid and a canned password as a
digest in the request, but then the whole SOAP Body + UsernameToken is signed
using the client's private key which i verify on the server.  i left those
bits out of the server-config.wsdd to keep the email sizes down.

..ron.

 


Ok...i guess i misunderstood your text. So i might be able to avoid
needing the plaintext pw in the service. How can i nevertheless use
encrypted passwords? What kind of passwords are you using? The problem
is that i dont know how the pw in ldap was encrypted.
Thx for your help!
Michael

   







 





Re: Authenticating users

2005-11-21 Thread Ron Reynolds
passwords should (almost) always be stored in a non-reversable hash (MD5,
SHA-1, etc) - you'll certainly need to know the algorithm if you're going to
duplicate the plain-text->hash-value to compare, but it sounds like you won't
have the plaintext password (which is good from a security point of view) so
you'll want to consider a "single-sign-on" approach.  i'm not 100% savy on
LDAP beyond the basic JNDI-centric view (it's a tree of HashMaps of name-value
pairs with paths) but i'm certain there are single-sign-on approaches that
fully leverage LDAP that you'll want to at least consider.

for my authentication i actually use digitally signed messages - the client
application specifies the user and includes the uid and a canned password as a
digest in the request, but then the whole SOAP Body + UsernameToken is signed
using the client's private key which i verify on the server.  i left those
bits out of the server-config.wsdd to keep the email sizes down.

..ron.

> Ok...i guess i misunderstood your text. So i might be able to avoid
> needing the plaintext pw in the service. How can i nevertheless use
> encrypted passwords? What kind of passwords are you using? The problem
> is that i dont know how the pw in ldap was encrypted.
> Thx for your help!
> Michael
>





Re: Authenticating users

2005-11-21 Thread Ron Reynolds
you might want to read this doc first - http://ws.apache.org/wss4j/axis.html
it covers much of what you're talking about.  unfortunately it's a bit out of
date, but it's a start.  you'll then want to read this doc -
http://ws.apache.org/wss4j/package.html - it's also a little dated, but covers
more involved topics and in more detail.  (these docs should probably be moved
into the wiki...)

anyway, in the second doc it specifies that to control the password type you
use this parameter in your client-config.wsdd:

(versus "PasswordDigest")

hth.
ron.
p.s., by "in my src" i meant in my copy of the WSS4J source (which is a few
months old) - http://www.apache.org/dyn/closer.cgi/ws/wss4j/


> Ok...im getting a bit confused here...
>
>>i had wondered that one myself.  you can configure WSS4J to send the password
>>in your UsernameToken as plaintext instead of SHA-1 digest.  so i guess your
>>client can send the encrypted password as plaintext and then your server
>> would
>>compare that encrypted value with what's stored in LDAP.
>>
> How do i do that? The callback class sets the pw. I cant even access it
> in there. How does the pw sent from the client get to the server into
> the callback class?
>
>>  doesn't seem
>>terribly secure in that case, tho, but otherwise the client would need access
>>to the plaintext password, as would the server because the callback handler
>>never gets the password that was sent by the client - all that work happens
>> in
>>
>>org.apache.ws.security.WSSecurityEngine.handleUsernameToken(Element token,
>>CallbackHandler cb).
>>
>>NOTE, i remember seeing a post about a bug in the password comparison code
>> and
>>i think it's in this method.  it appears from the code that the passwords are
>>only compared if it's a digest password (with nonce != null && createdTime !=
>>null).  otherwise the lines (856-858 in my src)
>>
>>
> did you send your src? i didnt see it...sorry...
>
>>if (!passDigest.equals(password)) {
>>  throw new WSSecurityException(WSSecurityException.FAILED_AUTHENTICATION);
>>}
>>
>>are skipped entirely!  um, WSS4J folks - this has been fixed, right?
>>
>>
>>
>>
>>
>>>And another question on this one...my passwords in the LDAP dir are
>>>encrypted as they are migrated from a UNIX passwd file. The Callback
>>>Class actually expects me to set the password. How did you do the actual
>>>authentication then? Can i read the pass in cleartext? I need a
>>>cleartext pass later in the process for an ssh connection. Any ideas on
>>>how to do this?
>>>
>>>
>>>
the handler for exracting the login name?  that's basically the code i
included below to extract from the incoming message, then create the user
object, hit the LDAP server (through JNDI api) and then store (actually in
 a
thread-local so even non-Axis code can get the current user).  the rest is
 to
include it thus in your server-config.wsdd:

 >>>use="literal">
   
   
 
 
   
   
   >>>value="ServerSidePWCallback"/>
 

 
 >>>type="java:com.amgen.seattle.appdev.freezer.webservice.server.WSLoginNameHandler">
   
   
 
   

that's about it.

the best documentation on WSS4J (or at least links to it) SHOULD be in the
Wiki ( http://wiki.apache.org/ws/FrontPage/WsFx ) but i'm not certain one
could say that yet...  i keep a short list of good resources i've found
 here
http://wiki.apache.org/ws/RonReynolds/Wss4jLinks but it's only a handful of
links but it might give you a starting point. :)  search around in the Wiki
and then your next best bet are the 2 wss4j docs and then Google...

..ron.





>Thx for your help. I figured it out now. Didnt see one section of the
>WSS4J documentation. You can set the EngineConfiguration to use a wsdd
>file inside the program code. As long as this is readable from the
>servlet everythings fine.
>Is there any good tutorial or documentation on developing these Handlers
>like you explained below? I dunno if you mind sharing your Handler
>implementation. It would be interesting to see how you did this.
>Thanks alot!
>Michael
>
>
>
>
>
>>i haven't tried this.  it certainly must be possible, but right now i
>>haven't
>>the time to figure it out.
>>
>>i would start at MessageContext.getAxisEngine().getGlobalRequest() and
>>search
>>in that area.  the file itself is loaded by
>>org.apache.axis.configuration.EngineConfigurationFactoryDefault.  also i
>>seem
>>to remember someone mentioning that you could access the global request
>>flow
>>and insert a handler into that flow at runtime.  also if you have
>>permissions
>>you can call System.setProperty() from a startup servlet (if you want a
>>possibly much simpler solution that opens up a bunch of po

Re: Authenticating users

2005-11-21 Thread Michael Rudolf
Ok...i guess i misunderstood your text. So i might be able to avoid 
needing the plaintext pw in the service. How can i nevertheless use 
encrypted passwords? What kind of passwords are you using? The problem 
is that i dont know how the pw in ldap was encrypted.

Thx for your help!
Michael


Ok...im getting a bit confused here...

i had wondered that one myself.  you can configure WSS4J to send the 
password
in your UsernameToken as plaintext instead of SHA-1 digest.  so i 
guess your
client can send the encrypted password as plaintext and then your 
server would

compare that encrypted value with what's stored in LDAP.

How do i do that? The callback class sets the pw. I cant even access 
it in there. How does the pw sent from the client get to the server 
into the callback class?



 doesn't seem
terribly secure in that case, tho, but otherwise the client would 
need access
to the plaintext password, as would the server because the callback 
handler
never gets the password that was sent by the client - all that work 
happens in


org.apache.ws.security.WSSecurityEngine.handleUsernameToken(Element 
token,

CallbackHandler cb).

NOTE, i remember seeing a post about a bug in the password comparison 
code and
i think it's in this method.  it appears from the code that the 
passwords are
only compared if it's a digest password (with nonce != null && 
createdTime !=

null).  otherwise the lines (856-858 in my src)
 


did you send your src? i didnt see it...sorry...


if (!passDigest.equals(password)) {
 throw new 
WSSecurityException(WSSecurityException.FAILED_AUTHENTICATION);

}

are skipped entirely!  um, WSS4J folks - this has been fixed, right?



 


And another question on this one...my passwords in the LDAP dir are
encrypted as they are migrated from a UNIX passwd file. The Callback
Class actually expects me to set the password. How did you do the 
actual

authentication then? Can i read the pass in cleartext? I need a
cleartext pass later in the process for an ssh connection. Any ideas on
how to do this?

  


the handler for exracting the login name?  that's basically the code i
included below to extract from the incoming message, then create 
the user
object, hit the LDAP server (through JNDI api) and then store 
(actually in a
thread-local so even non-Axis code can get the current user).  the 
rest is to

include it thus in your server-config.wsdd:


  
  


  
  
  



type="java:com.amgen.seattle.appdev.freezer.webservice.server.WSLoginNameHandler"> 

  

  

  

that's about it.

the best documentation on WSS4J (or at least links to it) SHOULD be 
in the
Wiki ( http://wiki.apache.org/ws/FrontPage/WsFx ) but i'm not 
certain one
could say that yet...  i keep a short list of good resources i've 
found here
http://wiki.apache.org/ws/RonReynolds/Wss4jLinks but it's only a 
handful of
links but it might give you a starting point. :)  search around in 
the Wiki

and then your next best bet are the 2 wss4j docs and then Google...

..ron.






Thx for your help. I figured it out now. Didnt see one section of the
WSS4J documentation. You can set the EngineConfiguration to use a 
wsdd

file inside the program code. As long as this is readable from the
servlet everythings fine.
Is there any good tutorial or documentation on developing these 
Handlers

like you explained below? I dunno if you mind sharing your Handler
implementation. It would be interesting to see how you did this.
Thanks alot!
Michael



  

i haven't tried this.  it certainly must be possible, but right 
now i

haven't
the time to figure it out.

i would start at 
MessageContext.getAxisEngine().getGlobalRequest() and

search
in that area.  the file itself is loaded by
org.apache.axis.configuration.EngineConfigurationFactoryDefault.  
also i

seem
to remember someone mentioning that you could access the global 
request

flow
and insert a handler into that flow at runtime.  also if you have
permissions
you can call System.setProperty() from a startup servlet (if you 
want a
possibly much simpler solution that opens up a bunch of possible 
bugs if
another servlet in the same servlet engine tries to connect to a 
different

web
service...)

sorry i couldn't be of more help. :-/
...ron.









Ok...i dont use the client_deploy.wsddis there any way to avoid
using it? I have the client inside a servlet so i cant specify 
it with

the java -D command line.
Thx!
Michael





  


do you have this in your client-config.wsdd?




  
  



  
?

otherwise there won't be any handler in the request flow that 
knows what

to
do
with those properties.

hth.
.ron.








Ok, so i got the server working basically (i think) but when 
calling it

i get the following exception at the client:

AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException 


faultSubcode:
faultString: WSDoAllR

RE: Newbie question regarding adminclient

2005-11-21 Thread Randy Wigginton
Good idea.  Seems the problem might be an axis bug.  Here is the "bad
output", where it first diverges:

DEBUG HTTPSender:562 - HTTP/1.1 500 Internal Server Error
DEBUG HTTPSender:562 - Server Apache-Coyote/1.1
DEBUG HTTPSender:562 - Content-Type text/xml;charset=utf-8
DEBUG HTTPSender:562 - Date Mon, 21 Nov 2005 23:34:34 GMT
DEBUG HTTPSender:562 - Connection close

The "good output" contains: " DEBUG HTTPSender:562 - HTTP/1.1 200 OK"

So... how do I track down the underlying bug?

-Original Message-
From: Ketan Deshpande [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 21, 2005 6:27 PM
To: axis-user@ws.apache.org
Subject: RE: Newbie question regarding adminclient

Have you compared the log messages - one run with the working case and
one with
the non-working? 

-K



--- Randy Wigginton <[EMAIL PROTECTED]> wrote:

> Actually I had put the jars in the path earlier and found it made no
> difference so I took them out again.  The only thing I've found to
> matter is the magical path & classname.
> 
>  
> 
> 
> 
> From: Dovholuk, Clint [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 21, 2005 6:13 PM
> To: axis-user@ws.apache.org
> Subject: RE: Newbie question regarding adminclient
> 
>  
> 
> i would guess that the root of your problem is that activation.jar and
> mail.jar are not in your classpath...
> 
>  
> 
> verify that your classpath has those two jars are in it.
> 
>  
> 
>  
> 
> 
> 
> From: Randy Wigginton [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 21, 2005 6:11 PM
> To: axis-user@ws.apache.org
> Subject: Newbie question regarding adminclient
> 
> I apologize if this has been asked before, but I have been unable to
> locate such a question.
> 
>  
> 
> I am executing this command:
> 
> java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient
> deploy.wsdd
> 
>  
> 
> The error I get is:
> 
> 17:52:00,398  WARN JavaUtils:1212 - Unable to find required classes
> (javax.activation.DataHandler and javax.mail.interne
> 
> t.MimeMultipart). Attachment support is disabled.
> 
> Processing file deploy.wsdd
> 
> Exception: AxisFault
> 
>  faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> 
>  faultSubcode:
> 
>  faultString: java.lang.reflect.InvocationTargetException
> 
>  faultActor:
> 
>  faultNode:
> 
>  faultDetail:
> 
> {http://xml.apache.org/axis/}hostname:nyc-randy
> 
>  
> 
> Unfortunately, I can't figure out how to get the real root of the
> problem.  Here is my deploy.wsdd (I've cut everything I can out to
still
> show the problem).  I've also found one interesting adjunct, just
below
> the wsdd contents here:
> 
>  
> 
>  
> xmlns="http://xml.apache.org/axis/wsdd/";
> 
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
> 
>style="rpc" use="encoded">
> 
>value="urn:ThirdPartyCampaignService"/>
> 
>value="ThirdPartyCampaignServiceService"/>
> 
>   
value="com.quigo.ppcplus.service.thirdparty.campaign.ThirdPartyCampaignS
> erviceSoapBindingSkeleton"/>
> 
>   
> 
>   
> 
>
> xmlns:ns="http://common.ppcplus.quigo.com";
> 
> qname="ns:RTException"
> 
> type="java:com.quigo.ppcplus.common.RTException"
> 
>
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
> 
>  
> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
> 
>   />
> 
>   
> 
> 
> 
>  
> 
> If I change the name of the type - in any way - I get the Done
> processing message.  Even if I change the name of the class to
> QRTexception, the package from .common. to .uncommon. ... literally
> almost anything.  
> 
>  
> 
> Can anyone give me any kind of clue what is happening here?  If I set
my
> logging level to debug, I get a huge output... but I can't make heads
or
> tails of it.  Any hints?
> 
>  
> 
> 


Ketan Deshpande
[EMAIL PROTECTED]



__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com


RE: Response not conforming to WSDL

2005-11-21 Thread Kruger, Olaf

>
> How did you generate the service? (from this WSDL?)
>

The service implementation...? NO - not generated from the WSDL.

I supplied the implementation (EJB Provider), deployed without supplying
a wsdl (i.e. a wsdd without ), and had figured that Axis would
generate the wsdl in a manner identical to which it generates the
response.

No? Wrong assumption?


> -- dims
>
> On 11/21/05, Kruger, Olaf <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi,
> >
> > I am trying to solve a problem that our UI/Flash designers
> have with
> > the response message that is generated from Axis 1.3. Specifically,
> > what I am seeing is that there is a mismatch between the WSDL (as
> > generated by Axis itself) and the response that is generated.
> >
> > I have the following WSDL returned by Axis (snippets
> only... Hope all
> > the interesting bits are in there...); specifically, I'd
> like to point
> > out the way the response is structured: within the
> > 'statusOverviewResponse' I have an unbounded list of
> > 'StatusOverviewReturn' elements (of type StatusOverview - each of
> > which containing three "basic" elements).
> >
> > 
> >  > targetNamespace="http://com.si.hix.networkprovisioning.appservice";>
> > 
> > 
> >> targetNamespace="http://com.si.hix.networkprovisioning.appservice";>
> >  > namespace="http://com.si.hix.networkprovisioning.appservice.iface"/>
> >
> > 
> > 
> > 
> >  > name="findStatusOverviewReturn" type="tns1:StatusOverview"/>
> > 
> > 
> > 
> >
> > >
> targetNamespace="http://com.si.hix.networkprovisioning.appserv
> ice.iface"
> > >
> > 
> > 
> >  nillable="true"
> > type="xsd:string"/>
> >  > type="xsd:string"/>
> > 
> > 
> > 
> >
> > 
> > 
> >  > name="parameters"/>
> > 
> > 
> >  > name="parameters"/>
> > 
> > 
> > 
> >  > message="impl:findStatusOverviewRequest"
> > name="findStatusOverviewRequest"/>
> >  > message="impl:findStatusOverviewResponse"
> > name="findStatusOverviewResponse"/>
> > 
> > 
> >  > type="impl:ManageNetworkElementRemote">
> >  > transport="http://schemas.xmlsoap.org/soap/http"/>
> > 
> > 
> >  name="findStatusOverviewRequest">
> > 
> > 
> >  name="findStatusOverviewResponse">
> > 
> > 
> > 
> > 
> > 
> >  > binding="impl:ManageNetworkElementSoapBinding"
> > name="ManageNetworkElement">
> >  > location="http://localhost:8080/hix/services/ManageNetworkElement"/>
> > 
> > 
> > 
> > 
> >
> > Now, the actual response generated by Axis looks as follows
> --- notice
> > how I am getting a "double" nesting of the return element: I am
> > getting the sequence of 'StatusOverviewReturn' elements
> nested within a "Group"
> > element of the same name!
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > Hix
> > 5620
> > HIX
> 1
> >
> true
> > 
> > 
> > Hix
> > 5620
> > HIX
> 2
> >
> true
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > So, what am I seeing here? It seems to me that the Axis-generated
> > response message does _not_ conform to runtime-generated WSDL (also
> > generated by Axis)!? Is one not meant to dictate the shape
> of the other?
> > Or, seeing that Axis is in control of both, should one not
> sync with
> > the other?
> >
> > What am I not seeing? Is this expected behavior? Known
> behavior? A bug?
> >
> >
> > Cheers,
> > Olaf Kruger
> >
> > CAUTION - This message may contain privileged and
> confidential information intended only for the use of the
> addressee named above. If you are not the intended recipient
> of this message you are hereby notified that any use,
> dissemination, distribution or reproduction of this message
> is prohibited. If you have received this message in error
> please notify Siemens Ltd., ABN 98 004 347 880, or Siemens
> (NZ) Limited immediately.

RE: Newbie question regarding adminclient

2005-11-21 Thread Ketan Deshpande
Have you compared the log messages - one run with the working case and one with
the non-working? 

-K



--- Randy Wigginton <[EMAIL PROTECTED]> wrote:

> Actually I had put the jars in the path earlier and found it made no
> difference so I took them out again.  The only thing I've found to
> matter is the magical path & classname.
> 
>  
> 
> 
> 
> From: Dovholuk, Clint [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 21, 2005 6:13 PM
> To: axis-user@ws.apache.org
> Subject: RE: Newbie question regarding adminclient
> 
>  
> 
> i would guess that the root of your problem is that activation.jar and
> mail.jar are not in your classpath...
> 
>  
> 
> verify that your classpath has those two jars are in it.
> 
>  
> 
>  
> 
> 
> 
> From: Randy Wigginton [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 21, 2005 6:11 PM
> To: axis-user@ws.apache.org
> Subject: Newbie question regarding adminclient
> 
> I apologize if this has been asked before, but I have been unable to
> locate such a question.
> 
>  
> 
> I am executing this command:
> 
> java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient
> deploy.wsdd
> 
>  
> 
> The error I get is:
> 
> 17:52:00,398  WARN JavaUtils:1212 - Unable to find required classes
> (javax.activation.DataHandler and javax.mail.interne
> 
> t.MimeMultipart). Attachment support is disabled.
> 
> Processing file deploy.wsdd
> 
> Exception: AxisFault
> 
>  faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> 
>  faultSubcode:
> 
>  faultString: java.lang.reflect.InvocationTargetException
> 
>  faultActor:
> 
>  faultNode:
> 
>  faultDetail:
> 
> {http://xml.apache.org/axis/}hostname:nyc-randy
> 
>  
> 
> Unfortunately, I can't figure out how to get the real root of the
> problem.  Here is my deploy.wsdd (I've cut everything I can out to still
> show the problem).  I've also found one interesting adjunct, just below
> the wsdd contents here:
> 
>  
> 
>  
> xmlns="http://xml.apache.org/axis/wsdd/";
> 
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
> 
>style="rpc" use="encoded">
> 
>value="urn:ThirdPartyCampaignService"/>
> 
>value="ThirdPartyCampaignServiceService"/>
> 
>value="com.quigo.ppcplus.service.thirdparty.campaign.ThirdPartyCampaignS
> erviceSoapBindingSkeleton"/>
> 
>   
> 
>   
> 
>
> xmlns:ns="http://common.ppcplus.quigo.com";
> 
> qname="ns:RTException"
> 
> type="java:com.quigo.ppcplus.common.RTException"
> 
> serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
> 
>  
> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
> 
>   />
> 
>   
> 
> 
> 
>  
> 
> If I change the name of the type - in any way - I get the Done
> processing message.  Even if I change the name of the class to
> QRTexception, the package from .common. to .uncommon. ... literally
> almost anything.  
> 
>  
> 
> Can anyone give me any kind of clue what is happening here?  If I set my
> logging level to debug, I get a huge output... but I can't make heads or
> tails of it.  Any hints?
> 
>  
> 
> 


Ketan Deshpande
[EMAIL PROTECTED]



__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com


Re: Response not conforming to WSDL

2005-11-21 Thread Davanum Srinivas
How did you generate the service? (from this WSDL?)

-- dims

On 11/21/05, Kruger, Olaf <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I am trying to solve a problem that our UI/Flash designers have with the
> response message that is generated from Axis 1.3. Specifically, what I
> am seeing is that there is a mismatch between the WSDL (as generated by
> Axis itself) and the response that is generated.
>
> I have the following WSDL returned by Axis (snippets only... Hope all
> the interesting bits are in there...); specifically, I'd like to point
> out the way the response is structured: within the
> 'statusOverviewResponse' I have an unbounded list of
> 'StatusOverviewReturn' elements (of type StatusOverview - each of which
> containing three "basic" elements).
>
> 
>  targetNamespace="http://com.si.hix.networkprovisioning.appservice";>
> 
> 
>targetNamespace="http://com.si.hix.networkprovisioning.appservice";>
>  namespace="http://com.si.hix.networkprovisioning.appservice.iface"/>
>
> 
> 
> 
>  name="findStatusOverviewReturn" type="tns1:StatusOverview"/>
> 
> 
> 
>
> targetNamespace="http://com.si.hix.networkprovisioning.appservice.iface";
> >
> 
> 
>  type="xsd:string"/>
>  type="xsd:string"/>
> 
> 
> 
>
> 
> 
>  name="parameters"/>
> 
> 
>  name="parameters"/>
> 
> 
> 
>  message="impl:findStatusOverviewRequest"
> name="findStatusOverviewRequest"/>
>  message="impl:findStatusOverviewResponse"
> name="findStatusOverviewResponse"/>
> 
> 
>  type="impl:ManageNetworkElementRemote">
>  transport="http://schemas.xmlsoap.org/soap/http"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  binding="impl:ManageNetworkElementSoapBinding"
> name="ManageNetworkElement">
>  location="http://localhost:8080/hix/services/ManageNetworkElement"/>
> 
> 
> 
> 
>
> Now, the actual response generated by Axis looks as follows --- notice
> how I am getting a "double" nesting of the return element: I am getting
> the sequence of 'StatusOverviewReturn' elements nested within a "Group"
> element of the same name!
>
> 
> 
> 
> 
> 
> 
> Hix
> 5620
> HIX 1
> true
> 
> 
> Hix
> 5620
> HIX 2
> true
> 
> 
> 
> 
> 
> 
>
> So, what am I seeing here? It seems to me that the Axis-generated
> response message does _not_ conform to runtime-generated WSDL (also
> generated by Axis)!? Is one not meant to dictate the shape of the other?
> Or, seeing that Axis is in control of both, should one not sync with the
> other?
>
> What am I not seeing? Is this expected behavior? Known behavior? A bug?
>
>
> Cheers,
> Olaf Kruger
>
> CAUTION - This message may contain privileged and confidential information 
> intended only for the use of the addressee named above. If you are not the 
> intended recipient of this message you are hereby notified that any use, 
> dissemination, distribution or reproduction of this message is prohibited. If 
> you have received this message in error please notify Siemens Ltd., ABN 98 
> 004 347 880, or Siemens (NZ) Limited immediately.
>


--
Davanum Srinivas : http://wso2.com/blogs/


RE: Newbie question regarding adminclient

2005-11-21 Thread Randy Wigginton








Actually I had put the jars in the path
earlier and found it made no difference so I took them out again.  The
only thing I’ve found to matter is the magical path & classname.

 









From: Dovholuk, Clint
[mailto:[EMAIL PROTECTED] 
Sent: Monday, November 21, 2005
6:13 PM
To: axis-user@ws.apache.org
Subject: RE: Newbie question
regarding adminclient



 

i would guess that the root of your
problem is that activation.jar and mail.jar are not in your classpath...

 

verify that your classpath has those two
jars are in it.

 

 







From: Randy
Wigginton [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 21, 2005
6:11 PM
To: axis-user@ws.apache.org
Subject: Newbie question regarding
adminclient

I apologize if this has been asked before, but I have been
unable to locate such a question.

 

I am executing this command:

java -cp %AXISCLASSPATH%
org.apache.axis.client.AdminClient   deploy.wsdd

 

The error I get is:

17:52:00,398  WARN JavaUtils:1212 - Unable to find
required classes (javax.activation.DataHandler and javax.mail.interne

t.MimeMultipart). Attachment support is disabled.

Processing file deploy.wsdd

Exception: AxisFault

 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException

 faultSubcode:

 faultString:
java.lang.reflect.InvocationTargetException

 faultActor:

 faultNode:

 faultDetail:

   
{http://xml.apache.org/axis/}hostname:nyc-randy

 

Unfortunately, I can’t figure out how to get the real
root of the problem.  Here is my deploy.wsdd (I’ve cut everything I
can out to still show the problem).  I’ve also found one interesting
adjunct, just below the wsdd contents here:

 



   
xmlns="http://xml.apache.org/axis/wsdd/"

   
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

  

  

  

  

  

  

  

   
xmlns:ns="http://common.ppcplus.quigo.com"

  
 qname="ns:RTException"

   
type="java:com.quigo.ppcplus.common.RTException"

   
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"

   
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"

   
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"

  />

  



 

If I change the name of the type – in any way –
I get the Done processing message.  Even if I
change the name of the class to QRTexception, the package from .common. to
.uncommon. … literally almost anything.  

 

Can anyone give me any kind of clue what is happening
here?  If I set my logging level to debug, I get a huge output… but
I can’t make heads or tails of it.  Any hints?

 








RE: Newbie question regarding adminclient

2005-11-21 Thread Dovholuk, Clint



i would guess that the root of your problem is that 
activation.jar and mail.jar are not in your classpath...
 
verify that your classpath has those two jars are in 
it.
 


From: Randy Wigginton [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 21, 2005 6:11 PMTo: 
axis-user@ws.apache.orgSubject: Newbie question regarding 
adminclient


I apologize if this has been asked 
before, but I have been unable to locate such a 
question.
 
I am executing this 
command:
java -cp %AXISCLASSPATH% 
org.apache.axis.client.AdminClient   
deploy.wsdd
 
The error I get 
is:
17:52:00,398  WARN 
JavaUtils:1212 - Unable to find required classes (javax.activation.DataHandler 
and javax.mail.interne
t.MimeMultipart). Attachment support 
is disabled.
Processing file 
deploy.wsdd
Exception: 
AxisFault
 faultCode: 
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: 
java.lang.reflect.InvocationTargetException
 faultActor:
 faultNode:
 faultDetail:
    
{http://xml.apache.org/axis/}hostname:nyc-randy
 
Unfortunately, I can’t figure out 
how to get the real root of the problem.  Here is my deploy.wsdd (I’ve cut 
everything I can out to still show the problem).  I’ve also found one 
interesting adjunct, just below the wsdd contents 
here:
 

    
xmlns="http://xml.apache.org/axis/wsdd/"
    
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
  
  

  

  

  

  

  

    
xmlns:ns="http://common.ppcplus.quigo.com"
   
 qname="ns:RTException"
    
type="java:com.quigo.ppcplus.common.RTException"
    
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
    
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
    
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  
/>
  


 
If I change the name of the type – 
in any way – I get the Done processing message.  
Even if I change the name of the class to QRTexception, the package from 
.common. to .uncommon. … literally almost anything.  

 
Can anyone give me any kind of clue 
what is happening here?  If I set my logging level to debug, I get a huge 
output… but I can’t make heads or tails of it.  Any 
hints?
 


Re: Authenticating users

2005-11-21 Thread Michael Rudolf

Ok...im getting a bit confused here...


i had wondered that one myself.  you can configure WSS4J to send the password
in your UsernameToken as plaintext instead of SHA-1 digest.  so i guess your
client can send the encrypted password as plaintext and then your server would
compare that encrypted value with what's stored in LDAP.

How do i do that? The callback class sets the pw. I cant even access it 
in there. How does the pw sent from the client get to the server into 
the callback class?



 doesn't seem
terribly secure in that case, tho, but otherwise the client would need access
to the plaintext password, as would the server because the callback handler
never gets the password that was sent by the client - all that work happens in

org.apache.ws.security.WSSecurityEngine.handleUsernameToken(Element token,
CallbackHandler cb).

NOTE, i remember seeing a post about a bug in the password comparison code and
i think it's in this method.  it appears from the code that the passwords are
only compared if it's a digest password (with nonce != null && createdTime !=
null).  otherwise the lines (856-858 in my src)
 


did you send your src? i didnt see it...sorry...


if (!passDigest.equals(password)) {
 throw new WSSecurityException(WSSecurityException.FAILED_AUTHENTICATION);
}

are skipped entirely!  um, WSS4J folks - this has been fixed, right?



 


And another question on this one...my passwords in the LDAP dir are
encrypted as they are migrated from a UNIX passwd file. The Callback
Class actually expects me to set the password. How did you do the actual
authentication then? Can i read the pass in cleartext? I need a
cleartext pass later in the process for an ssh connection. Any ideas on
how to do this?

   


the handler for exracting the login name?  that's basically the code i
included below to extract from the incoming message, then create the user
object, hit the LDAP server (through JNDI api) and then store (actually in a
thread-local so even non-Axis code can get the current user).  the rest is to
include it thus in your server-config.wsdd:


  
  


  
  
  




  
  

  

that's about it.

the best documentation on WSS4J (or at least links to it) SHOULD be in the
Wiki ( http://wiki.apache.org/ws/FrontPage/WsFx ) but i'm not certain one
could say that yet...  i keep a short list of good resources i've found here
http://wiki.apache.org/ws/RonReynolds/Wss4jLinks but it's only a handful of
links but it might give you a starting point. :)  search around in the Wiki
and then your next best bet are the 2 wss4j docs and then Google...

..ron.



 


Thx for your help. I figured it out now. Didnt see one section of the
WSS4J documentation. You can set the EngineConfiguration to use a wsdd
file inside the program code. As long as this is readable from the
servlet everythings fine.
Is there any good tutorial or documentation on developing these Handlers
like you explained below? I dunno if you mind sharing your Handler
implementation. It would be interesting to see how you did this.
Thanks alot!
Michael



   


i haven't tried this.  it certainly must be possible, but right now i
haven't
the time to figure it out.

i would start at MessageContext.getAxisEngine().getGlobalRequest() and
search
in that area.  the file itself is loaded by
org.apache.axis.configuration.EngineConfigurationFactoryDefault.  also i
seem
to remember someone mentioning that you could access the global request
flow
and insert a handler into that flow at runtime.  also if you have
permissions
you can call System.setProperty() from a startup servlet (if you want a
possibly much simpler solution that opens up a bunch of possible bugs if
another servlet in the same servlet engine tries to connect to a different
web
service...)

sorry i couldn't be of more help. :-/
...ron.






 


Ok...i dont use the client_deploy.wsddis there any way to avoid
using it? I have the client inside a servlet so i cant specify it with
the java -D command line.
Thx!
Michael





   


do you have this in your client-config.wsdd?




  
  



  
?

otherwise there won't be any handler in the request flow that knows what
to
do
with those properties.

hth.
.ron.






 


Ok, so i got the server working basically (i think) but when calling it
i get the following exception at the client:

AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: WSDoAllReceiver: Request does not contain required
Security header


Thats the client code so far:

try {
  binding = new
al.JCT.service.JCTServiceLocator().getJCTSession();
  Stub axisPort = (Stub)binding;
  axisPort._setProperty(UsernameToken.PASSWORD_TYPE,
WSConstants.PASSWORD_DIGEST);
  axisPort._setProperty(WSHandlerConstants.USER, "wss4j");
  axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, n

Newbie question regarding adminclient

2005-11-21 Thread Randy Wigginton








I apologize if this has been asked before, but I have been
unable to locate such a question.

 

I am executing this command:

java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient  
deploy.wsdd

 

The error I get is:

17:52:00,398  WARN JavaUtils:1212 - Unable to find
required classes (javax.activation.DataHandler and javax.mail.interne

t.MimeMultipart). Attachment support is disabled.

Processing file deploy.wsdd

Exception: AxisFault

 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException

 faultSubcode:

 faultString:
java.lang.reflect.InvocationTargetException

 faultActor:

 faultNode:

 faultDetail:

   
{http://xml.apache.org/axis/}hostname:nyc-randy

 

Unfortunately, I can’t figure out how to get the real
root of the problem.  Here is my deploy.wsdd (I’ve cut everything I
can out to still show the problem).  I’ve also found one interesting
adjunct, just below the wsdd contents here:

 



   
xmlns="http://xml.apache.org/axis/wsdd/"

   
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

  

  

  

  

  

  

  

   
xmlns:ns="http://common.ppcplus.quigo.com"

    qname="ns:RTException"

   
type="java:com.quigo.ppcplus.common.RTException"

   
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"

   
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"

   
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"

  />

  



 

If I change the name of the type – in any way – I
get the Done processing message.  Even if I
change the name of the class to QRTexception, the package from .common. to
.uncommon. … literally almost anything.  

 

Can anyone give me any kind of clue what is happening
here?  If I set my logging level to debug, I get a huge output… but
I can’t make heads or tails of it.  Any hints?

 








Re: Authenticating users

2005-11-21 Thread Ron Reynolds
i had wondered that one myself.  you can configure WSS4J to send the password
in your UsernameToken as plaintext instead of SHA-1 digest.  so i guess your
client can send the encrypted password as plaintext and then your server would
compare that encrypted value with what's stored in LDAP.  doesn't seem
terribly secure in that case, tho, but otherwise the client would need access
to the plaintext password, as would the server because the callback handler
never gets the password that was sent by the client - all that work happens in

org.apache.ws.security.WSSecurityEngine.handleUsernameToken(Element token,
CallbackHandler cb).

NOTE, i remember seeing a post about a bug in the password comparison code and
i think it's in this method.  it appears from the code that the passwords are
only compared if it's a digest password (with nonce != null && createdTime !=
null).  otherwise the lines (856-858 in my src)

if (!passDigest.equals(password)) {
  throw new WSSecurityException(WSSecurityException.FAILED_AUTHENTICATION);
}

are skipped entirely!  um, WSS4J folks - this has been fixed, right?



> And another question on this one...my passwords in the LDAP dir are
> encrypted as they are migrated from a UNIX passwd file. The Callback
> Class actually expects me to set the password. How did you do the actual
> authentication then? Can i read the pass in cleartext? I need a
> cleartext pass later in the process for an ssh connection. Any ideas on
> how to do this?
>
>>the handler for exracting the login name?  that's basically the code i
>>included below to extract from the incoming message, then create the user
>>object, hit the LDAP server (through JNDI api) and then store (actually in a
>>thread-local so even non-Axis code can get the current user).  the rest is to
>>include it thus in your server-config.wsdd:
>>
>>  > use="literal">
>>
>>
>>  
>>  
>>
>>
>>> value="ServerSidePWCallback"/>
>>  
>>
>>  
>>  >type="java:com.amgen.seattle.appdev.freezer.webservice.server.WSLoginNameHandler">
>>
>>
>>  
>>
>>
>>that's about it.
>>
>>the best documentation on WSS4J (or at least links to it) SHOULD be in the
>>Wiki ( http://wiki.apache.org/ws/FrontPage/WsFx ) but i'm not certain one
>>could say that yet...  i keep a short list of good resources i've found here
>>http://wiki.apache.org/ws/RonReynolds/Wss4jLinks but it's only a handful of
>>links but it might give you a starting point. :)  search around in the Wiki
>>and then your next best bet are the 2 wss4j docs and then Google...
>>
>>..ron.
>>
>>
>>
>>>Thx for your help. I figured it out now. Didnt see one section of the
>>>WSS4J documentation. You can set the EngineConfiguration to use a wsdd
>>>file inside the program code. As long as this is readable from the
>>>servlet everythings fine.
>>>Is there any good tutorial or documentation on developing these Handlers
>>>like you explained below? I dunno if you mind sharing your Handler
>>>implementation. It would be interesting to see how you did this.
>>>Thanks alot!
>>>Michael
>>>
>>>
>>>
i haven't tried this.  it certainly must be possible, but right now i
 haven't
the time to figure it out.

i would start at MessageContext.getAxisEngine().getGlobalRequest() and
 search
in that area.  the file itself is loaded by
org.apache.axis.configuration.EngineConfigurationFactoryDefault.  also i
 seem
to remember someone mentioning that you could access the global request
 flow
and insert a handler into that flow at runtime.  also if you have
 permissions
you can call System.setProperty() from a startup servlet (if you want a
possibly much simpler solution that opens up a bunch of possible bugs if
another servlet in the same servlet engine tries to connect to a different
web
service...)

sorry i couldn't be of more help. :-/
...ron.






>Ok...i dont use the client_deploy.wsddis there any way to avoid
>using it? I have the client inside a servlet so i cant specify it with
>the java -D command line.
>Thx!
>Michael
>
>
>
>
>
>>do you have this in your client-config.wsdd?
>>
>>
>>
>>  
>>
>>
>>  
>>  
>>  
>>
>>?
>>
>>otherwise there won't be any handler in the request flow that knows what
>> to
>>do
>>with those properties.
>>
>>hth.
>>.ron.
>>
>>
>>
>>
>>
>>
>>>Ok, so i got the server working basically (i think) but when calling it
>>>i get the following exception at the client:
>>>
>>>AxisFault
>>>faultCode:
>>>{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
>>>faultSubcode:
>>>faultString: WSDoAllReceiver: Request does not contain required
>>>Security header
>>>
>>>
>

Response not conforming to WSDL

2005-11-21 Thread Kruger, Olaf


Hi,

I am trying to solve a problem that our UI/Flash designers have with the
response message that is generated from Axis 1.3. Specifically, what I
am seeing is that there is a mismatch between the WSDL (as generated by
Axis itself) and the response that is generated.

I have the following WSDL returned by Axis (snippets only... Hope all
the interesting bits are in there...); specifically, I'd like to point
out the way the response is structured: within the
'statusOverviewResponse' I have an unbounded list of
'StatusOverviewReturn' elements (of type StatusOverview - each of which
containing three "basic" elements).


http://com.si.hix.networkprovisioning.appservice";>


  http://com.si.hix.networkprovisioning.appservice";>
http://com.si.hix.networkprovisioning.appservice.iface"/>








   
   http://com.si.hix.networkprovisioning.appservice.iface";
>







   














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












http://localhost:8080/hix/services/ManageNetworkElement"/>





Now, the actual response generated by Axis looks as follows --- notice
how I am getting a "double" nesting of the return element: I am getting
the sequence of 'StatusOverviewReturn' elements nested within a "Group"
element of the same name!







Hix
5620
HIX 1
true


Hix
5620
HIX 2
true







So, what am I seeing here? It seems to me that the Axis-generated
response message does _not_ conform to runtime-generated WSDL (also
generated by Axis)!? Is one not meant to dictate the shape of the other?
Or, seeing that Axis is in control of both, should one not sync with the
other?

What am I not seeing? Is this expected behavior? Known behavior? A bug?


Cheers,
Olaf Kruger

CAUTION - This message may contain privileged and confidential information 
intended only for the use of the addressee named above. If you are not the 
intended recipient of this message you are hereby notified that any use, 
dissemination, distribution or reproduction of this message is prohibited. If 
you have received this message in error please notify Siemens Ltd., ABN 98 004 
347 880, or Siemens (NZ) Limited immediately.


Re: Authenticating users

2005-11-21 Thread Michael Rudolf
And another question on this one...my passwords in the LDAP dir are 
encrypted as they are migrated from a UNIX passwd file. The Callback 
Class actually expects me to set the password. How did you do the actual 
authentication then? Can i read the pass in cleartext? I need a 
cleartext pass later in the process for an ssh connection. Any ideas on 
how to do this?



the handler for exracting the login name?  that's basically the code i
included below to extract from the incoming message, then create the user
object, hit the LDAP server (through JNDI api) and then store (actually in a
thread-local so even non-Axis code can get the current user).  the rest is to
include it thus in your server-config.wsdd:

 
   
   
 
 
   
   
   
 

 
 
   
   
 
   

that's about it.

the best documentation on WSS4J (or at least links to it) SHOULD be in the
Wiki ( http://wiki.apache.org/ws/FrontPage/WsFx ) but i'm not certain one
could say that yet...  i keep a short list of good resources i've found here
http://wiki.apache.org/ws/RonReynolds/Wss4jLinks but it's only a handful of
links but it might give you a starting point. :)  search around in the Wiki
and then your next best bet are the 2 wss4j docs and then Google...

..ron.

 


Thx for your help. I figured it out now. Didnt see one section of the
WSS4J documentation. You can set the EngineConfiguration to use a wsdd
file inside the program code. As long as this is readable from the
servlet everythings fine.
Is there any good tutorial or documentation on developing these Handlers
like you explained below? I dunno if you mind sharing your Handler
implementation. It would be interesting to see how you did this.
Thanks alot!
Michael

   


i haven't tried this.  it certainly must be possible, but right now i haven't
the time to figure it out.

i would start at MessageContext.getAxisEngine().getGlobalRequest() and search
in that area.  the file itself is loaded by
org.apache.axis.configuration.EngineConfigurationFactoryDefault.  also i seem
to remember someone mentioning that you could access the global request flow
and insert a handler into that flow at runtime.  also if you have permissions
you can call System.setProperty() from a startup servlet (if you want a
possibly much simpler solution that opens up a bunch of possible bugs if
another servlet in the same servlet engine tries to connect to a different
web
service...)

sorry i couldn't be of more help. :-/
...ron.




 


Ok...i dont use the client_deploy.wsddis there any way to avoid
using it? I have the client inside a servlet so i cant specify it with
the java -D command line.
Thx!
Michael



   


do you have this in your client-config.wsdd?



 
   
   
 
 
 
   
?

otherwise there won't be any handler in the request flow that knows what to
do
with those properties.

hth.
.ron.




 


Ok, so i got the server working basically (i think) but when calling it
i get the following exception at the client:

AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: WSDoAllReceiver: Request does not contain required
Security header


Thats the client code so far:

try {
   binding = new al.JCT.service.JCTServiceLocator().getJCTSession();
   Stub axisPort = (Stub)binding;
   axisPort._setProperty(UsernameToken.PASSWORD_TYPE,
WSConstants.PASSWORD_DIGEST);
   axisPort._setProperty(WSHandlerConstants.USER, "wss4j");
   axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, new
PWCallback());
   }
   catch (javax.xml.rpc.ServiceException jre) {
   jre.printStackTrace();
   return;
   }

   try {
   al.JCT.service.Job[] value = null;
   String ids[] = {"1218"};
   value = binding.getJobStatus("rudi", "qw", null, ids);
   if (value != null) {
 for (int i=0; i < value.length; i++) {
   System.out.println(value[i].getId() + " - " +
value[i].getName() + " - " + value[i].getPe());
   System.out.println(value[i].getReservations());
   System.out.println(value[i].getOutputPaths()[0].getPath());
 }
   }
   binding.submitJob(null, null, null);
   }
   catch (java.rmi.RemoteException re) {
 re.printStackTrace();
 return;
   }


Any ideas on this one?

Thx!
Michael





   


you can extract all the security info by looking at the Vector stored
as a property in the MessageContext:
Vector resultHandlers =
(Vector)MessageContext.getCurrentContext().getProperty(WSHandlerConstants.RECV_RESULTS);


this vector contains, as far as i can tell, everything you could want
to know.
or you can extract the username from the message itself -
ArrayList actorList = new ArrayList();
actorList.add("actor value for my UsernameToken entry");
Message request = MessageContext.getCurrentContext().getRequestMessage();
SOAPEnvelope envelope = (SOAPEnvelope)request.getSOAPEnv

Re: Authenticating users

2005-11-21 Thread Ron Reynolds
the handler for exracting the login name?  that's basically the code i
included below to extract from the incoming message, then create the user
object, hit the LDAP server (through JNDI api) and then store (actually in a
thread-local so even non-Axis code can get the current user).  the rest is to
include it thus in your server-config.wsdd:

  


  
  



  

  
  


  


that's about it.

the best documentation on WSS4J (or at least links to it) SHOULD be in the
Wiki ( http://wiki.apache.org/ws/FrontPage/WsFx ) but i'm not certain one
could say that yet...  i keep a short list of good resources i've found here
http://wiki.apache.org/ws/RonReynolds/Wss4jLinks but it's only a handful of
links but it might give you a starting point. :)  search around in the Wiki
and then your next best bet are the 2 wss4j docs and then Google...

..ron.

> Thx for your help. I figured it out now. Didnt see one section of the
> WSS4J documentation. You can set the EngineConfiguration to use a wsdd
> file inside the program code. As long as this is readable from the
> servlet everythings fine.
> Is there any good tutorial or documentation on developing these Handlers
> like you explained below? I dunno if you mind sharing your Handler
> implementation. It would be interesting to see how you did this.
> Thanks alot!
> Michael
>
>>i haven't tried this.  it certainly must be possible, but right now i haven't
>>the time to figure it out.
>>
>>i would start at MessageContext.getAxisEngine().getGlobalRequest() and search
>>in that area.  the file itself is loaded by
>>org.apache.axis.configuration.EngineConfigurationFactoryDefault.  also i seem
>>to remember someone mentioning that you could access the global request flow
>>and insert a handler into that flow at runtime.  also if you have permissions
>>you can call System.setProperty() from a startup servlet (if you want a
>>possibly much simpler solution that opens up a bunch of possible bugs if
>>another servlet in the same servlet engine tries to connect to a different
>> web
>>service...)
>>
>>sorry i couldn't be of more help. :-/
>>...ron.
>>
>>
>>
>>
>>>Ok...i dont use the client_deploy.wsddis there any way to avoid
>>>using it? I have the client inside a servlet so i cant specify it with
>>>the java -D command line.
>>>Thx!
>>>Michael
>>>
>>>
>>>
do you have this in your client-config.wsdd?

 
 
   
 
 
   
   
   
 
?

otherwise there won't be any handler in the request flow that knows what to
do
with those properties.

hth.
.ron.




>Ok, so i got the server working basically (i think) but when calling it
>i get the following exception at the client:
>
>AxisFault
>faultCode:
>{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
>faultSubcode:
>faultString: WSDoAllReceiver: Request does not contain required
>Security header
>
>
>Thats the client code so far:
>
>try {
> binding = new al.JCT.service.JCTServiceLocator().getJCTSession();
> Stub axisPort = (Stub)binding;
> axisPort._setProperty(UsernameToken.PASSWORD_TYPE,
>WSConstants.PASSWORD_DIGEST);
> axisPort._setProperty(WSHandlerConstants.USER, "wss4j");
> axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, new
>PWCallback());
> }
> catch (javax.xml.rpc.ServiceException jre) {
> jre.printStackTrace();
> return;
> }
>
> try {
> al.JCT.service.Job[] value = null;
> String ids[] = {"1218"};
> value = binding.getJobStatus("rudi", "qw", null, ids);
> if (value != null) {
>   for (int i=0; i < value.length; i++) {
> System.out.println(value[i].getId() + " - " +
>value[i].getName() + " - " + value[i].getPe());
> System.out.println(value[i].getReservations());
> System.out.println(value[i].getOutputPaths()[0].getPath());
>   }
> }
> binding.submitJob(null, null, null);
> }
> catch (java.rmi.RemoteException re) {
>   re.printStackTrace();
>   return;
> }
>
>
>Any ideas on this one?
>
>Thx!
>Michael
>
>
>
>
>
>>you can extract all the security info by looking at the Vector stored
>>as a property in the MessageContext:
>>Vector resultHandlers =
>>(Vector)MessageContext.getCurrentContext().getProperty(WSHandlerConstants.RECV_RESULTS);
>>
>>
>>this vector contains, as far as i can tell, everything you could want
>>to know.
>>or you can extract the username from the message itself -
>>ArrayList actorList = new ArrayList();
>>acto

axis1.3-ClassCast Exception at call.invoke

2005-11-21 Thread jsri

Hello all


  


I'm a newbie to webservices. I'm trying to consume
webservices. I'm using axis1.3,Eclipse IDE. Using axis i got the java & stub
classes generated. I'm able to receive string literals from webservice. Problem comes
with objects..bean. This is the scenairo of the application...When i
send an Patient ID to the webservices it returns demographic information
related to the  Patient ID.




(a) Query record -method returns Patient  record for the requested Patient-MPI ID 

1. I sent an invalid MPI ID. I got msg from webservice- "MPI ID doesn't exists" .

2.When i send the existing MPI ID i get ClassCastException. It
show the error at call.invoke().I tried using the same jar files used
by the webservice provider to generate java calsses &stubs.still
got the same errors. I attached wsdl and soapbindingstub class.I'm
pasting the code snippets&stack trace below.  



Generated SoapBindingStub.java 

*

 public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.String in0, long in1) throws java.rmi.RemoteException {

         

            

           if (super.cachedEndpoint == null) {

          throw new org.apache.axis.NoEndPointException();

    }

       

        

    org.apache.axis.client.Call _call = createCall();

    _call.setOperation(_operations[0]);

    _call.setUseSOAPAction(true);

    _call.setSOAPActionURI(""); 

    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);

   _call.setOperationName(new javax.xml.namespace.QName("urn:mpi", "queryRecord"));

     

    setRequestHeaders(_call);

    setAttachments(_call);

    

 try {   

     

  java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, new java.lang.Long(in1)});

       

 if (_resp instanceof java.rmi.RemoteException) {

    throw (java.rmi.RemoteException)_resp;

    }

    else {

       extractAttachments(_call);

 try {

   
return (com.stchome.mpi.MPIQueryReply) _resp;

       } 

   catch (java.lang.Exception _exception) {

    return
(com.stchome.mpi.MPIQueryReply)
org.apache.axis.utils.JavaUtils.convert(_resp,
com.stchome.mpi.MPIQueryReply.class);

    }

    }

  } catch (org.apache.axis.AxisFault axisFaultException) {

  throw axisFaultException;

}

  

    }

*

ClientTest.java Query Record
**

public  void  QueryMPI() throws Exception {

        

    java.lang.String in0String = new String("system"); //mpi user

    long in1Long =  17831;

        

    try{

 

  MPIServiceLocator temp = new MPIServiceLocator();

  MPI mpi = temp.getMPI();

 

  com.stchome.mpi.MPIQueryReply x = mpi.queryRecord(in0String,in1Long); 
  System.out.println((x.getRecord()).getFirstName());


          

  System.out.println("Status : " + x.getStatus());

  System.out.println("Status String : " + x.getStatusString());

}

 *

AxisFault

 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException



 faultSubcode: 

 faultString: java.lang.ClassCastException

 faultActor: 

 faultNode: 

 faultDetail: 

    {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException



    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)

    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)

    at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)

    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)

    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)

    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)

    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)

    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)

    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)

    at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)

    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)

    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

    at org.apache

Re: Authenticating users

2005-11-21 Thread Michael Rudolf
Thx for your help. I figured it out now. Didnt see one section of the 
WSS4J documentation. You can set the EngineConfiguration to use a wsdd 
file inside the program code. As long as this is readable from the 
servlet everythings fine.
Is there any good tutorial or documentation on developing these Handlers 
like you explained below? I dunno if you mind sharing your Handler 
implementation. It would be interesting to see how you did this.

Thanks alot!
Michael


i haven't tried this.  it certainly must be possible, but right now i haven't
the time to figure it out.

i would start at MessageContext.getAxisEngine().getGlobalRequest() and search
in that area.  the file itself is loaded by
org.apache.axis.configuration.EngineConfigurationFactoryDefault.  also i seem
to remember someone mentioning that you could access the global request flow
and insert a handler into that flow at runtime.  also if you have permissions
you can call System.setProperty() from a startup servlet (if you want a
possibly much simpler solution that opens up a bunch of possible bugs if
another servlet in the same servlet engine tries to connect to a different web
service...)

sorry i couldn't be of more help. :-/
...ron.


 


Ok...i dont use the client_deploy.wsddis there any way to avoid
using it? I have the client inside a servlet so i cant specify it with
the java -D command line.
Thx!
Michael

   


do you have this in your client-config.wsdd?



  


  
  
  

?

otherwise there won't be any handler in the request flow that knows what to
do
with those properties.

hth.
.ron.


 


Ok, so i got the server working basically (i think) but when calling it
i get the following exception at the client:

AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: WSDoAllReceiver: Request does not contain required
Security header


Thats the client code so far:

try {
binding = new al.JCT.service.JCTServiceLocator().getJCTSession();
Stub axisPort = (Stub)binding;
axisPort._setProperty(UsernameToken.PASSWORD_TYPE,
WSConstants.PASSWORD_DIGEST);
axisPort._setProperty(WSHandlerConstants.USER, "wss4j");
axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, new
PWCallback());
}
catch (javax.xml.rpc.ServiceException jre) {
jre.printStackTrace();
return;
}

try {
al.JCT.service.Job[] value = null;
String ids[] = {"1218"};
value = binding.getJobStatus("rudi", "qw", null, ids);
if (value != null) {
  for (int i=0; i < value.length; i++) {
System.out.println(value[i].getId() + " - " +
value[i].getName() + " - " + value[i].getPe());
System.out.println(value[i].getReservations());
System.out.println(value[i].getOutputPaths()[0].getPath());
  }
}
binding.submitJob(null, null, null);
}
catch (java.rmi.RemoteException re) {
  re.printStackTrace();
  return;
}


Any ideas on this one?

Thx!
Michael



   


you can extract all the security info by looking at the Vector stored
as a property in the MessageContext:
Vector resultHandlers =
(Vector)MessageContext.getCurrentContext().getProperty(WSHandlerConstants.RECV_RESULTS);


this vector contains, as far as i can tell, everything you could want
to know.
or you can extract the username from the message itself -
ArrayList actorList = new ArrayList();
actorList.add("actor value for my UsernameToken entry");
Message request = MessageContext.getCurrentContext().getRequestMessage();
SOAPEnvelope envelope = (SOAPEnvelope)request.getSOAPEnvelope();
Vector headers = envelope.getHeadersByActor(actorList);
SOAPHeaderElement header = (SOAPHeaderElement)headers.get(0);

you can then extract the actual username by walking the DOM tree to
the node which contains the username
MessageElement usernameTokenElement =
header.getChildElement(USERNAME_TOKEN_QNAME);
MessageElement usernameElement =
usernameTokenElement.getChildElement(USERNAME_QNAME);
String username = usernameElement.getValue();

(you'll also need these)
static final QName USERNAME_TOKEN_QNAME = new
QName(WSConstants.WSSE_NS, WSConstants.USERNAME_TOKEN_LN);
static final QName USERNAME_QNAME = new QName(WSConstants.WSSE_NS,
WSConstants.USERNAME_LN);

in my app i have a handler which i put in the request chain right
after the WSDoAllReceiver which extracts the username using the above
code, does an LDAP lookup of the user to gather roles, and then
creates an app-specific user object which it stores it as a properly
in the MessageContext where anyone in the handling chain can then
extract it via getProperty().

hth.
..ron.

Michael Rudolf wrote:



 


Thanks a lot for the detailed description! I think this will work
fine for me. One more question about this though: Can i read the
username inside the web service? Or is there an

moved from axis 1_3 to axis2 and having a WSDL2Java issue

2005-11-21 Thread Ken Hawkins
Hi all,This is the first on the list for me and please allow me to cut to the chase I perviously was using axis 1_3 and WSDL2Java to generate java files from http://affiliate.broadjam.net/server.php?wsdl this was happening fine however now that I moved to axis2 the following call produces errors:java org.apache.axis.wsdl.WSDL2Java -uri "http://affiliate.broadjam.net/server.php?wsdl"...Exception in thread "main" org.apache.axis.wsdl.codegen.CodeGenerationException: Invalid WSDL Location         at org.apache.axis.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:63)        at org.apache.axis.wsdl.WSDL2Code.main(WSDL2Code.java:28)        at org.apache.axis.wsdl.WSDL2Java.main(WSDL2Java.java:22)Caused by: java.io.FileNotFoundException: http:/affiliate.broadjam.net/server.php?wsdl (No such file or directory)        at java.io.FileInputStream.open(Native Method)        at java.io.FileInputStream.(FileInputStream.java:106)        at org.apache.axis.wsdl.codegen.CodeGenerationEngine.getWOM(CodeGenerationEngine.java:109)        at org.apache.axis.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:57)        ... 2 moreI will dig through and see however I couldn't find anything readily in the archives and the calls seemed to have changed radically from 1_3 to 2. this is on a nusoap server and i will quickly ping that list as well however, is there a communication problem between axis2 and nusoap that anyone is aware of?thanks,ken;

Re: Calling Axis' getVersion manually

2005-11-21 Thread Scott McCoy
Thanks,   In order to get what I was after, I just did netcat -l -p 9000 and java org.apache.axis.Version http://127.0.0.1:9000/axis/services/Version- Scott
On 11/21/05, Davanum Srinivas <[EMAIL PROTECTED]> wrote:
try running"java org.apache.axis.Version-lhttp://scottmc-laptop:8080/axis/services/Version"-- dimsOn 11/21/05, Scott McCoy <
[EMAIL PROTECTED]> wrote:> Actually I'm not having any luck calling axis services with the SOAP> client's I typically use, is there anything different about what Axis may be
> anticipating?>> On 11/20/05, Scott McCoy <[EMAIL PROTECTED]> wrote:> > I've been trying to custom-craft a provider for axis, and in testing it I
> determined my test was broken...and in testing my test, I determined there> is something about calling Axis services I don't understand, so I'm trying> to figure out what I am missing about the transaction with the HTTP server.
> Below, is my HTTP/SOAP conversation with Axis.  At the very fundemental> protcol level, what do I have wrong here?  Figuring this out could help me> figure out whats wrong with my provider :-)> >
> > POST http://scottmc-laptop:8080/axis/services/Version> HTTP/1.1> > Content-Length: 152> > Content-Type: text/xml; charset=UTF-8
> > SOAPAction: Version#getVersion> >> > > xmlns="
http://schemas.xmlsoap.org/soap/envelope/">> > HTTP/1.0 500 Internal server error> > Set-Cookie: 7> > Set-Cookie2: 7
> > Content-Type: text/xml; charset=utf-8> >> > > xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"> xmlns:xsd="http://www.w3.org/2001/XMLSchema"> xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">> >  > >   > >> xmlns:ns1="
http://xml.apache.org/axis/">ns1:Server.NoService> >The AXIS engine could not find a target service to invoke!>  targetService is null
> >> > http://xml.apache.org/axis/">The AXIS> engine could not find a target service to invoke!  targetService is null
> > at> org.apache.axis.server.AxisServer.invoke(AxisServer.java:270)> > at> org.apache.axis.transport.http.SimpleAxisWorker.execute(SimpleAxisWorker.java:428)> > at
> org.apache.axis.transport.http.SimpleAxisWorker.run(SimpleAxisWorker.java:155)> > at> org.apache.axis.transport.http.SimpleAxisServer.run(SimpleAxisServer.java:245)> > at
> org.apache.axis.transport.http.SimpleAxisServer.start(SimpleAxisServer.java:296)> > at> org.apache.axis.transport.http.SimpleAxisServer.start(SimpleAxisServer.java:304)> > at
> org.apache.axis.transport.http.SimpleAxisServer.main(SimpleAxisServer.java:385)> > > > > xmlns:ns3="
http://xml.apache.org/axis/">scottmc-laptop> >> >   > >  > > 
> >>>--Davanum Srinivas : http://wso2.com/blogs/


Re: Authenticating users

2005-11-21 Thread iksrazal
I haven't been following the thread ... but you can invoke a client side
handler programatically, like so ...

 //add ClientHandler to chain of events
  java.util.List list = svc.getHandlerRegistry().getHandlerChain(portQN);
  list.add(new
javax.xml.rpc.handler.HandlerInfo(ClientHandler.class,this.handlerConfig,null
));

If that's what you're looking for and you get stuck, I may be able to help a
bit with some more details.

Em Segunda 21 Novembro 2005 14:59, o Michael Rudolf escreveu:
> Ok...i dont use the client_deploy.wsddis there any way to avoid
> using it? I have the client inside a servlet so i cant specify it with
> the java -D command line.
> Thx!
> Michael
>
> >do you have this in your client-config.wsdd?
> >
> >  
> >  
> >
> >  
> >  
> >
> >
> >
> >  
> >?
> >
> >otherwise there won't be any handler in the request flow that knows what
> > to do with those properties.
> >
> >hth.
> >.ron.
> >
> >>Ok, so i got the server working basically (i think) but when calling it
> >>i get the following exception at the client:
> >>
> >>AxisFault
> >> faultCode:
> >>{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
> >> faultSubcode:
> >> faultString: WSDoAllReceiver: Request does not contain required
> >>Security header
> >>
> >>
> >>Thats the client code so far:
> >>
> >>try {
> >>  binding = new
> >> al.JCT.service.JCTServiceLocator().getJCTSession(); Stub axisPort =
> >> (Stub)binding;
> >>  axisPort._setProperty(UsernameToken.PASSWORD_TYPE,
> >>WSConstants.PASSWORD_DIGEST);
> >>  axisPort._setProperty(WSHandlerConstants.USER, "wss4j");
> >>  axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, new
> >>PWCallback());
> >>  }
> >>  catch (javax.xml.rpc.ServiceException jre) {
> >>  jre.printStackTrace();
> >>  return;
> >>  }
> >>
> >>  try {
> >>  al.JCT.service.Job[] value = null;
> >>  String ids[] = {"1218"};
> >>  value = binding.getJobStatus("rudi", "qw", null, ids);
> >>  if (value != null) {
> >>for (int i=0; i < value.length; i++) {
> >>  System.out.println(value[i].getId() + " - " +
> >>value[i].getName() + " - " + value[i].getPe());
> >>  System.out.println(value[i].getReservations());
> >>  System.out.println(value[i].getOutputPaths()[0].getPath());
> >>}
> >>  }
> >>  binding.submitJob(null, null, null);
> >>  }
> >>  catch (java.rmi.RemoteException re) {
> >>re.printStackTrace();
> >>return;
> >>  }
> >>
> >>
> >>Any ideas on this one?
> >>
> >>Thx!
> >>Michael
> >>
> >>>you can extract all the security info by looking at the Vector stored
> >>>as a property in the MessageContext:
> >>>Vector resultHandlers =
> >>>(Vector)MessageContext.getCurrentContext().getProperty(WSHandlerConstant
> >>>s.RECV_RESULTS);
> >>>
> >>>
> >>>this vector contains, as far as i can tell, everything you could want
> >>>to know.
> >>>or you can extract the username from the message itself -
> >>>ArrayList actorList = new ArrayList();
> >>>actorList.add("actor value for my UsernameToken entry");
> >>>Message request =
> >>> MessageContext.getCurrentContext().getRequestMessage(); SOAPEnvelope
> >>> envelope = (SOAPEnvelope)request.getSOAPEnvelope(); Vector headers =
> >>> envelope.getHeadersByActor(actorList);
> >>>SOAPHeaderElement header = (SOAPHeaderElement)headers.get(0);
> >>>
> >>>you can then extract the actual username by walking the DOM tree to
> >>>the node which contains the username
> >>>MessageElement usernameTokenElement =
> >>>header.getChildElement(USERNAME_TOKEN_QNAME);
> >>>MessageElement usernameElement =
> >>>usernameTokenElement.getChildElement(USERNAME_QNAME);
> >>>String username = usernameElement.getValue();
> >>>
> >>>(you'll also need these)
> >>>static final QName USERNAME_TOKEN_QNAME = new
> >>>QName(WSConstants.WSSE_NS, WSConstants.USERNAME_TOKEN_LN);
> >>>static final QName USERNAME_QNAME = new QName(WSConstants.WSSE_NS,
> >>>WSConstants.USERNAME_LN);
> >>>
> >>>in my app i have a handler which i put in the request chain right
> >>>after the WSDoAllReceiver which extracts the username using the above
> >>>code, does an LDAP lookup of the user to gather roles, and then
> >>>creates an app-specific user object which it stores it as a properly
> >>>in the MessageContext where anyone in the handling chain can then
> >>>extract it via getProperty().
> >>>
> >>>hth.
> >>>..ron.
> >>>
> >>>Michael Rudolf wrote:
> Thanks a lot for the detailed description! I think this will work
> fine for me. One more question about this though: Can i read the
> username inside the web service? Or is there any way of getting
> information like the group a user belongs to inside the web service
> to read it there? It sounds like the Service does get any of this
> info since the auth

Re: Authenticating users

2005-11-21 Thread Ron Reynolds
i haven't tried this.  it certainly must be possible, but right now i haven't
the time to figure it out.

i would start at MessageContext.getAxisEngine().getGlobalRequest() and search
in that area.  the file itself is loaded by
org.apache.axis.configuration.EngineConfigurationFactoryDefault.  also i seem
to remember someone mentioning that you could access the global request flow
and insert a handler into that flow at runtime.  also if you have permissions
you can call System.setProperty() from a startup servlet (if you want a
possibly much simpler solution that opens up a bunch of possible bugs if
another servlet in the same servlet engine tries to connect to a different web
service...)

sorry i couldn't be of more help. :-/
...ron.


> Ok...i dont use the client_deploy.wsddis there any way to avoid
> using it? I have the client inside a servlet so i cant specify it with
> the java -D command line.
> Thx!
> Michael
>
>>do you have this in your client-config.wsdd?
>>
>>  
>>  
>>
>>  
>>  
>>
>>
>>
>>  
>>?
>>
>>otherwise there won't be any handler in the request flow that knows what to
>> do
>>with those properties.
>>
>>hth.
>>.ron.
>>
>>
>>>Ok, so i got the server working basically (i think) but when calling it
>>>i get the following exception at the client:
>>>
>>>AxisFault
>>> faultCode:
>>>{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
>>> faultSubcode:
>>> faultString: WSDoAllReceiver: Request does not contain required
>>>Security header
>>>
>>>
>>>Thats the client code so far:
>>>
>>>try {
>>>  binding = new al.JCT.service.JCTServiceLocator().getJCTSession();
>>>  Stub axisPort = (Stub)binding;
>>>  axisPort._setProperty(UsernameToken.PASSWORD_TYPE,
>>>WSConstants.PASSWORD_DIGEST);
>>>  axisPort._setProperty(WSHandlerConstants.USER, "wss4j");
>>>  axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, new
>>>PWCallback());
>>>  }
>>>  catch (javax.xml.rpc.ServiceException jre) {
>>>  jre.printStackTrace();
>>>  return;
>>>  }
>>>
>>>  try {
>>>  al.JCT.service.Job[] value = null;
>>>  String ids[] = {"1218"};
>>>  value = binding.getJobStatus("rudi", "qw", null, ids);
>>>  if (value != null) {
>>>for (int i=0; i < value.length; i++) {
>>>  System.out.println(value[i].getId() + " - " +
>>>value[i].getName() + " - " + value[i].getPe());
>>>  System.out.println(value[i].getReservations());
>>>  System.out.println(value[i].getOutputPaths()[0].getPath());
>>>}
>>>  }
>>>  binding.submitJob(null, null, null);
>>>  }
>>>  catch (java.rmi.RemoteException re) {
>>>re.printStackTrace();
>>>return;
>>>  }
>>>
>>>
>>>Any ideas on this one?
>>>
>>>Thx!
>>>Michael
>>>
>>>
>>>
you can extract all the security info by looking at the Vector stored
as a property in the MessageContext:
Vector resultHandlers =
(Vector)MessageContext.getCurrentContext().getProperty(WSHandlerConstants.RECV_RESULTS);


this vector contains, as far as i can tell, everything you could want
to know.
or you can extract the username from the message itself -
ArrayList actorList = new ArrayList();
actorList.add("actor value for my UsernameToken entry");
Message request = MessageContext.getCurrentContext().getRequestMessage();
SOAPEnvelope envelope = (SOAPEnvelope)request.getSOAPEnvelope();
Vector headers = envelope.getHeadersByActor(actorList);
SOAPHeaderElement header = (SOAPHeaderElement)headers.get(0);

you can then extract the actual username by walking the DOM tree to
the node which contains the username
MessageElement usernameTokenElement =
header.getChildElement(USERNAME_TOKEN_QNAME);
MessageElement usernameElement =
usernameTokenElement.getChildElement(USERNAME_QNAME);
String username = usernameElement.getValue();

(you'll also need these)
static final QName USERNAME_TOKEN_QNAME = new
QName(WSConstants.WSSE_NS, WSConstants.USERNAME_TOKEN_LN);
static final QName USERNAME_QNAME = new QName(WSConstants.WSSE_NS,
WSConstants.USERNAME_LN);

in my app i have a handler which i put in the request chain right
after the WSDoAllReceiver which extracts the username using the above
code, does an LDAP lookup of the user to gather roles, and then
creates an app-specific user object which it stores it as a properly
in the MessageContext where anyone in the handling chain can then
extract it via getProperty().

hth.
..ron.

Michael Rudolf wrote:



>Thanks a lot for the detailed description! I think this will work
>fine for me. One more question about this though: Can i read the
>username inside the web service? Or is there any way of getting
>info

Re: Authenticating users

2005-11-21 Thread Michael Rudolf
Ok...i dont use the client_deploy.wsddis there any way to avoid 
using it? I have the client inside a servlet so i cant specify it with 
the java -D command line.

Thx!
Michael


do you have this in your client-config.wsdd?

 
 
   
 
 
   
   
   
 
?

otherwise there won't be any handler in the request flow that knows what to do
with those properties.

hth.
.ron.
 


Ok, so i got the server working basically (i think) but when calling it
i get the following exception at the client:

AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: WSDoAllReceiver: Request does not contain required
Security header


Thats the client code so far:

try {
 binding = new al.JCT.service.JCTServiceLocator().getJCTSession();
 Stub axisPort = (Stub)binding;
 axisPort._setProperty(UsernameToken.PASSWORD_TYPE,
WSConstants.PASSWORD_DIGEST);
 axisPort._setProperty(WSHandlerConstants.USER, "wss4j");
 axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, new
PWCallback());
 }
 catch (javax.xml.rpc.ServiceException jre) {
 jre.printStackTrace();
 return;
 }

 try {
 al.JCT.service.Job[] value = null;
 String ids[] = {"1218"};
 value = binding.getJobStatus("rudi", "qw", null, ids);
 if (value != null) {
   for (int i=0; i < value.length; i++) {
 System.out.println(value[i].getId() + " - " +
value[i].getName() + " - " + value[i].getPe());
 System.out.println(value[i].getReservations());
 System.out.println(value[i].getOutputPaths()[0].getPath());
   }
 }
 binding.submitJob(null, null, null);
 }
 catch (java.rmi.RemoteException re) {
   re.printStackTrace();
   return;
 }


Any ideas on this one?

Thx!
Michael

   


you can extract all the security info by looking at the Vector stored
as a property in the MessageContext:
Vector resultHandlers =
(Vector)MessageContext.getCurrentContext().getProperty(WSHandlerConstants.RECV_RESULTS);


this vector contains, as far as i can tell, everything you could want
to know.
or you can extract the username from the message itself -
ArrayList actorList = new ArrayList();
actorList.add("actor value for my UsernameToken entry");
Message request = MessageContext.getCurrentContext().getRequestMessage();
SOAPEnvelope envelope = (SOAPEnvelope)request.getSOAPEnvelope();
Vector headers = envelope.getHeadersByActor(actorList);
SOAPHeaderElement header = (SOAPHeaderElement)headers.get(0);

you can then extract the actual username by walking the DOM tree to
the node which contains the username
MessageElement usernameTokenElement =
header.getChildElement(USERNAME_TOKEN_QNAME);
MessageElement usernameElement =
usernameTokenElement.getChildElement(USERNAME_QNAME);
String username = usernameElement.getValue();

(you'll also need these)
static final QName USERNAME_TOKEN_QNAME = new
QName(WSConstants.WSSE_NS, WSConstants.USERNAME_TOKEN_LN);
static final QName USERNAME_QNAME = new QName(WSConstants.WSSE_NS,
WSConstants.USERNAME_LN);

in my app i have a handler which i put in the request chain right
after the WSDoAllReceiver which extracts the username using the above
code, does an LDAP lookup of the user to gather roles, and then
creates an app-specific user object which it stores it as a properly
in the MessageContext where anyone in the handling chain can then
extract it via getProperty().

hth.
..ron.

Michael Rudolf wrote:

 


Thanks a lot for the detailed description! I think this will work
fine for me. One more question about this though: Can i read the
username inside the web service? Or is there any way of getting
information like the group a user belongs to inside the web service
to read it there? It sounds like the Service does get any of this
info since the authentication is completely transparent to the
service itself.
Thanks.
Michael

   


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 ca

Re: Authenticating users

2005-11-21 Thread Ron Reynolds
do you have this in your client-config.wsdd?

  
  

  
  



  
?

otherwise there won't be any handler in the request flow that knows what to do
with those properties.

hth.
.ron.
> Ok, so i got the server working basically (i think) but when calling it
> i get the following exception at the client:
>
> AxisFault
>  faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
>  faultSubcode:
>  faultString: WSDoAllReceiver: Request does not contain required
> Security header
>
>
> Thats the client code so far:
>
> try {
>   binding = new al.JCT.service.JCTServiceLocator().getJCTSession();
>   Stub axisPort = (Stub)binding;
>   axisPort._setProperty(UsernameToken.PASSWORD_TYPE,
> WSConstants.PASSWORD_DIGEST);
>   axisPort._setProperty(WSHandlerConstants.USER, "wss4j");
>   axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, new
> PWCallback());
>   }
>   catch (javax.xml.rpc.ServiceException jre) {
>   jre.printStackTrace();
>   return;
>   }
>
>   try {
>   al.JCT.service.Job[] value = null;
>   String ids[] = {"1218"};
>   value = binding.getJobStatus("rudi", "qw", null, ids);
>   if (value != null) {
> for (int i=0; i < value.length; i++) {
>   System.out.println(value[i].getId() + " - " +
> value[i].getName() + " - " + value[i].getPe());
>   System.out.println(value[i].getReservations());
>   System.out.println(value[i].getOutputPaths()[0].getPath());
> }
>   }
>   binding.submitJob(null, null, null);
>   }
>   catch (java.rmi.RemoteException re) {
> re.printStackTrace();
> return;
>   }
>
>
> Any ideas on this one?
>
> Thx!
> Michael
>
>> you can extract all the security info by looking at the Vector stored
>> as a property in the MessageContext:
>> Vector resultHandlers =
>> (Vector)MessageContext.getCurrentContext().getProperty(WSHandlerConstants.RECV_RESULTS);
>>
>>
>> this vector contains, as far as i can tell, everything you could want
>> to know.
>> or you can extract the username from the message itself -
>> ArrayList actorList = new ArrayList();
>> actorList.add("actor value for my UsernameToken entry");
>> Message request = MessageContext.getCurrentContext().getRequestMessage();
>> SOAPEnvelope envelope = (SOAPEnvelope)request.getSOAPEnvelope();
>> Vector headers = envelope.getHeadersByActor(actorList);
>> SOAPHeaderElement header = (SOAPHeaderElement)headers.get(0);
>>
>> you can then extract the actual username by walking the DOM tree to
>> the node which contains the username
>> MessageElement usernameTokenElement =
>> header.getChildElement(USERNAME_TOKEN_QNAME);
>> MessageElement usernameElement =
>> usernameTokenElement.getChildElement(USERNAME_QNAME);
>> String username = usernameElement.getValue();
>>
>> (you'll also need these)
>> static final QName USERNAME_TOKEN_QNAME = new
>> QName(WSConstants.WSSE_NS, WSConstants.USERNAME_TOKEN_LN);
>> static final QName USERNAME_QNAME = new QName(WSConstants.WSSE_NS,
>> WSConstants.USERNAME_LN);
>>
>> in my app i have a handler which i put in the request chain right
>> after the WSDoAllReceiver which extracts the username using the above
>> code, does an LDAP lookup of the user to gather roles, and then
>> creates an app-specific user object which it stores it as a properly
>> in the MessageContext where anyone in the handling chain can then
>> extract it via getProperty().
>>
>> hth.
>> ..ron.
>>
>> Michael Rudolf wrote:
>>
>>> Thanks a lot for the detailed description! I think this will work
>>> fine for me. One more question about this though: Can i read the
>>> username inside the web service? Or is there any way of getting
>>> information like the group a user belongs to inside the web service
>>> to read it there? It sounds like the Service does get any of this
>>> info since the authentication is completely transparent to the
>>> service itself.
>>> Thanks.
>>> Michael
>>>
 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.  

Re: Calling Axis' getVersion manually

2005-11-21 Thread Davanum Srinivas
try running

"java org.apache.axis.Version
-lhttp://scottmc-laptop:8080/axis/services/Version";

-- dims

On 11/21/05, Scott McCoy <[EMAIL PROTECTED]> wrote:
> Actually I'm not having any luck calling axis services with the SOAP
> client's I typically use, is there anything different about what Axis may be
> anticipating?
>
> On 11/20/05, Scott McCoy <[EMAIL PROTECTED]> wrote:
> > I've been trying to custom-craft a provider for axis, and in testing it I
> determined my test was broken...and in testing my test, I determined there
> is something about calling Axis services I don't understand, so I'm trying
> to figure out what I am missing about the transaction with the HTTP server.
> Below, is my HTTP/SOAP conversation with Axis.  At the very fundemental
> protcol level, what do I have wrong here?  Figuring this out could help me
> figure out whats wrong with my provider :-)
> >
> > POST http://scottmc-laptop:8080/axis/services/Version
> HTTP/1.1
> > Content-Length: 152
> > Content-Type: text/xml; charset=UTF-8
> > SOAPAction: Version#getVersion
> >
> >  xmlns="http://schemas.xmlsoap.org/soap/envelope/";>
> > HTTP/1.0 500 Internal server error
> > Set-Cookie: 7
> > Set-Cookie2: 7
> > Content-Type: text/xml; charset=utf-8
> >
> >  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> >  
> >   
> > xmlns:ns1="http://xml.apache.org/axis/";>ns1:Server.NoService
> >The AXIS engine could not find a target service to invoke!
>  targetService is null
> >
> > http://xml.apache.org/axis/";>The AXIS
> engine could not find a target service to invoke!  targetService is null
> > at
> org.apache.axis.server.AxisServer.invoke(AxisServer.java:270)
> > at
> org.apache.axis.transport.http.SimpleAxisWorker.execute(SimpleAxisWorker.java:428)
> > at
> org.apache.axis.transport.http.SimpleAxisWorker.run(SimpleAxisWorker.java:155)
> > at
> org.apache.axis.transport.http.SimpleAxisServer.run(SimpleAxisServer.java:245)
> > at
> org.apache.axis.transport.http.SimpleAxisServer.start(SimpleAxisServer.java:296)
> > at
> org.apache.axis.transport.http.SimpleAxisServer.start(SimpleAxisServer.java:304)
> > at
> org.apache.axis.transport.http.SimpleAxisServer.main(SimpleAxisServer.java:385)
> > 
> >  xmlns:ns3="http://xml.apache.org/axis/";>scottmc-laptop
> >
> >   
> >  
> > 
> >
>
>


--
Davanum Srinivas : http://wso2.com/blogs/


Re: Authenticating users

2005-11-21 Thread Michael Rudolf
Ok, so i got the server working basically (i think) but when calling it 
i get the following exception at the client:


AxisFault
faultCode: 
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException

faultSubcode:
faultString: WSDoAllReceiver: Request does not contain required 
Security header



Thats the client code so far:

try {
 binding = new al.JCT.service.JCTServiceLocator().getJCTSession();
 Stub axisPort = (Stub)binding;
 axisPort._setProperty(UsernameToken.PASSWORD_TYPE, 
WSConstants.PASSWORD_DIGEST);

 axisPort._setProperty(WSHandlerConstants.USER, "wss4j");
 axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, new 
PWCallback());

 }
 catch (javax.xml.rpc.ServiceException jre) {
 jre.printStackTrace();
 return;
 }

 try {
 al.JCT.service.Job[] value = null;
 String ids[] = {"1218"};
 value = binding.getJobStatus("rudi", "qw", null, ids);
 if (value != null) {
   for (int i=0; i < value.length; i++) {
 System.out.println(value[i].getId() + " - " + 
value[i].getName() + " - " + value[i].getPe());

 System.out.println(value[i].getReservations());
 System.out.println(value[i].getOutputPaths()[0].getPath());
   }
 }
 binding.submitJob(null, null, null);
 }
 catch (java.rmi.RemoteException re) {
   re.printStackTrace();
   return;
 }


Any ideas on this one?

Thx!
Michael

you can extract all the security info by looking at the Vector stored 
as a property in the MessageContext:
Vector resultHandlers = 
(Vector)MessageContext.getCurrentContext().getProperty(WSHandlerConstants.RECV_RESULTS); 



this vector contains, as far as i can tell, everything you could want 
to know.

or you can extract the username from the message itself -
ArrayList actorList = new ArrayList();
actorList.add("actor value for my UsernameToken entry");
Message request = MessageContext.getCurrentContext().getRequestMessage();
SOAPEnvelope envelope = (SOAPEnvelope)request.getSOAPEnvelope();
Vector headers = envelope.getHeadersByActor(actorList);
SOAPHeaderElement header = (SOAPHeaderElement)headers.get(0);

you can then extract the actual username by walking the DOM tree to 
the node which contains the username
MessageElement usernameTokenElement = 
header.getChildElement(USERNAME_TOKEN_QNAME);
MessageElement usernameElement = 
usernameTokenElement.getChildElement(USERNAME_QNAME);

String username = usernameElement.getValue();

(you'll also need these)
static final QName USERNAME_TOKEN_QNAME = new 
QName(WSConstants.WSSE_NS, WSConstants.USERNAME_TOKEN_LN);
static final QName USERNAME_QNAME = new QName(WSConstants.WSSE_NS, 
WSConstants.USERNAME_LN);


in my app i have a handler which i put in the request chain right 
after the WSDoAllReceiver which extracts the username using the above 
code, does an LDAP lookup of the user to gather roles, and then 
creates an app-specific user object which it stores it as a properly 
in the MessageContext where anyone in the handling chain can then 
extract it via getProperty().


hth.
..ron.

Michael Rudolf wrote:

Thanks a lot for the detailed description! I think this will work 
fine for me. One more question about this though: Can i read the 
username inside the web service? Or is there any way of getting 
information like the group a user belongs to inside the web service 
to read it there? It sounds like the Service does get any of this 
info since the authentication is completely transparent to the 
service itself.

Thanks.
Michael

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.

Re: Problem with WSDL2Java?

2005-11-21 Thread Tim R J Langford

Hello Christian!

Thankyou very much for your swift response, and you are indeed correct! 
I added the 'wrapArrays="true"' to the ant task and everything generated 
as expected and now my messages are full of extra nilable elements and 
work just fine with no changes to my processing code at all! A direct 
upgrade - great!


Thankyou Sir, and much respect to you.

Regards,

Tim


PS: Maybe it would be worth setting 'wrapArrays="true"' by default, 
because in my case when set to false WSDL2Java actually created 
non-compilable code in one case, and in the others forced me to change 
alot of the message processing code? Or is my usage an exception to 
normal usage?







Christian Schmitz wrote:


Hi Tim,

I think my problem discussed on the title "wsdl2java does not generate 
class-files for complexTypes" seems to be the same as yours. Try the 
--wrapArrays (-w) option when generating the sources.


Regards,
Christian

Tim R J Langford schrieb:


Hello All,

I am upgrading some SOAP clients from Axis 1.2 to Axis 1.3 Final. One 
of them upgraded with little effort,  just some changes to the code 
that processed the new bean convention style generate by WSDL2Java. 
The other project  is proving very troublesome however.


#1 : Firstly the schema beans appear NOT to generate properly. For 
example the following Schema section :



 
   
 type="s1:GuestCountType" />
 name="RoomAmenity" type="s1:RoomAmenityPrefType" />

   
   
   
   
   
 
 
   
 name="GuestCount" type="s1:GuestCountTypeGuestCount" />

   
   
 
 
   
   
   
 


But here WSDL2Java enerates a "RoomStayCandidateType" object that 
contains an array of "GuestCountTypeGuestCount" objects as a member. 
It does not generate a GuestCountType at all. This of course breaks 
the service. The old version of WSDL2Java generated all these classes 
as was to be expected, and only messed up setting the action type on 
one of the services (whihc was easilly fixed with a code post 
processor). I assume this is a bug. The schema seems valid to me.



#2 : Another problem occured in the generated source where a 
constructor was created thats calls Object.super() as follows...


public class VendorMessageType  implements java.io.Serializable {
   private java.lang.String infoType;  // attribute

   private 
org.opentravel.www.OTA._2003._05.FormattedTextSubSectionTypeParagraph[][] 
formattedTextType;  // attribute


   public VendorMessageType() {
   }

   public VendorMessageType(
  
org.opentravel.www.OTA._2003._05.FormattedTextSubSectionTypeParagraph[][] 
param1,

  java.lang.String Title,
  org.apache.axis.types.Language Language,
  java.lang.String infoType) {
   super(
   param1,
   Title);
   this.Language = Language;
   this.infoType = infoType;
   }

...
etc
...

}

???


When I searched the mailing list I noticed a few possibly similar 
questions to this, but no reponse I could act on. Is there any 
possibility of fixing these problems? If not is there any method of 
fixing/altering the generated source form the old version of Axis 
WSDL2Java to work with new 1.3 library? For example could I code to 
the correctly generated old 1.1 SOAP beans to get them to work with 1.3?


Thanks very much for your help and time! This has become a real show 
stopper, and I got deadlines and a crazy boss!


Tim









Re: Axis 1.3 on Sun One App Server 8.1

2005-11-21 Thread Rakesh Patel

Hi Vivek,

disabling the security manager isn't a long term solution for me. The 
best i could do was to a simple grant (without the codebase option). 
This gives all apps in the domain the priveliges but since their will be 
only one app i didn't think it was too bad.


Cheers

Rakesh

Vivek Kumar Pandey wrote:


Hi Rakesh,

Thanks for all the help 

With your help , I was able to install Axis on Sun One, though I had 
to disable the security manager


Vivek

Rakesh Patel wrote:


Hi Vivek,

well i got the sample HelloService working.

I had to add use the grant without the codebase parameter. This 
compromises security but it depends on your set up.


Hope that helps

Rakesh

Vivek Kumar Pandey wrote:


Hi everybody,

I am trying to install axis 1.3 on SUN One Application Server 8.1 . 
However I am not able to deploy the war file


Find attached the result of running verifier on the axis.war

with regards
Vivek



 ---
 STATIC VERIFICATION RESULTS
 ---

 --
 NUMBER OF FAILURES/WARNINGS/ERRORS
 --
 # of Failures : 3
# of Warnings : 0
 # of Errors : 0

 -
 RESULTS FOR WEB-RELATED TESTS
 -
 --
 FAILED TESTS :  --
 Test Name : tests.web.WebPublicID
 Test Assertion : The Web deployment descriptor has an expected 
PubidLiteral. Please refer to Java Servlet 2.3 Specification Section 
#SRV.13.2.1 for further information.

 Test Description : For [ axis.war ]
Error: The deployment descriptor for axis does not have an expected 
PubidLiteral.


 Test Name : tests.web.WelcomeFile
 Test Assertion : welcome-file element contains the file name to 
use as a default welcome file.  Test Description : For [ axis.war ]
Error: Welcome file [ index.jws ] is not found within [ axis ] or 
does not contain the file name to use as a default welcome file 
within Web application [ axis ].


 Test Name : tests.web.WebArchiveClassesLoadable
 Test Assertion : All classes in this Web Archive are loadable. 
Please refer to J2EE 1.4 Specification Section #8.1.2 for further 
information.

 Test Description : For [ axis.war ]


classes [ org.apache.xmlbeans.SimpleValue 
org.apache.xmlbeans.SchemaType org.apache.xmlbeans.XmlQName 
org.apache.xmlbeans.impl.values.TypeStore 
org.apache.xmlbeans.XmlNCName ] referenced by [ 
org.xmlsoap.schemas.wsdl.impl.TPartImpl] are not found


classes [ org.apache.xmlbeans.SchemaType 
org.apache.xmlbeans.XmlAnyURI org.apache.xmlbeans.SchemaTypeSystem ] 
referenced by [ org.xmlsoap.schemas.wsdl.soap.TBinding] are not found


classes [ org.apache.xmlbeans.SimpleValue 
org.apache.xmlbeans.SchemaType 
org.apache.xmlbeans.impl.values.TypeStore 
org.apache.xmlbeans.XmlNCName ] referenced by [ 
org.xmlsoap.schemas.wsdl.soap.impl.TFaultImpl] are not found


classes [ org.apache.xmlbeans.SimpleValue 
org.apache.xmlbeans.SchemaType org.apache.xmlbeans.XmlAnyURI 
org.apache.xmlbeans.impl.values.TypeStore ] referenced by [ 
org.xmlsoap.schemas.wsdl.soap.impl.TBindingImpl] are not found


classes [ org.apache.xmlbeans.xml.stream.XMLStreamException 
org.apache.xmlbeans.XmlException org.apache.xmlbeans.XmlBeans 
javax.xml.stream.XMLStreamReader 
org.apache.xmlbeans.xml.stream.XMLInputStream 
org.apache.xmlbeans.SchemaTypeLoader org.apache.xmlbeans.XmlOptions 
] referenced by [ 
org.xmlsoap.schemas.wsdl.soap.BodyDocument$Factory] are not found


classes [ org.apache.xmlbeans.SchemaTypeSystem 
org.apache.xmlbeans.XmlNCName org.apache.xmlbeans.SchemaType 
org.apache.xmlbeans.XmlAnyURI ] referenced by [ 
org.xmlsoap.schemas.wsdl.TDefinitions] are not found


classes [ org.apache.xmlbeans.xml.stream.XMLStreamException 
org.apache.xmlbeans.XmlException org.apache.xmlbeans.XmlBeans 
javax.xml.stream.XMLStreamReader 
org.apache.xmlbeans.xml.stream.XMLInputStream 
org.apache.xmlbeans.SchemaTypeLoader org.apache.xmlbeans.XmlOptions 
] referenced by [ 
org.xmlsoap.schemas.wsdl.TExtensibilityElement$Factory] are not found


classes [ org.apache.xmlbeans.SchemaType 
org.apache.xmlbeans.XmlQName org.apache.xmlbeans.SchemaTypeSystem 
org.apache.xmlbeans.XmlNCName ] referenced by [ 
org.xmlsoap.schemas.wsdl.TFault] are not found


classes [ org.apache.xmlbeans.QNameSet 
org.apache.xmlbeans.XmlObject$Factory org.apache.xmlbeans.SchemaType 
org.apache.xmlbeans.XmlObject org.apache.xmlbeans.XmlOptions ] 
referenced by [ 
org.apache.axis.encoding.ser.xbeans.XmlBeanDeserializer] are not found


classes [ org.apache.xmlbeans.SimpleValue 
org.apache.xmlbeans.SchemaType 
org.apache.xmlbeans.impl.values.TypeStore 
org.apache.xmlbeans.XmlNCName ] referenced by [ 
org.xmlsoap.schemas.wsdl.impl.TBindingOperationMessageImpl] are not 
found


classes [ org.apache.xmlbeans.SchemaType 
org.apache.xmlbeans.XmlBoolean org.apache

WSDL2Java and client SSL

2005-11-21 Thread Markus Reil

Hi,

I am currently trying to connect to a SOAP Web Service with Axis. I need 
to use a client certificate to authenticate myself.
I do not want to set the keystore/truststore files globally via system 
properties because I have other http traffic in the same virtual machine 
that uses different or no keys.


I know there are a lot threads out about Axis/SSL out there. But I 
already spent a couple of hours looking for a solution and did not find 
anything of great use. Can anyone help me with this?


E.g. is it possible to create a SocketFactory and pass it to the Axis 
Service or Remote instance?


Thanks.

Regards,
Markus

--
Markus Reil
Applikationsentwickler

MindMatics AG
Marcel-Breuer-Str. 18
D-80807 München

E-Mail: [EMAIL PROTECTED]
Tel.:   +49 89 322986-0
Fax:+49 89 322986-570
Web:www.mindmatics.de



Axis Handler help !!

2005-11-21 Thread Nguyen Tuan Anh
Hi,
I'm developping a webservice who receives a doc file (attachement), convert it
to PDF then return the PDF file to the client. The service is simple : 

public DataHandler convert(DataHandler docFile) {
File docFile = new File(docFile);
PDFConverter converter = new PDFConverter();
File pdfFile = converter.convertPDF(docFile);
return new DataHandler(new FileDataSource(pdfFile));
}
 
The convertPDF creates physically on the server a PDF file. I want to delete
the
local PDF file AFTER it is sent to the client. The problem is that I can't
delete the PDF before the convert method of the service returns (as there is a
DataHandler pointing to that file), but when the method's returned, I can no
longer control the server. I'm thinking of using an Axis Handler, but I don't
know exactly what to do. Is there a method to know when the response is
successfully sent to the client and trigger another method on the server??
Thanks a lot.

Kind regards,

Tuan Anh NGUYEN




Re: [Axis2] Project based on Web Services Benchmark Tool

2005-11-21 Thread Srinath Perera
Follwoing might help you .  thete are test suites in each cases
--Srinath

1) Aleksander Slominski, Madhusudhan Govindaraju, Michael R. Head,
Kenneth Chiu, Michael J. Lewis, Robert van Engelen, Pu Liu, and Nayef
Abu-Ghazaleh. A Benchmark Suite for SOAP-based Communication in Grid
Web Services. In Proceedings of SC|05 (Supercomputing): International
Conference for High Performance Computing, Networking, and Storage,
Seattle WA, November, 2005. To Appear.
[http://www.extreme.indiana.edu/xgws/papers/soapBench2.pdf]

2) http://www.sosnoski.com/


On 11/20/05, Eran Chinthaka <[EMAIL PROTECTED]> wrote:
> Hi Wasana and Madushan,
>
> We also love to have a benchmark testing as part of our project. Feel
> free to ask any question from this list.
>
> BTW, I think all the axis2 devs would love to have this under Axis2
> scratch, IF this project goes well.
>
> Chinthaka
>
> Wasana Delpage wrote:
>
> >Dear All,
> >
> >We are following an Engineering undergraduate course in Ruhuna University
> >Sri Lanka. This is based on
> >Finding the performance of web service using memory consumption,response
> >time,concurrent access,etc.
> >We use Axis2.0.92 as our process engine.
> >Basically we do inteoperability testing via
> >java client & server.
> >dotnet client & server
> >dotnet server-java client & vice-versa
> >
> >the project proposal is attached with this.
> >
> >we need your contribution in our progress.
> >
> >
> >Regards
> >
> >Wasana [EMAIL PROTECTED]
> >
> >Madushan [EMAIL PROTECTED]
> >
> >
> >
>


Re: Problem with WSDL2Java?

2005-11-21 Thread Christian Schmitz

Hi Tim,

I think my problem discussed on the title "wsdl2java does not generate 
class-files for complexTypes" seems to be the same as yours. Try the 
--wrapArrays (-w) option when generating the sources.


Regards,
Christian

Tim R J Langford schrieb:


Hello All,

I am upgrading some SOAP clients from Axis 1.2 to Axis 1.3 Final. One 
of them upgraded with little effort,  just some changes to the code 
that processed the new bean convention style generate by WSDL2Java. 
The other project  is proving very troublesome however.


#1 : Firstly the schema beans appear NOT to generate properly. For 
example the following Schema section :



 
   
 type="s1:GuestCountType" />
 name="RoomAmenity" type="s1:RoomAmenityPrefType" />

   
   
   
   
   
 
 
   
 name="GuestCount" type="s1:GuestCountTypeGuestCount" />

   
   
 
 
   
   
   
 


But here WSDL2Java enerates a "RoomStayCandidateType" object that 
contains an array of "GuestCountTypeGuestCount" objects as a member. 
It does not generate a GuestCountType at all. This of course breaks 
the service. The old version of WSDL2Java generated all these classes 
as was to be expected, and only messed up setting the action type on 
one of the services (whihc was easilly fixed with a code post 
processor). I assume this is a bug. The schema seems valid to me.



#2 : Another problem occured in the generated source where a 
constructor was created thats calls Object.super() as follows...


public class VendorMessageType  implements java.io.Serializable {
   private java.lang.String infoType;  // attribute

   private 
org.opentravel.www.OTA._2003._05.FormattedTextSubSectionTypeParagraph[][] 
formattedTextType;  // attribute


   public VendorMessageType() {
   }

   public VendorMessageType(
  
org.opentravel.www.OTA._2003._05.FormattedTextSubSectionTypeParagraph[][] 
param1,

  java.lang.String Title,
  org.apache.axis.types.Language Language,
  java.lang.String infoType) {
   super(
   param1,
   Title);
   this.Language = Language;
   this.infoType = infoType;
   }

...
etc
...

}

???


When I searched the mailing list I noticed a few possibly similar 
questions to this, but no reponse I could act on. Is there any 
possibility of fixing these problems? If not is there any method of 
fixing/altering the generated source form the old version of Axis 
WSDL2Java to work with new 1.3 library? For example could I code to 
the correctly generated old 1.1 SOAP beans to get them to work with 1.3?


Thanks very much for your help and time! This has become a real show 
stopper, and I got deadlines and a crazy boss!


Tim





--


Besuchen Sie unsere kostenlose Veranstaltung
"Effizientes Prozess- und IT-Management -
Die Verbindung von ARIS mit IT-Infrastrukturen"
am 24.11.2005 in Köln. Anmeldungen unter
http://www.opitz-consulting.de

OPITZ CONSULTING Gummersbach GmbH
Christian Schmitz -  Dipl.-Wirtschaftsinformatiker (FH)
Kirchstr. 6 - D-51647 Gummersbach
Telefon (Fax): +49 2261 6001-0 (-1139) - Mobil: +49 170 5545138
http://www.opitz-consulting.de





RE: Confused by wsdl2java behavior

2005-11-21 Thread McMullin, Gregg E.
Can anyone shed some light on this for me?  Why does the 
exclusion of a type attribute for a given Element cause
a different set of classes to be produced by wsdl2java?

thanks

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 18, 2005 11:31 AM
To: axis-user@ws.apache.org
Subject: RE: Confused by wsdl2java behavoir

 Thanks, but I see that I may have confused the issue with the placement
of my comment. 

This:

> 
> 
>
>   
>   
> 
>   
>   
>

Should be this:
> 
> 
   
>
>   
>   
> 
>   
>   
>

So the question still remains... why would changing the order elements
cause SubmitOrderRespone class to be created or not?

   thanks again

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Jerry DuVal
Sent: Friday, November 18, 2005 11:23 AM
To: axis-user@ws.apache.org
Subject: RE: Confused by wsdl2java behavoir

> 
>   
> 
>   
> 
>   
> 

Axis can't create the class because the corresponding ref="tns:orderId"/>
does not exist if you remove it.  It needs th  .

Jerry DuVal
Pace Systems Group, Inc.
800.624.5999
www.Pace2020.com 

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 18, 2005 11:04 AM
> To: axis-user@ws.apache.org
> Subject: Confused by wsdl2java behavoir
> 
> Hi,
> 
>  I using axis 1.3.1 and the wsdl2java tool to produce both client
> and server side code.  I'm running the wsdl2java tool under
> windowsXP using the following options.
> 
> java -cp %AXISCLASSPATH% org.apache.axis.wsdl.WSDL2Java -d Application -w
> -t
> -S true --verbose -f %WSDL_HOME%\NStoPkg.properties -o %OUTPUT_DIR%
> %WSDL_HOME%\test.wsdl
> 
>  When I remove the type attribute from the "order" -> "id" element
> I get a class for the SubmitOrderResponse element.  When I add the
> type attribute  to the "order" -> "id" element a class is not produced.
> 
>  I've noticed the same is I use an anyType for a type attribute.  The
> wsdl I've included is a simplified case.  In actuality, I'm importing
> predefined schema into my wsdl that has this type of situation.
> 
>  I do not have the ability to changed the imported schema.  Any
explanation
> and suggestions will be most welcome.
> 
>thanks,
> 
>  Gregg
> 
> 
> 
> 
>targetNamespace="urn:testservice"
> xmlns:tns="urn:testservice"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:apachesoap="http://xml.apache.org/xml-soap";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";>
> 
> 
> 
>targetNamespace="urn:testservice"
> elementFormDefault="qualified"
> attributeFormDefault="unqualified"
> version="Test_1.X">
> 
> 
> 
> 
>  
>
>   
>   
> 
>   
>   
>
> 
>
> 
> 
>   
> 
>   
> 
>   
> 
> 
> 
> 
>   
> 
>   
> 
> 
> 
>   
> 
> 
> 
> 
>   
> 
> 
> 
>   
> 
> 
> 
> 
>   
>   name="submitOrderRequest"/>
>   name="submitOrderResponse"/>
>   
> 
> 
> 
> 
> 
> 
>transport="http://schemas.xmlsoap.org/soap/http";
/>
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
> 
> 
> 
> name="TestService">
>location="http://localhost/axis/services/TestService"; />
>   
> 
> 
> 
>   


Re: wsdl2java does not generate class-files for complexTypes

2005-11-21 Thread Christian Schmitz
Anne, thank you for this information. I read a lot about message styles 
and the reasons which one to use. But I didn't have any information 
about the support of other SOAP stacks yet.


Anne Thomas Manes schrieb:

Christian, I recommend that you switch to doc/literal rather than 
rpc/literal. Doc/literal certainly supports multiple methods. Then use 
the noWrapped option. Either that, or define an extra layer of 
wrapping for your response element, e.g.,:



  

  
 
   
 
   
 
   
 
   


...

In general, it's a bad idea to use rpc/literal because a lot of SOAP 
stacks don't support that option (e.g., .NET, SAP, BEA,...).


Anne

On 11/21/05, *Christian Schmitz* 
<[EMAIL PROTECTED] 
> wrote:


Hi Mark,

i generate the sources using the ant-tasks and I set the parameter
"noWrapped=true" when I read about your problem. No result.
I am using rpc/literal because my Service has more than one method. Is
it possible that the message style causes the problem?

Regards,
Christian

Griffin, Mark schrieb:

>Christian,
>Don't know if this will work for you, but I had a similar
problem. Using
>the -W option which turned off wrapped support worked for me. I
was able
>to then generate the classes.  Not completely sure why other than
>something to do with the way axis is interpreting the wsdl.  I
thought
>my wsdl was docliteral wrapped but apparently axis thought otherwise.
>At any rate it worked after the -W option.
>
>markg
>
>-Original Message-
>From: Christian Schmitz [mailto:
[EMAIL PROTECTED]
]
>Sent: Monday, November 21, 2005 4:13 AM
>To: axis-user@ws.apache.org 
>Subject: wsdl2java does not generate class-files for complexTypes
>
>
>My WSDL defines the following complexTypes in the types-defintion:
>
>  
>
>  maxOccurs="unbounded" type="transporttypes:ResultLine"/>
>
>  
>  
>
>  maxOccurs="unbounded" type="xsd:decimal" />
>
>  
>
>The complexType SearchResult should be returned by my service
method.
>
>  
>
>  
>...
>transport="http://schemas.xmlsoap.org/soap/http"/
>
>
>  
>
>  
>  
>
>  
>
>
>wsdl2java does not generate the classes SearchResults an
ResultLine. I
>expect that the tool should generate them. Instead of the
expected, it
>generates a 2-dimensional Array as return type of my service method.
>
>public java.math.BigDecimal[][] search(...) throws
>java.rmi.RemoteException;
>
>Is this the correct? Is it possible to configure wsdl2java to
generate
>the classes?
>
>regars,
>Christian
>
>
>





--


Besuchen Sie unsere kostenlose Veranstaltung
"Effizientes Prozess- und IT-Management -
Die Verbindung von ARIS mit IT-Infrastrukturen"
am 24.11.2005 in Köln. Anmeldungen unter
http://www.opitz-consulting.de

OPITZ CONSULTING Gummersbach GmbH
Christian Schmitz -  Dipl.-Wirtschaftsinformatiker (FH)
Kirchstr. 6 - D-51647 Gummersbach
Telefon (Fax): +49 2261 6001-0 (-1139) - Mobil: +49 170 5545138
http://www.opitz-consulting.de





Re: wsdl2java does not generate class-files for complexTypes

2005-11-21 Thread Anne Thomas Manes
Christian, I recommend that you switch to doc/literal rather than
rpc/literal. Doc/literal certainly supports multiple methods. Then use
the noWrapped option. Either that, or define an extra layer of wrapping
for your response element, e.g.,:


  
    
  
 
           
      
   
maxOccurs="unbounded" type="transporttypes:ResultLine"/>
    
 
   
     



    ...

In general, it's a bad idea to use rpc/literal because a lot of SOAP
stacks don't support that option (e.g., .NET, SAP, BEA,...).

AnneOn 11/21/05, Christian Schmitz <[EMAIL PROTECTED]> wrote:
Hi Mark,i generate the sources using the ant-tasks and I set the parameter"noWrapped=true" when I read about your problem. No result.
I am using rpc/literal because my Service has more than one method. Isit possible that the message style causes the problem?Regards,ChristianGriffin, Mark schrieb:>Christian,>Don't know if this will work for you, but I had a similar problem. Using
>the -W option which turned off wrapped support worked for me. I was able>to then generate the classes.  Not completely sure why other than>something to do with the way axis is interpreting the wsdl.  I thought
>my wsdl was docliteral wrapped but apparently axis thought otherwise.>At any rate it worked after the -W option.>>markg>>-Original Message->From: Christian Schmitz [mailto:
[EMAIL PROTECTED]]>Sent: Monday, November 21, 2005 4:13 AM>To: axis-user@ws.apache.org
>Subject: wsdl2java does not generate class-files for complexTypes>>>My WSDL defines the following complexTypes in the types-defintion:>>  
>>  >maxOccurs="unbounded" type="transporttypes:ResultLine"/>
>>  >  >>  >maxOccurs="unbounded" type="xsd:decimal" />>>  >>The complexType SearchResult should be returned by my service method.
>>  >>  >...>>transport="http://schemas.xmlsoap.org/soap/http"/>>>  
>>  >  >>  >
>>wsdl2java does not generate the classes SearchResults an ResultLine. I>expect that the tool should generate them. Instead of the expected, it>generates a 2-dimensional Array as return type of my service method.
>>public java.math.BigDecimal[][] search(...) throws>java.rmi.RemoteException;>>Is this the correct? Is it possible to configure wsdl2java to generate>the classes?>>regars,
>Christian>>>


Re: wsdl2java does not generate class-files for complexTypes

2005-11-21 Thread Dies Koper

Hi Christian,

try the --wrapArrays (-w) option. It works for both doc/literal and 
rpc/literal bindings. Setting it causes Axis to generate wrapper classes 
for arrays, as required by the JAX-RPC1.1 spec.


Regards,
Dies


Christian Schmitz wrote:

Hi Mark,

i generate the sources using the ant-tasks and I set the parameter 
"noWrapped=true" when I read about your problem. No result.
I am using rpc/literal because my Service has more than one method. Is 
it possible that the message style causes the problem?


Regards,
Christian

Griffin, Mark schrieb:


Christian,
Don't know if this will work for you, but I had a similar problem. Using
the -W option which turned off wrapped support worked for me. I was able
to then generate the classes.  Not completely sure why other than
something to do with the way axis is interpreting the wsdl.  I thought
my wsdl was docliteral wrapped but apparently axis thought otherwise.
At any rate it worked after the -W option.

markg

-Original Message-
From: Christian Schmitz [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 21, 2005 4:13 AM

To: axis-user@ws.apache.org
Subject: wsdl2java does not generate class-files for complexTypes


My WSDL defines the following complexTypes in the types-defintion:

 
   
 maxOccurs="unbounded" type="transporttypes:ResultLine"/>
   name="ResultLine">

   
 maxOccurs="unbounded" type="xsd:decimal" />

The complexType SearchResult should be returned by my service method.


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

   
 
   
 
 
   
 
   

wsdl2java does not generate the classes SearchResults an ResultLine. I 
expect that the tool should generate them. Instead of the expected, it 
generates a 2-dimensional Array as return type of my service method.


public java.math.BigDecimal[][] search(...) throws
java.rmi.RemoteException;

Is this the correct? Is it possible to configure wsdl2java to generate 
the classes?


regars,
Christian

 








Re: wsdl2java does not generate class-files for complexTypes

2005-11-21 Thread Christian Schmitz

Hi Mark,

i generate the sources using the ant-tasks and I set the parameter 
"noWrapped=true" when I read about your problem. No result.
I am using rpc/literal because my Service has more than one method. Is 
it possible that the message style causes the problem?


Regards,
Christian

Griffin, Mark schrieb:


Christian,
Don't know if this will work for you, but I had a similar problem. Using
the -W option which turned off wrapped support worked for me. I was able
to then generate the classes.  Not completely sure why other than
something to do with the way axis is interpreting the wsdl.  I thought
my wsdl was docliteral wrapped but apparently axis thought otherwise.
At any rate it worked after the -W option.

markg

-Original Message-
From: Christian Schmitz [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 21, 2005 4:13 AM

To: axis-user@ws.apache.org
Subject: wsdl2java does not generate class-files for complexTypes


My WSDL defines the following complexTypes in the types-defintion:

 
   
 maxOccurs="unbounded" type="transporttypes:ResultLine"/>

  
 

   
 maxOccurs="unbounded" type="xsd:decimal" />

 


The complexType SearchResult should be returned by my service method.

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

   
 
   
 
 
   
 
   

wsdl2java does not generate the classes SearchResults an ResultLine. I 
expect that the tool should generate them. Instead of the expected, it 
generates a 2-dimensional Array as return type of my service method.


public java.math.BigDecimal[][] search(...) throws
java.rmi.RemoteException;

Is this the correct? Is it possible to configure wsdl2java to generate 
the classes?


regars,
Christian

 





Re: Axis 1.3 on Sun One App Server 8.1

2005-11-21 Thread Vivek Kumar Pandey

Hi Rakesh,

Thanks for all the help 

With your help , I was able to install Axis on Sun One, though I had to 
disable the security manager


Vivek

Rakesh Patel wrote:


Hi Vivek,

well i got the sample HelloService working.

I had to add use the grant without the codebase parameter. This 
compromises security but it depends on your set up.


Hope that helps

Rakesh

Vivek Kumar Pandey wrote:


Hi everybody,

I am trying to install axis 1.3 on SUN One Application Server 8.1 . 
However I am not able to deploy the war file


Find attached the result of running verifier on the axis.war

with regards
Vivek



 ---
 STATIC VERIFICATION RESULTS
 ---

 --
 NUMBER OF FAILURES/WARNINGS/ERRORS
 --
 # of Failures : 3
# of Warnings : 0
 # of Errors : 0

 -
 RESULTS FOR WEB-RELATED TESTS
 -
 --
 FAILED TESTS :  --
 Test Name : tests.web.WebPublicID
 Test Assertion : The Web deployment descriptor has an expected 
PubidLiteral. Please refer to Java Servlet 2.3 Specification Section 
#SRV.13.2.1 for further information.

 Test Description : For [ axis.war ]
Error: The deployment descriptor for axis does not have an expected 
PubidLiteral.


 Test Name : tests.web.WelcomeFile
 Test Assertion : welcome-file element contains the file name to 
use as a default welcome file.  Test Description : For [ axis.war ]
Error: Welcome file [ index.jws ] is not found within [ axis ] or 
does not contain the file name to use as a default welcome file 
within Web application [ axis ].


 Test Name : tests.web.WebArchiveClassesLoadable
 Test Assertion : All classes in this Web Archive are loadable. 
Please refer to J2EE 1.4 Specification Section #8.1.2 for further 
information.

 Test Description : For [ axis.war ]


classes [ org.apache.xmlbeans.SimpleValue 
org.apache.xmlbeans.SchemaType org.apache.xmlbeans.XmlQName 
org.apache.xmlbeans.impl.values.TypeStore 
org.apache.xmlbeans.XmlNCName ] referenced by [ 
org.xmlsoap.schemas.wsdl.impl.TPartImpl] are not found


classes [ org.apache.xmlbeans.SchemaType 
org.apache.xmlbeans.XmlAnyURI org.apache.xmlbeans.SchemaTypeSystem ] 
referenced by [ org.xmlsoap.schemas.wsdl.soap.TBinding] are not found


classes [ org.apache.xmlbeans.SimpleValue 
org.apache.xmlbeans.SchemaType 
org.apache.xmlbeans.impl.values.TypeStore 
org.apache.xmlbeans.XmlNCName ] referenced by [ 
org.xmlsoap.schemas.wsdl.soap.impl.TFaultImpl] are not found


classes [ org.apache.xmlbeans.SimpleValue 
org.apache.xmlbeans.SchemaType org.apache.xmlbeans.XmlAnyURI 
org.apache.xmlbeans.impl.values.TypeStore ] referenced by [ 
org.xmlsoap.schemas.wsdl.soap.impl.TBindingImpl] are not found


classes [ org.apache.xmlbeans.xml.stream.XMLStreamException 
org.apache.xmlbeans.XmlException org.apache.xmlbeans.XmlBeans 
javax.xml.stream.XMLStreamReader 
org.apache.xmlbeans.xml.stream.XMLInputStream 
org.apache.xmlbeans.SchemaTypeLoader org.apache.xmlbeans.XmlOptions ] 
referenced by [ org.xmlsoap.schemas.wsdl.soap.BodyDocument$Factory] 
are not found


classes [ org.apache.xmlbeans.SchemaTypeSystem 
org.apache.xmlbeans.XmlNCName org.apache.xmlbeans.SchemaType 
org.apache.xmlbeans.XmlAnyURI ] referenced by [ 
org.xmlsoap.schemas.wsdl.TDefinitions] are not found


classes [ org.apache.xmlbeans.xml.stream.XMLStreamException 
org.apache.xmlbeans.XmlException org.apache.xmlbeans.XmlBeans 
javax.xml.stream.XMLStreamReader 
org.apache.xmlbeans.xml.stream.XMLInputStream 
org.apache.xmlbeans.SchemaTypeLoader org.apache.xmlbeans.XmlOptions ] 
referenced by [ 
org.xmlsoap.schemas.wsdl.TExtensibilityElement$Factory] are not found


classes [ org.apache.xmlbeans.SchemaType org.apache.xmlbeans.XmlQName 
org.apache.xmlbeans.SchemaTypeSystem org.apache.xmlbeans.XmlNCName ] 
referenced by [ org.xmlsoap.schemas.wsdl.TFault] are not found


classes [ org.apache.xmlbeans.QNameSet 
org.apache.xmlbeans.XmlObject$Factory org.apache.xmlbeans.SchemaType 
org.apache.xmlbeans.XmlObject org.apache.xmlbeans.XmlOptions ] 
referenced by [ 
org.apache.axis.encoding.ser.xbeans.XmlBeanDeserializer] are not found


classes [ org.apache.xmlbeans.SimpleValue 
org.apache.xmlbeans.SchemaType 
org.apache.xmlbeans.impl.values.TypeStore 
org.apache.xmlbeans.XmlNCName ] referenced by [ 
org.xmlsoap.schemas.wsdl.impl.TBindingOperationMessageImpl] are not 
found


classes [ org.apache.xmlbeans.SchemaType 
org.apache.xmlbeans.XmlBoolean org.apache.xmlbeans.SchemaTypeSystem 
org.apache.xmlbeans.XmlObject ] referenced by [ 
org.xmlsoap.schemas.wsdl.TExtensibilityElement] are not found


classes [ org.apache.commons.httpclient.HttpMethodBase ] referenced 
by [ 
org.apache.axis.transport.http.CommonsHTTPSender$GzipMessageRequestEntity] 
are not found


classes [

client throws SAXExeption while deserializing

2005-11-21 Thread Christian Schmitz

Hi,

I am using axis 1.3 and this simple test-service crashes at the client side:


http://test.de";
 xmlns:test="http://test.de";
 xmlns:testdaten="http://transport.test.de";
 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
 xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
 xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
 
   http://transport.test.de";>
 
   
 minOccurs="0" maxOccurs="unbounded" type="testdaten:ResultLine" />

  
 

   
 maxOccurs="unbounded" type="testdaten:Hit" />

 
 

   
 
 type="xsd:boolean" />

 

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

   
 
   
 
 
   
 
   
 
 
   
 location="http://localhost:8889/ws/services/Testservice"/>

   
 


At the client side I get a SAXException:

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: Found character data inside an 
array element while deserializing

faultActor:
faultNode:
faultDetail:
   {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: 
Found character data inside an array element while deserializing
   at 
org.apache.axis.encoding.ser.ArrayDeserializer.characters(ArrayDeserializer.java:502)
   at 
org.apache.axis.encoding.DeserializationContext.characters(DeserializationContext.java:966)
   at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:177)
   at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)

   at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
   at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
   at org.apache.axis.client.Call.invoke(Call.java:2467)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at 
de.test.TestserviceSOAPBindingStub.getResults(TestserviceSOAPBindingStub.java:175)

   at de.test.TestClient.main(TestClient.java:18)

   {http://xml.apache.org/axis/}hostname:LAP52

org.xml.sax.SAXException: Found character data inside an array element 
while deserializing

   at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
   at org.apache.axis.client.Call.invoke(Call.java:2470)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at 
de.test.TestserviceSOAPBindingStub.getResults(TestserviceSOAPBindingStub.java:175)

   at de.test.TestClient.main(TestClient.java:18)
Caused by: org.xml.sax.SAXException: Found character data inside an 
array element while deserializing
   at 
org.apache.axis.encoding.ser.ArrayDeserializer.characters(ArrayDeserializer.java:502)
   at 
org.apache.axis.encoding.DeserializationContext.characters(DeserializationContext.java:966)
   at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:177)
   at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)

   at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
   at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
   at org.apache.axis.client.Call.invoke(Call.java:2467)
   ... 4 more
Exception in thread "main"


Here is the genrated SOAP Response:

  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

 

   xmlns:ns1="http://transport.test.de";>

  1
  true
  
   
   xmlns:ns2="http://transport.test.de";>

  1
  true
  
   
   xmlns:ns3="http://transport.test.de";>

  1
  true
  
   
   xmlns:ns4="http://transport.test.de";>

  1
  true
  
   
   xmlns:ns5="http://transport.test.de";>

  1
  true
  
   
   xmlns:ns6="http://transport.test.de";>

  1
  true
  test
   

 
  

If I redeploy the service to the running server, the SOAP-Message 
doesn't contain the xsi-Types for outputArray and everthing works fine. 
But if I restart the server client crashes again.


This is the SOAP Response after redeployment:

  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

 

   
  
 
1
true


RE: wsdl2java does not generate class-files for complexTypes

2005-11-21 Thread Griffin, Mark
Christian,
Don't know if this will work for you, but I had a similar problem. Using
the -W option which turned off wrapped support worked for me. I was able
to then generate the classes.  Not completely sure why other than
something to do with the way axis is interpreting the wsdl.  I thought
my wsdl was docliteral wrapped but apparently axis thought otherwise.
At any rate it worked after the -W option.

markg

-Original Message-
From: Christian Schmitz [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 21, 2005 4:13 AM
To: axis-user@ws.apache.org
Subject: wsdl2java does not generate class-files for complexTypes


My WSDL defines the following complexTypes in the types-defintion:

  

  
 
   
  

  
 
  

The complexType SearchResult should be returned by my service method.

  

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

  

  
  

  


wsdl2java does not generate the classes SearchResults an ResultLine. I 
expect that the tool should generate them. Instead of the expected, it 
generates a 2-dimensional Array as return type of my service method.

public java.math.BigDecimal[][] search(...) throws
java.rmi.RemoteException;

Is this the correct? Is it possible to configure wsdl2java to generate 
the classes?

regars,
Christian



error initializing ArraySerializer and ArrayDeserializer

2005-11-21 Thread Christian Schmitz

Hi,

I am using axis 1.3 and I get the following 3 Exceptions for each 
ArrayMapping in the server log file:


java.lang.NoSuchMethodException: 
org.apache.axis.encoding.ser.ArraySerializerFactory.create(java.lang.Class, 
javax.xml.namespace.QName)

   at java.lang.Class.getMethod(Class.java:978)
   at 
org.apache.axis.encoding.ser.BaseSerializerFactory.createFactory(BaseSerializerFactory.java:254)
   at 
org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.java:542)
   at 
org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:253)
   at 
org.apache.axis.deployment.wsdd.WSDDService.(WSDDService.java:233)
   at 
org.apache.axis.deployment.wsdd.WSDDDeployment.(WSDDDeployment.java:192)
   at 
org.apache.axis.deployment.wsdd.WSDDDocument.setDocument(WSDDDocument.java:139)
   at 
org.apache.axis.deployment.wsdd.WSDDDocument.(WSDDDocument.java:65)
   at 
org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)

   at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
   at org.apache.axis.AxisEngine.(AxisEngine.java:156)
   at org.apache.axis.server.AxisServer.(AxisServer.java:88)
   at 
org.apache.axis.server.DefaultAxisServerFactory.createServer(DefaultAxisServerFactory.java:109)
   at 
org.apache.axis.server.DefaultAxisServerFactory.getServer(DefaultAxisServerFactory.java:73)

   at org.apache.axis.server.AxisServer.getServer(AxisServer.java:73)
   at 
org.apache.axis.transport.http.AxisServletBase.getEngine(AxisServletBase.java:185)
   at 
org.apache.axis.transport.http.AxisServletBase.getOption(AxisServletBase.java:396)
   at 
org.apache.axis.transport.http.AxisServletBase.init(AxisServletBase.java:112)

   at javax.servlet.GenericServlet.init(GenericServlet.java:258)
   at 
com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2094)
   at 
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4523)
   at 
com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4617)
   at 
com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:765)
   at 
com.evermind.server.http.HttpApplication.(HttpApplication.java:497)
   at 
com.evermind.server.Application.getHttpApplication(Application.java:886)
   at 
com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:688)

   at com.evermind.server.http.HttpSite.getApplication(HttpSite.java:420)
   at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:422)
   at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
   at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
   at 
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)

   at java.lang.Thread.run(Thread.java:534)
(21.Nov.2005 13:32:03) 
ttpRequestHandler-4889213  661 
DEBUG BaseDeserializerFactory  : Exception:
java.lang.NoSuchMethodException: 
org.apache.axis.encoding.ser.ArrayDeserializerFactory.create(java.lang.Class, 
javax.xml.namespace.QName)

   at java.lang.Class.getMethod(Class.java:978)
   at 
org.apache.axis.encoding.ser.BaseDeserializerFactory.createFactory(BaseDeserializerFactory.java:225)
   at 
org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.java:554)
   at 
org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:253)
   at 
org.apache.axis.deployment.wsdd.WSDDService.(WSDDService.java:233)
   at 
org.apache.axis.deployment.wsdd.WSDDDeployment.(WSDDDeployment.java:192)
   at 
org.apache.axis.deployment.wsdd.WSDDDocument.setDocument(WSDDDocument.java:139)
   at 
org.apache.axis.deployment.wsdd.WSDDDocument.(WSDDDocument.java:65)
   at 
org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)

   at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
   at org.apache.axis.AxisEngine.(AxisEngine.java:156)
   at org.apache.axis.server.AxisServer.(AxisServer.java:88)
   at 
org.apache.axis.server.DefaultAxisServerFactory.createServer(DefaultAxisServerFactory.java:109)
   at 
org.apache.axis.server.DefaultAxisServerFactory.getServer(DefaultAxisServerFactory.java:73)

   at org.apache.axis.server.AxisServer.getServer(AxisServer.java:73)
   at 
org.apache.axis.transport.http.AxisServletBase.getEngine(AxisServletBase.java:185)
   at 
org.apache.axis.transport.http.AxisServletBase.getOption(AxisServletBase.java:396)
   at 
org.apache.axis.transport.http.AxisServletBase.init(AxisServletBase.java:112)

   at javax.servlet.GenericServlet.init(GenericServlet.java:258)
   at 
com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2094)
   at 
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4523)
   at 
com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4617)
   at 
com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:765)

Problem with WSDL2Java?

2005-11-21 Thread Tim R J Langford

Hello All,

I am upgrading some SOAP clients from Axis 1.2 to Axis 1.3 Final. One of 
them upgraded with little effort,  just some changes to the code that 
processed the new bean convention style generate by WSDL2Java. The other 
project  is proving very troublesome however.


#1 : Firstly the schema beans appear NOT to generate properly. For 
example the following Schema section :



 
   
 type="s1:GuestCountType" />
 name="RoomAmenity" type="s1:RoomAmenityPrefType" />

   
   
   
   
   
 
 
   
 name="GuestCount" type="s1:GuestCountTypeGuestCount" />

   
   
 
 
   
   
   
 


But here WSDL2Java enerates a "RoomStayCandidateType" object that 
contains an array of "GuestCountTypeGuestCount" objects as a member. It 
does not generate a GuestCountType at all. This of course breaks the 
service. The old version of WSDL2Java generated all these classes as was 
to be expected, and only messed up setting the action type on one of the 
services (whihc was easilly fixed with a code post processor). I assume 
this is a bug. The schema seems valid to me.



#2 : Another problem occured in the generated source where a constructor 
was created thats calls Object.super() as follows...


public class VendorMessageType  implements java.io.Serializable {
   private java.lang.String infoType;  // attribute

   private 
org.opentravel.www.OTA._2003._05.FormattedTextSubSectionTypeParagraph[][] 
formattedTextType;  // attribute


   public VendorMessageType() {
   }

   public VendorMessageType(
  
org.opentravel.www.OTA._2003._05.FormattedTextSubSectionTypeParagraph[][] 
param1,

  java.lang.String Title,
  org.apache.axis.types.Language Language,
  java.lang.String infoType) {
   super(
   param1,
   Title);
   this.Language = Language;
   this.infoType = infoType;
   }

...
etc
...

}

???


When I searched the mailing list I noticed a few possibly similar 
questions to this, but no reponse I could act on. Is there any 
possibility of fixing these problems? If not is there any method of 
fixing/altering the generated source form the old version of Axis 
WSDL2Java to work with new 1.3 library? For example could I code to the 
correctly generated old 1.1 SOAP beans to get them to work with 1.3?


Thanks very much for your help and time! This has become a real show 
stopper, and I got deadlines and a crazy boss!


Tim




Using JAX-RPC exceptions

2005-11-21 Thread Bengali Bengali
Hi,

I have hard time trying to make my JAX-RPC webservice endpoint integrate to Axis.

I have a Webservice Service Endpoint Interface, its implementation class and a WSDL.
The WSDL declares a SOAP fault.
If i use the skeleton generated by Axis and throw my custom exception from it,
the custom exception appears in the details element of the  element.

If I use my own JAX-RPC implementation and throw my custom exception from it I get:
org.xml.sax.SAXException: SimpleDeserializer encountered a child
element, which is NOT expected, in something it was trying to
deserialize.


Actually in my JAX-RPC class, I use the exception class generated by Axis WSDL2Java which extends org.apache.axis.AxisFault.
and i suppose that it has to be declared in the server-config.wsdd.
I have noticed that the Axis BindingSkeleton declares the exception in a static block.

    _fault = new org.apache.axis.description.FaultDesc();
    _fault.setName("InsuranceFault");
    _fault.setQName(new javax.xml.namespace.QName("http://", "InsuranceDetails"));
    _fault.setClassName("com.fis.infra.ws.InsuranceFault");
    _fault.setXmlType(new
javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema",
"string"));
    _oper.addFault(_fault);
    
Is it possible to use an Axis exception from a standard JAX-RPC implementation class ? 
I am really reluctant to use the skeletons generated by Axis and put my code in them
and would prefer to stick to standard JAX-RPC implementations.

I guess it would be better to use also a true JAX-RPC exception also but I haven't found
out how to do it. Would someone have an example of a standard JAX-RPC Web service which
throws a custom exception with Apache Axis ?

Thanks,
bengali



wsdl2java does not generate class-files for complexTypes

2005-11-21 Thread Christian Schmitz

My WSDL defines the following complexTypes in the types-defintion:

 
   
 maxOccurs="unbounded" type="transporttypes:ResultLine"/>

  
 

   
 maxOccurs="unbounded" type="xsd:decimal" />

 


The complexType SearchResult should be returned by my service method.

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

   
 
   
 
 
   
 
   

wsdl2java does not generate the classes SearchResults an ResultLine. I 
expect that the tool should generate them. Instead of the expected, it 
generates a 2-dimensional Array as return type of my service method.


public java.math.BigDecimal[][] search(...) throws java.rmi.RemoteException;

Is this the correct? Is it possible to configure wsdl2java to generate 
the classes?


regars,
Christian