Re: [Axis2] Converting 1.x RPC to 2.0 Document style

2006-03-30 Thread Deepal Jayasinghe
yes you can but , wt you have to write is a MessageReciver. You can
write your own message receiver to handle any custom type , so that will
finally become your se/de.

SOA Work wrote:

>Is it possible to write custom serializers or deserializers for axis2? Like in 
>axis? 
>So that I can use all classes, even those which aren't javabeans.
>
>
>  
>
>>-Ursprüngliche Nachricht-
>>Von: axis-user@ws.apache.org
>>Gesendet: 30.03.06 06:59:00
>>An: axis-user@ws.apache.org
>>Betreff: Re: [Axis2] Converting 1.x RPC to 2.0 Document style
>>
>>
>
>
>  
>
>>Hi Ttrevor
>>
>>RPCMessgeReciver or any other messageReciver in Axis2 can not deal with
>>org.w3c.dom.Document , so I think you have to modify your service class
>>to return OM element , or you have to write you own message receiver to
>>deal with this case. But I think easy way is to just return OMElement ,
>>any simple type or any JavaBean from service class, then
>>RPCMessageReciver can handle that.
>>
>>So pls try that and if you have any q pls drop a mail. :)
>>
>>
>>trevor paterson (RI) wrote:
>>
>>
>>
>>>The original method returned an instance of an XML Document:
>>>
>>>public org.w3c.dom.Document; getChromosomes(String SpeciesAccession, String 
>>>SpeciesName, String SpeciesLatinName ) throws java.rmi.RemoteException 
>>>
>>>If I make a service using this method by deploying with a services.xml file 
>>>(below)  the service deploys ok, but always throws an error when run
>>>
>>>If I change the method to return an OMElement and add the Document node to 
>>>the OMElement in the method body the service works ok, and I just have to 
>>>extract the Document from the OMElement.
>>>
>>>I guess I just don't know how to specify the services.xml correctly to 
>>>deploy a service returning anything but an OMElement - and can find no 
>>>documentation on thismy services.xml is below: I don't feel confident to 
>>>write my own wsdl
>>>
>>>
>>>   
>>>  refactored service  for getting karyotype for a species through the 
>>> current Ark on axis 1.2 to 2.0.
>>>   
>>>   
>>>   >> locked="false">org.thearkdb.services2.ReturnCGKaryotypeView
>>>   
>>>   >> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>>>   
>>>
>>>
>>>
>>>Ta
>>>
>>>trevor
>>>
>>>-Original Message-
>>>From: SOA Work [mailto:[EMAIL PROTECTED] 
>>>Sent: 27 March 2006 16:45
>>>To: axis-user@ws.apache.org
>>>Subject: RE: [Axis2] Converting 1.x RPC to 2.0 Document style
>>>
>>>
>>>Hm, so your original method returned a java class. For example a bean?
>>>So what problem do you have with the return value? 
>>>
>>> 
>>>
>>>  
>>>
-Ursprüngliche Nachricht-
Von: axis-user@ws.apache.org
Gesendet: 27.03.06 16:51:44
An: 
Betreff: RE: [Axis2] Converting 1.x RPC to 2.0 Document style
   



>>> 
>>>
>>>  
>>>
Yes

I am getting there - I can invoke the server method OK - the server code 
executes OK but am having trouble returning the results as a Document.

Maybe I need to chenge my methods to create and return an OMElement instead 
of Document?

trevor

-Original Message-
From: SOA Work [mailto:[EMAIL PROTECTED]
Sent: 27 March 2006 15:48
To: axis-user@ws.apache.org
Subject: Re: [Axis2] Converting 1.x RPC to 2.0 Document style


I'm not sure if I understand the question right. But try using your 
existing service class with axis2 and the RPCMessageReceiver. 
RPCMessageReceiver is used to map the xml data to java objects. I think 
this is what you want.
The wsdl is generated.

RPCMessageReceiver means RPC programming model, not the wsdl style (which 
can be document).
This article descripes the different wsdl styles and the difference to the 
programming model:
http://www-128.ibm.com/developerworks/webservices/library/ws-whichwsdl
/

I hope this helps.


   



>-Ursprüngliche Nachricht-
>Von: axis-user@ws.apache.org
>Gesendet: 27.03.06 14:21:38
>An: 
>Betreff: [Axis2] Converting 1.x RPC to 2.0 Document style
> 
>
>  
>
   



>I have used java:RPC style SOAP messaging in axis 1.2 and now want to 
>migrate to axis2 - where as I understand it Document style messaging is 
>preferred.
>
>
>
>I can't find any documentation on how to create the wsdl to map to the 
>methodName(parameterX, parameterY) of my service.
>
>
>
>Do I have to write a bespoke receiver that takes the OMElement apart and 
>calls the service method with the correct parameters - or can this be done 
>'automatically' by creating an appropriate service.xml, using either the  
>RawXMLINOutMessageReceiver or the RPCMessageReceiver?
>
>
>
>thanks for any help
>
>Trevor Paterson
>
>Roslin Institute
>
>
>
>

Re: [Axis2] Converting 1.x RPC to 2.0 Document style

2006-03-30 Thread Deepal Jayasinghe
Hi Trevor ;

We dont have Attchement support yet , but it will be there soon :) , but
you can use MTOM and I think that will be a good candidate.

trevor paterson (RI) wrote:

>Thanks
>
>Returning an OMElement is good enough for now - but if I have a very big 
>return document it would be nice to zip up and transport as a binary 
>attachment - I can't find any clues how I specify use of SOAP attachments in 
>axis 2 service deployment.
>
>trevor 
>
>-Original Message-
>From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED] 
>Sent: 30 March 2006 05:58
>To: axis-user@ws.apache.org
>Subject: Re: [Axis2] Converting 1.x RPC to 2.0 Document style
>
>Hi Ttrevor
>
>RPCMessgeReciver or any other messageReciver in Axis2 can not deal with 
>org.w3c.dom.Document , so I think you have to modify your service class to 
>return OM element , or you have to write you own message receiver to deal with 
>this case. But I think easy way is to just return OMElement , any simple type 
>or any JavaBean from service class, then RPCMessageReciver can handle that.
>
>So pls try that and if you have any q pls drop a mail. :)
>
>
>trevor paterson (RI) wrote:
>
>  
>
>>The original method returned an instance of an XML Document:
>>
>>public org.w3c.dom.Document; getChromosomes(String SpeciesAccession, 
>>String SpeciesName, String SpeciesLatinName ) throws 
>>java.rmi.RemoteException
>>
>>If I make a service using this method by deploying with a services.xml 
>>file (below)  the service deploys ok, but always throws an error when 
>>run
>>
>>If I change the method to return an OMElement and add the Document node to 
>>the OMElement in the method body the service works ok, and I just have to 
>>extract the Document from the OMElement.
>>
>>I guess I just don't know how to specify the services.xml correctly to deploy 
>>a service returning anything but an OMElement - and can find no documentation 
>>on thismy services.xml is below: I don't feel confident to write my own 
>>wsdl
>>
>>
>>   
>>  refactored service  for getting karyotype for a species through the 
>> current Ark on axis 1.2 to 2.0.
>>   
>>   
>>   > locked="false">org.thearkdb.services2.ReturnCGKaryotypeView
>>   
>>   > class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>>   
>>
>>
>>
>>Ta
>>
>>trevor
>>
>>-Original Message-
>>From: SOA Work [mailto:[EMAIL PROTECTED]
>>Sent: 27 March 2006 16:45
>>To: axis-user@ws.apache.org
>>Subject: RE: [Axis2] Converting 1.x RPC to 2.0 Document style
>>
>>
>>Hm, so your original method returned a java class. For example a bean?
>>So what problem do you have with the return value? 
>>
>> 
>>
>>
>>
>>>-Ursprüngliche Nachricht-
>>>Von: axis-user@ws.apache.org
>>>Gesendet: 27.03.06 16:51:44
>>>An: 
>>>Betreff: RE: [Axis2] Converting 1.x RPC to 2.0 Document style
>>>   
>>>
>>>  
>>>
>> 
>>
>>
>>
>>>Yes
>>>
>>>I am getting there - I can invoke the server method OK - the server code 
>>>executes OK but am having trouble returning the results as a Document.
>>>
>>>Maybe I need to chenge my methods to create and return an OMElement instead 
>>>of Document?
>>>
>>>trevor
>>>
>>>-Original Message-
>>>From: SOA Work [mailto:[EMAIL PROTECTED]
>>>Sent: 27 March 2006 15:48
>>>To: axis-user@ws.apache.org
>>>Subject: Re: [Axis2] Converting 1.x RPC to 2.0 Document style
>>>
>>>
>>>I'm not sure if I understand the question right. But try using your existing 
>>>service class with axis2 and the RPCMessageReceiver. RPCMessageReceiver is 
>>>used to map the xml data to java objects. I think this is what you want.
>>>The wsdl is generated.
>>>
>>>RPCMessageReceiver means RPC programming model, not the wsdl style (which 
>>>can be document).
>>>This article descripes the different wsdl styles and the difference to the 
>>>programming model:
>>>http://www-128.ibm.com/developerworks/webservices/library/ws-whichwsdl
>>>/
>>>
>>>I hope this helps.
>>>
>>>
>>>   
>>>
>>>  
>>>
-Ursprüngliche Nachricht-
Von: axis-user@ws.apache.org
Gesendet: 27.03.06 14:21:38
An: 
Betreff: [Axis2] Converting 1.x RPC to 2.0 Document style
 



>>>   
>>>
>>>  
>>>
I have used java:RPC style SOAP messaging in axis 1.2 and now want to 
migrate to axis2 - where as I understand it Document style messaging is 
preferred.



I can't find any documentation on how to create the wsdl to map to the 
methodName(parameterX, parameterY) of my service.



Do I have to write a bespoke receiver that takes the OMElement apart and 
calls the service method with the correct parameters - or can this be done 
'automatically' by creating an appropriate service.xml, using either the  
RawXMLINOutMessageReceiver or the RPCMessageReceiver?



thanks for any help

Trevor Paterson

Roslin Institute




 



>>>

Deploying Web Services in axis - Custom Deployment

2006-03-30 Thread Harikrishna Khandelwal, Pankaj
Title: Deploying Web Services in axis - Custom Deployment






Hi,


I'm trying to deploy a Web Service (Java) in Axis 1.2 using the Custom Deployment method. I have placed the Web Service class in the - /webapps/axis/WEB-INF/classes// folder structure and have placed the corresponding WSDD file at - /webapps/axis/WEB-INF . Now I'm trying to deploy the Web Service using the Axis org.apache.axis.client.AdminClient class from a command prompt. For this I have include the following JAR files in my CLASSPATH environment variable -  activation.jar, mail.jar, xalan.jar, jaxrpc.jar, saaj.jar, wsdl4j.jar, xmlsec-1.2.1.jar, commons-discovery.jar and commons-logging.jar.

I'm using the following command to deploy the Web Service - java org.apache.axis.client.AdminClient HostWebService.wsdd .

However I'm getting the following exception while I try to execute the above metioned command - Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/rpc/ServiceException. Could anyone please tell me why I'am getting this exception and how can I resolve this.

I have followed these steps for deployment  from the apache site URL - http://ws.apache.org/axis/java/user-guide.html#UsingWSDLWithAxis

Looking forward to hear from you.


Thanks,

Pankaj Khandelwal

SAP Labs India







Re: [Axis2] Transport level information does not match with SOAP Message namespace URI

2006-03-30 Thread Thilina Gunarathne
What is the Mail jar you are using... There is a known problem with
sun's mail jar not being able to decode the content-id generated by
Axis2..

Please try switching to Gerenimo mail & Activation jars if you are
using Sun's impl's...

In the mean time I'll try to get our code working with Sun's impl's...
Problem seems to be with unscaped ":" in the boundary field...

~Thilina

On 3/30/06, Dalys Sebastian <[EMAIL PROTECTED]> wrote:
> Thanks for your inputs. I use SOAP 1.1 at both ends (I use
> OMAbstractFactory.getSOAP11Factory() to create OMFactory at both ends, client 
> and
> server).
>
> The exception mentioned is the one that is thrown by Axis at the client side.
>
> The 'invalid content type ' in the response was reported only through tcpmon.
>
> Could you please advice on how I can correct this problem?
> I have run the same code with Axis-0.93 and web services security worked with 
> no trouble.
> What shall I change it to suit 0.95?
>
> Thanks,
> Dalys
> --- Eran Chinthaka <[EMAIL PROTECTED]> wrote:
>
> > It seems we have a small bug with MTOM. I see the same error being
> > reported earlier as well.
> >
> > Thilina, Saminda, we need your expertise on this :).
> >
> > But why the subject of this email is "Transport level information does
> > not match with SOAP Message namespace URI", when the exception clearly
> > says "Invalid Content Type Field" ?
> >
> > -- Chinthaka
> >
> > Anne Thomas Manes wrote:
> > > Your input message is using SOAP 1.1 and the output message is using
> > > SOAP 1.2.
> > >
> > > On 3/29/06, *Dalys Sebastian* < [EMAIL PROTECTED]
> > > > wrote:
> > >
> > > I am using Axis 2 version 0.95 with Tomcat 5 with ws-security
> > > enabled. When I send a
> > > message from a secure client to a secure service, I get the
> > > following exception:
> > >
> > > org.apache.axis2.AxisFault: Transport level information does not
> > > match with SOAP
> > > Message namespace URI; nested exception is:
> > > org.apache.ws.commons.soap.SOAPProcessingException:
> > > Transport level information
> > > does not match with SOAP Message namespace URI
> > > at
> > > 
> > > org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java
> > > :124)
> > > ..
> > >
> > > I captured the secure message using tcpmon and here is what I get:
> > >
> > > /XXX/services/SecureWebServices HTTP/1.1
> > > User-Agent: Axis/2.0
> > > SOAPAction: urn:getConfigFiles
> > > Host: localhost:8084
> > > Transfer-Encoding: chunked
> > > Content-Type: multipart/related;
> > > boundary=MIMEBoundaryurn:uuid:B27BAFEAEBEA7958AF11436725759541;
> > > type="application/xop+xml";
> > > start="< 0.urn:uuid:[EMAIL PROTECTED]
> > > >";
> > > start-info="text/xml";
> > > charset=UTF-8
> > >
> > > 11e7
> > > --MIMEBoundaryurn:uuid:B27BAFEAEBEA7958AF11436725759541
> > > content-type:application/xop+xml; charset=UTF-8; type="text/xml";
> > > content-transfer-encoding:binary
> > > content-id:<0.urn:uuid:[EMAIL PROTECTED]
> > > >
> > >
> > >  > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> > > xmlns:xenc="http://www.w3.org/2001/04/xmlenc#
> > > "
> > > xmlns:wsa="http://www.w3.org/2005/08/addressing";>
> > >  > > xmlns:wsse="
> > >
> > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
> > > soapenv:mustUnderstand="1"> > > xmlns:xenc=" http://www.w3.org/2001/04/xmlenc#"; 
> > > Id="EncKeyId-28062585">
> > >  > > Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5 " />
> > > http://www.w3.org/2000/09/xmldsig#";>
> > >  > > ValueType="
> > >
> >
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier";
> > > EncodingType="
> > >
> >
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary";>H2Nh6UEp+NfVnuL6eDdoehHSis4=
> > > 
> > >
> >
> b0oyYgeV/OQCBUnNBlT0TjbkIwlMtANM3pLJ9t1PeDPRAPWCWKqiqsv+qYDzdYHv5RjgoErNf/NiNL+eDn2bP+2nF7AJ8Ugl6pvF4XURhhHHUI1l/eXBglv0pTwLUlopARoMrLbpxVfrCQqLryVYouNylyXglorivzmwZMR8EQDYhtpvXdrS+O31t1w75MpzsCzcTA0osFg4vvoX53zv9YubWFPP9T0GN+FDA61JjTiGnE0XkXhwjJCSddsn9FYIPCzB/RYGkvWB+UMtKlFjjrBheLvXlxAaAC+FUGqIXeCocGsMXp4Sbt07qGueKCri81OyBTz8iN9PbupYQsS7KA==
> > >
> > >  > > /> > > xmlns:ds=" http://www.w3.org/2000/09/xmldsig#"; 
> > > Id="Signature-12241337">
> > > 
> > >  > > Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#
> > > " />
> > >  > > Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"; />
> > > 
> > > 
> > > http://www.w3.org/2001/10/xml-exc-c14n#"; />
> > > 
> > > http://www.w3.org/2000/09/xmldsig#sha1"; 
> > > />

xmlbeans with axis1.3

2006-03-30 Thread Latha Venkat
I have a  small app that uses xmlbean parser and works fine , I wanted to make this a web service that takes an XML as string and deploy it throuh AXIS1.3 .  here is my test service      public class HelloServer {   public String sayHello(String str){   try{ ClientReqDoc doc = ClientReqDoc.Factory.parse(str); Sytem.out.prinln(doc.toString() );   } catch( XmlException e) {    e.printStackTrace();   }
  return
 str;    }      }  I copied the xbean.jar into WEB-INF/lib , Copied all the classses generated by xmlbeans into WEB-INF/classses .   I was able to deploy the above service , But while trying to invoke the above service using a client , I get the following error , in the tomcat logs , ie in catalina.out      org.apache.axis.XmlError does not have a default constructor ...     can anyone please help me      Thanks   Latha 
		New Yahoo! Messenger with Voice. Call regular phones from your PC for low, low rates.

Re: How to generate WSDL with my formal parameter names

2006-03-30 Thread Rhimbo
Hello Dies,

I got this to work finally.  After a decent nights rest I fould a
problem in my "clean" script.  I had an extraneous Family.class
file.  

Although I used the "--implClass FamilyImpl" argument, for
some reason there was a conflict with that old Family.class file.
I deleted it, recompiled and everything worked.  

My apologies for all the emails last night.

Vartan



--- Dies Koper <[EMAIL PROTECTED]> wrote:

> Try:
> $ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl \
>  --implClass FamilyImpl \
>  -l"http://10.196.130.245:8080/axis/services/familyAccounts"; \
>  -n urn:familyAccounts \
>  -p"disney.dis.family" urn:familyAccounts \
>  disney.dis.family.Family
> 
> When you use the long option names, use two hyphens.
> 
> Regards,
> Dies
> 
> 
> Rhimbo wrote:
> > Hello Dies,
> > 
> > Still having trouble  I had already tried what you suggested.  
> > Here is what I did.  
> > 
> > $ rm *.class
> > $ javac -g FamilyImpl.java
> > $ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl \
> > -l"http://10.196.130.245:8080/axis/services/familyAccounts"; \
> > -p"disney.dis.family" \
> > urn:familyAccounts disney.dis.family.FamilyImpl
> > 
> > I ran the command from my ../src/disney/dis/family directory.
> > I also ran it from the ../src directory (containing the
> > ./disney/dis/family directory) 
> > 
> > I have no idea what's wrong.  
> > 
> > I get a WSDL file.  Here is an excerpt:
> > 
> > 
> >  > xmlns:apachesoap="http://xml.apache.org/xml-soap";
> > xmlns:impl="urn:familyAccounts" xmlns:intf="urn:familyAccounts"
> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
> > 
> >  
> >> xmlns="http://www.w3.org/2001/XMLSchema";>
> >http://schemas.xmlsoap.org/soap/encoding/"/>
> >
> > 
> >  
> >> wsdl:arrayType="soapenc:string[]"/>
> >  
> > 
> >
> >   
> >  
> > 
> >
> >
> > 
> >
> >   
> >   
> >   
> >   
> >   
> >
> >   ...
> > 
> > 
> > 
> > Vartan
> > 
> > 
> > 
> > 
> > 
> > --- Dies Koper <[EMAIL PROTECTED]> wrote:
> > 
> >> Try:
> >> javac -g FamilyImpl.java
> >>
> >> The interface class will NEVER get the original parameter names.
> >>
> >> Regards,
> >> Dies
> >>
> >>
> >> Rhimbo wrote:
> >>> Hello again all,
> >>>
> >>>
> >>> Does anyone know how to generate a WSDL that uses the formal 
> >>> parameter names from the original source file... either the Java
> >>> interface or the implement class?  
> >>>
> >>> I've tried every combination I can think of using the -implClass
> >>> command line argument to Java2WSDL, but I can't get it to work.
> >>>
> >>> I want to generate my WSDL so it uses the formal parameter names in
> >>> my methods instead of "in0", "in1", etc. 
> >>>
> >>> I found the following URL:
> >>>
> >>>
> >
>
http://publib.boulder.ibm.com/infocenter/wasinfo/v5r0/index.jsp?topic=/com.ibm.websphere.exp.doc/info/exp/ae/rwbs_java2wsdl.html
> >>> This page has a much better explanation that the Apache 
> >>> documentation.  Nevertheless, I still can't generate a WSDL with 
> >>> my formal parameter names. 
> >>>
> >>> Here is an excerpt from the explanation on the above URL:
> >>>
> >>> "If the class is compiled without debug information, or if the 
> >>>  class is an interface, the method parameter names are not 
> >>>  available.  In this case, you can use the -implClass argument 
> >>>  to provide an alternative class from which to obtain method 
> >>>  parameter names. The impl-class does not need to implement 
> >>>  the class if the class is an interface, but it must implement 
> >>>  the same methods as class. "
> >>>
> >>>
> >>> So I tried the following:
> >>>
> >>> interface : Family.java
> >>> implementing class: FamilyImpl.java
> >>>
> >>> First try by compiling interface with debug:
> >>>
> >>> $ javac -g Family.java
> >>> $ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl \
> >>> -l"http://10.196.130.245:8080/axis/services/familyAccounts"; \
> >>> -n urn:familyAccounts \
> >>> -p"disney.dis.family" urn:familyAccounts \
> >>> disney.dis.family.Family
> >>>
> >>>
> >>> Doesn't work.  family.wsdl still has "in0", ... etc. 
> >>>
> >>> Then tried specifying alternate class file containing the
> >>> implementation class:
> >>>
> >>> $ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl \
> >>> -implClass FamilyImpl \
> >>> -l"http://10.196.130.245:8080/axis/services/familyAccounts"; \
> >>> -n urn:familyAccounts \
> >>> -p"disney.dis.family" urn:familyAccounts \
> >>> disney.dis.family.Family
> >>>
> >>> Error:
> >>> java.lang.ClassNotFoundException: mplClass
> >>> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> >>> at java.security.AccessController.doPrivileged(Native
> Method)
> >>> 

Re: [SPAM] - Re: [SPAM] - Re: Problems getting user exceptions to work - Found word(s) check out in the Text body - Found word(s) check out in the subject

2006-03-30 Thread Thom Hehl

Have a look at this:

Give him This:
_original type def from imported xsd___
 
  
 

_also needed in wsdl file___
   
   type="ns:InvalidDateException"/>

   

*(in the portType operation definition for a method throwing a fault)*
message="ns:InvalidDateExceptionFault"/>


*(in the binding operation definintion for a method throwing a fault)*

   




Jack Lund wrote:

See, I'm not really sure. The JAX/RPC spec is kinda hazy on how 
exceptions are handled, and how the soap fault maps to an exception. 
Here's what I'm seeing come back from the server:



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";>

   
   
   soapenv:Server.userException
   com.foobar.ecommerce.beans.InvalidDateException: A 
valid date must be specified in the form of MM/DD/.

   
   xsi:type="ns1:InvalidDateException" xmlns:ns1="urn:ClaimsData"/>
   xmlns:ns2="http://xml.apache.org/axis/";>staportal01.stratarc.net 


   
   
   


And here's what the corresponding part of the WSDL looks like:


 xmlns="http://www.w3.org/2001/XMLSchema";>

  http://hib.ecommerce.foobar.com"/>
  namespace="http://portal01.foobar.com:8080/axis/services/ClaimsData"/>

  http://dao.ecommerce.foobar.com"/>
  http://beans.ecommerce.foobar.com"/>
  http://schemas.xmlsoap.org/soap/encoding/"/>
  
   











   
  
  
   
  
 

What makes me think the serialization isn't working is that the 
definition of the InvalidDateException is pretty much empty. However, 
it also looks like there's enough information in the passed soap 
message to be able to deserialize the exception properly, so I don't 
really know what's going on here.


Do you (or anybody) have an example of what a "good" soap fault mapped 
from a java exception looks like?


Thanks.

-Jack


Thom Hehl wrote:

Hmmm. Check your SOAP messae. Our problem is that we're sending the 
correct data from the server and the error happens during 
deserialization. If that's not it, it's a different problem.


Jack Lund wrote:

Thanks! I'd love to hear the workaround - I've tried everything I 
can. It looks like the problem is that the server side doesn't 
really know how to serialize the exception, even though it should.


-Jack

Thom Hehl wrote:

We had EXACTLY the same problem! We just found it and found a 
work-around, but believe this to be a bug in AXIS that should be 
fixed. The guy on our team that found it was going to write 
something up for the list. I'll ask him to step this up a bit as it 
would be of benefit to you.


Jack Lund wrote:

Yeah, I can see that that would be easier. Unfortunately, I have 
no control over the exceptions being thrown - I just need the 
client-side to be able to catch them *as* the exceptions that are 
originally thrown. I also am doing dynamic proxying rather than 
stubs/skeletons, so it makes it that more complicated.


>From the debugging I've been able to do, it looks like the fault 
coming across contains the fully-qualified package name of the 
exception class, but for some reason on the client side it's not 
creating the exception. Since this is an area where there's 
practically no documentation, I'm finding myself pretty much 
randomly trying different things and seeing if they work.


The user's guide is really vague about this subject:

"If a method is marked as throwing an Exception that is not an 
instance or a subclass of java.rmi.RemoteException, then things 
are subtly different. The exception is no longer a SOAP Fault, but 
described as a wsdl:fault in the WSDL of the method. According to 
the JAX-RPC specification, your subclass of Exception must have 
accessor methods to access all the fields in the object to be 
marshalled /and/ a constructor that takes as parameters all the 
same fields (i.e, arguments of the same name and type). This is a 
kind of immutable variant of a normal JavaBean 
. The fields in the object 
must be of the datatypes that can be reliably mapped into WSDL.


If your exception meets this specification, then the WSDL 
describing the method will describe the exception too, enabling 
callers to create stub implementations of the exception, 
regardless of platform."


I was kind of hoping someone else out there would have had some 
experience with getting this to work.


-Jack

Jarmo Doc wrote:

I have an Axis client stub which was generated from WSDL. *All* 
of the client-side user-defined exceptions extend 
org.apache.axis.AxisFault.


The equivalent exceptions at the server also extend 
org.apache.axis.AxisFault, rather than Exception.


This is a decidedly dodgy area, imo, especially when it comes to 
interop with non-Axis clients.




From: Jack Lund <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: RE: Problems ge

Questions regarding AXIS 1.3

2006-03-30 Thread Maulin Gajjar
Hello All,I am trying implement JDM (JSR-73) Webservices using AXIS 1.3 and have some questions. When i deploy the war containing the webservice and try to view the wsdl using the ?wsdl feature of AXIS, i get an error saying "Bean attribute is of type java.lang.String, which is not a simple type", even though the service is successfully deployed. Also, the schema contains a complex inheritance hierarchy of types which is correctly converted to appropriate java types by using WSDL2Java. Now if a webservice expects a type A as a request parameter and I pass in a type B which is a subtype of type A, the default serializer org.apache.axis.encoding.ser.BeanSerializerFactory serializes it to type A which is not the intented. How can i work around this?Any help will be appreciated.-Max.
		Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.

Re: Axis 1.3 as Client AND Server

2006-03-30 Thread Kim Alster Larsen

Sorry,
I may have simplified the example a bit to much.

On the SOAP communication between B and C in the before mentioned 
example, I want to attach SAML headers to the soap message. I'm using 
wss4j to achieve this. The problem is however, to configure the 
deployment descriptor for the B web service, so that the call will go 
through Axis, and thereby through wss4j.


I guess this is done by defining a request flow, and a response flow. As 
it is right now I can make the service check for SAML in the incoming 
message, and throw and exception if none is there. What I lack is a way 
to tell the outgoing soap call to go through the response flow defined 
in the deployment descriptor for the service.


As far as I understand the outgoing call doesn't go through the response 
flow if you use the auto-generated stubs?


And how do I distinguish between the cases where the service should act 
as a server and where it should act as a client? The message flow for 
these two cases are different as far as I understand?


Do you have any experience in this?

regards Kim
Roslan Amir wrote:

Hi,

Not a problem at all. I have done this before. The method in the implementation
class of B just uses the client API to invoke the Web Services on C and A. They
can even be the same Web Service. It's the URL's that are different. Make sure
you call using the correct URL.

Roslan Amir

Quoting Kim Alster Larsen <[EMAIL PROTECTED]>:

  

Hi,

I'm using Axis 1.3, and I have a question on how to configure my server.

The setup I want to use Axis to implement is the following two scenarios:
(B is the process that uses Axis)
1)
 A sends a message to B,
B forwards the call via Axis using SOAP to C.

2)
C sends a message to B,
B forwards the message to A.
In scenario 1) I guess the Axis component in B should be configured as a
Client, but in scenario 2) the setup requires a server setup?

B is actually a process that publishes a webservice interface through
axis. How is it possible to support both scenarios?

Any help or suggestions would be greatly appriciated!

-Kim










This mail sent through IMP: https://webmail.xybase.com 
  


Re: How to prevent WSDL2Java from overwriting my interface file?

2006-03-30 Thread Rhimbo
Rick,

My build hierarchy is something like this:

  ./src/disney/dis/family

My Family.java and FamilyImpl.java files reside there.

But these files are defined in a Java package disney.dis.family.
So, running the WSDL2Java command in question from this directory 
creates the generated files "under" the current directory (not 
really in it) such that the location reflects the Java package 
name.

That is, now I get this:

  ./src/disney/dis/family/disney/dis/family

And the files are there.  I can manually move them back to
  ./src/disney/dis/family

Seems there should be an easier way.

I can run the command with this option:
  -o ../../..

which will then put the generated files in
  ./src/disney/dis/family

which is presumably what I want.  But now my original Family.java
interface definition is obliterated (overwritten).  

I want to keep this one because it's the "master" file that
defines my web services, contains all of my Javadoc, blah, blah
blah.  

The generated one is the ugly, machine-generated crap with the
"in0" parameters, no formatting, no line breaks, no documentation,
etc. 

Is there a "best practice" for this (or just some workaround or
way that other folks have avoided the inconvenience of manually
copying files around).  If not I guess I have to invest time to
write some build scripts now.


Vartan



--- Rick Reumann <[EMAIL PROTECTED]> wrote:

> On 3/30/06, Rhimbo <[EMAIL PROTECTED]> wrote:
> 
> 
> > How do I prevent WSDL2Java from overwriting my interface file?
> 
> 
> 
> > This command overwrites my Family.java file.
> >
> > I know I can specify
> >-o .
> >
> > as an option and WSDL2Java will create a disney/dis/family
> > hierarchy underneath my current directory.
> 
> Actually wouldn't that above would just make them in the same
> directory?
> 
> > But then I have to move the generated files to my current directory
> > in order to compile everything.
> >
> > I'm sure there is a "best practice" that solves this problem.
> >
> > Is there a command line option that tells WSDL2Java "don't
> > overwrite".
> 
> I'm new to axis and web services, so I might be stating something
> incorrectly, but I was basically confused by the same issue. None of
> the simple lessons or tutorials I was doing online really mentioned
> this behavior so I was cofused at first, so I'm not sure of the 'best
> practice.' However, as was mentioned to me in a recent post it's ok
> that they are overwritten and if you don't want them overwritten, you
> have to build them to a different directory. If you look at what's
> generated (in the overwritten files) you'll see that what axis changes
> is obviously necessary so those generated files need to be somwhere
> (you can't just say 'don't make them' since they are obviously
> needed).
> 
> I actually don't mind them being replaced and just using the replaced
> ones. Is there a reason why you don't want to just work with the newly
> generated classes?
> 
> Also, I'm not sure what you mean by having to move the generated
> classes back into the original directory. If you do that, and leave
> out the generated ones that you think are 'duplicates' I don't see how
> your web service will work when you deploy it. (It'll compile locally
> but does the web service work). Also, even if you do have the
> generated files go to a new pacakge, the files should still compile
> ok.
> 
> I wouldn't minding knowing either, though, if most experiecned axis
> users just work with files that overwrite the initial ones, or if they
> use ones generated to a new package.
> 
> Another thing that sort of hit me also, that I could be wrong about,
> is that some people I think generate their wsdl file first before even
> creating any Java files  - so they then use the WSDL2Java to make
> their stubs and create what the other supporting classes they need. 
> (In other words they aren't using Java2WSDL to make a wsdl from
> existing classes, they are possibly creating the wsdl manually with
> their own schema inside and then using WSDL2Java).
> 
> --
> Rick
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: How to generate WSDL with my formal parameter names

2006-03-30 Thread Rhimbo
Hello Anne,

Yes, I compiled both the interface and the implementation file 
with -g flag.

Below is the scenario I ran just now.  The Java2WSDL execution 
produced a family.wsdl file, but the WSDL file still contains 
the default "in0", etc. parameter names.



$ javac -version
javac 1.5.0_06
$
$ rm *.class
$ 
$ $ javac -g Family.java FamilyImpl.java
$ ls -l *.class
-rw-r--r--  1 vartan vartan   726 Mar 30 10:07 Family.class
-rw-r--r--  1 vartan vartan 17957 Mar 30 10:07 FamilyImpl.class
$
$ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl \
> --implClass disney.dis.family.FamilyImpl \
> -l"http://10.196.130.245:8080/axis/services/familyAccounts"; \
> -p"disney.dis.family" urn:familyAccounts \
> disney.dis.family.Family
$
$ ls -lt
total 232
-rw-r--r--  1 vartan vartan  5483 Mar 30 10:08 family.wsdl
-rw-r--r--  1 vartan vartan   726 Mar 30 10:07 Family.class
-rw-r--r--  1 vartan vartan 17957 Mar 30 10:07 FamilyImpl.class
-rw-r--r--  1 vartan vartan  7216 Mar 29 22:01 Family.java



http://xml.apache.org/xml-soap";
xmlns:impl="urn:familyAccounts" xmlns:intf="urn:familyAccounts"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>



Excerpt of family.wsdl

   

  

  

  

  

  

   



--Vartan






--- Anne Thomas Manes <[EMAIL PROTECTED]> wrote:

> Did you compile the implClass with debug?
> 
> On 3/30/06, Rhimbo <[EMAIL PROTECTED]> wrote:
> >
> > Dies,
> >
> > Ah, sorry to be bothersome... I tried --implClass and it doesn't
> > work.  I also tried -i and it didn't work.
> >
> > I then tried using all "--" long arg names or all "-" short arg
> > names.  Nothing worked.
> >
> > Maybe I should sleep on it and tackle it tomorrow morning.  Past
> > experience tells me I never solve the problem when frustrated.
> >
> > Has ANYONE got this to work?
> >
> > Thanks,
> >
> > Vartan
> >
> >
> >
> > --- Dies Koper <[EMAIL PROTECTED]> wrote:
> >
> > > Try:
> > > $ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl \
> > >  --implClass FamilyImpl \
> > >  -l"http://10.196.130.245:8080/axis/services/familyAccounts"; \
> > >  -n urn:familyAccounts \
> > >  -p"disney.dis.family" urn:familyAccounts \
> > >  disney.dis.family.Family
> > >
> > > When you use the long option names, use two hyphens.
> > >
> > > Regards,
> > > Dies
> > >
> > >
> > > Rhimbo wrote:
> > > > Hello Dies,
> > > >
> > > > Still having trouble  I had already tried what you suggested.
> > > > Here is what I did.
> > > >
> > > > $ rm *.class
> > > > $ javac -g FamilyImpl.java
> > > > $ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl \
> > > > -l"http://10.196.130.245:8080/axis/services/familyAccounts"; \
> > > > -p"disney.dis.family" \
> > > > urn:familyAccounts disney.dis.family.FamilyImpl
> > > >
> > > > I ran the command from my ../src/disney/dis/family directory.
> > > > I also ran it from the ../src directory (containing the
> > > > ./disney/dis/family directory)
> > > >
> > > > I have no idea what's wrong.
> > > >
> > > > I get a WSDL file.  Here is an excerpt:
> > > >
> > > >
> > > >  > > > xmlns:apachesoap="http://xml.apache.org/xml-soap";
> > > > xmlns:impl="urn:familyAccounts" xmlns:intf="urn:familyAccounts"
> > > > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
> > > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> > > > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
> > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
> > > > 
> > > >  
> > > >> > > xmlns="http://www.w3.org/2001/XMLSchema";>
> > > > namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> > > >
> > > > 
> > > >  
> > > >> > > wsdl:arrayType="soapenc:string[]"/>
> > > >  
> > > > 
> > > >
> > > >   
> > > >  
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >   
> > > >   
> > > >   
> > > >   
> > > >   
> > > >
> > > >   ...
> > > >
> > > >
> > > >
> > > > Vartan
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --- Dies Koper <[EMAIL PROTECTED]> wrote:
> > > >
> > > >> Try:
> > > >> javac -g FamilyImpl.java
> > > >>
> > > >> The interface class will NEVER get the original parameter names.
> > > >>
> > > >> Regards,
> > > >> Dies
> > > >>
> > > >>
> > > >> Rhimbo wrote:
> > > >>> Hello again all,
> > > >>>
> > > >>>
> > > >>> Does anyone know how to generate a WSDL that uses the formal
> > > >>> parameter names from the original source file... either the
> Java
> > > >>> interface or the implement class?
> > > >>>
> > > >>> I've tried every combination I can think of using the
> -implClass
> > > >>> command line argument to Java2WSDL, but I can't get it to work.
> > > >>>
> > > >>> I want to generate my WSDL so it uses the formal parameter
> names in
> > > >>> my methods instead of "in0", "in1", etc.
> > > >>>
> > > >>> I found the following URL:
> > > >>>
> > > 

Re: [SPAM] - Re: [SPAM] - Re: Problems getting user exceptions to work - Found word(s) check out in the Text body - Found word(s) check out in the subject

2006-03-30 Thread Jack Lund
See, I'm not really sure. The JAX/RPC spec is kinda hazy on how 
exceptions are handled, and how the soap fault maps to an exception. 
Here's what I'm seeing come back from the server:



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";>

   
   
   soapenv:Server.userException
   com.foobar.ecommerce.beans.InvalidDateException: A 
valid date must be specified in the form of MM/DD/.

   
   xsi:type="ns1:InvalidDateException" xmlns:ns1="urn:ClaimsData"/>
   xmlns:ns2="http://xml.apache.org/axis/";>staportal01.stratarc.net

   
   
   


And here's what the corresponding part of the WSDL looks like:


 http://www.w3.org/2001/XMLSchema";>
  http://hib.ecommerce.foobar.com"/>
  http://portal01.foobar.com:8080/axis/services/ClaimsData"/>
  http://dao.ecommerce.foobar.com"/>
  http://beans.ecommerce.foobar.com"/>
  http://schemas.xmlsoap.org/soap/encoding/"/>
  
   











   
  
  
   
  
 

What makes me think the serialization isn't working is that the 
definition of the InvalidDateException is pretty much empty. However, it 
also looks like there's enough information in the passed soap message to 
be able to deserialize the exception properly, so I don't really know 
what's going on here.


Do you (or anybody) have an example of what a "good" soap fault mapped 
from a java exception looks like?


Thanks.

-Jack


Thom Hehl wrote:

Hmmm. Check your SOAP messae. Our problem is that we're sending the 
correct data from the server and the error happens during 
deserialization. If that's not it, it's a different problem.


Jack Lund wrote:

Thanks! I'd love to hear the workaround - I've tried everything I 
can. It looks like the problem is that the server side doesn't really 
know how to serialize the exception, even though it should.


-Jack

Thom Hehl wrote:

We had EXACTLY the same problem! We just found it and found a 
work-around, but believe this to be a bug in AXIS that should be 
fixed. The guy on our team that found it was going to write 
something up for the list. I'll ask him to step this up a bit as it 
would be of benefit to you.


Jack Lund wrote:

Yeah, I can see that that would be easier. Unfortunately, I have no 
control over the exceptions being thrown - I just need the 
client-side to be able to catch them *as* the exceptions that are 
originally thrown. I also am doing dynamic proxying rather than 
stubs/skeletons, so it makes it that more complicated.


>From the debugging I've been able to do, it looks like the fault 
coming across contains the fully-qualified package name of the 
exception class, but for some reason on the client side it's not 
creating the exception. Since this is an area where there's 
practically no documentation, I'm finding myself pretty much 
randomly trying different things and seeing if they work.


The user's guide is really vague about this subject:

"If a method is marked as throwing an Exception that is not an 
instance or a subclass of java.rmi.RemoteException, then things are 
subtly different. The exception is no longer a SOAP Fault, but 
described as a wsdl:fault in the WSDL of the method. According to 
the JAX-RPC specification, your subclass of Exception must have 
accessor methods to access all the fields in the object to be 
marshalled /and/ a constructor that takes as parameters all the 
same fields (i.e, arguments of the same name and type). This is a 
kind of immutable variant of a normal JavaBean 
. The fields in the object 
must be of the datatypes that can be reliably mapped into WSDL.


If your exception meets this specification, then the WSDL 
describing the method will describe the exception too, enabling 
callers to create stub implementations of the exception, regardless 
of platform."


I was kind of hoping someone else out there would have had some 
experience with getting this to work.


-Jack

Jarmo Doc wrote:

I have an Axis client stub which was generated from WSDL. *All* of 
the client-side user-defined exceptions extend 
org.apache.axis.AxisFault.


The equivalent exceptions at the server also extend 
org.apache.axis.AxisFault, rather than Exception.


This is a decidedly dodgy area, imo, especially when it comes to 
interop with non-Axis clients.




From: Jack Lund <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: RE: Problems getting user exceptions to work
Date: Wed, 29 Mar 2006 14:51:47 -0600

Nope, didn't work. Wouldn't think it would - AxisFault isn't a 
subclass of InvalidDateException.


-Jack

Jarmo Doc wrote:


Try doing this:

catch (AxisFault ex)
{
if (ex instanceof InvalidDateException)
{
InvalidDateException myex = (InvalidDateException)ex;
// deal with myex here
}
// deal with others here
}



From: Jack Lund <[EMAIL PROTECTED]>
Reply-To:

wsdl2java simpleType - java mapping change

2006-03-30 Thread philippe ventrillon




 
Hello 

 
I need help on the 
following problem. I was using axis 1.1 and we are in front of a change in the 
wsdl2java generated code.
We have lots of xsd 
simple types with string base class and a pattern facet. 
With axis 1.1 we had a 
java class generated for this purpose.
With axis 1.3 we don't 
anymore have this class and have a String attribute in the Personne 
class
 
So my questions are 
:
Does anyone knows 
where this change comes from ?
Is it a bug or is it 
normal ?
Is there a way to get 
back to the previous behavior ?
 
Any help or 
information about this problem will be greatly appreciated.
 
Following is a sample 
which i used to reproduce the problem
-
st13.wsdl
xml version="1.0" encoding="UTF-8"?>







xsd:restriction>
xsd:simpleType> 





xsd:restriction>
xsd:simpleType>






xsd:element>
xsd:element>
xsd:element>
xsd:sequence>
xsd:complexType>


xsd:schema>
wsdl:types>



wsdl:message>


wsdl:message>
 
 




wsdl:operation>
wsdl:portType>







wsdl:input>


wsdl:output>
wsdl:operation>
wsdl:binding>




wsdl:port>
wsdl:service>
wsdl:definitions>
 
 

 
With axis 1.1 
wsdl2java st13.wsdl output  
INFO: Loaded namespace-to-package mapping file 
"E:\Local-PVentrillon\Work\java\soapapi\src\com\NStoPkg.properties".
Parsing XML file: 
E:\Local-PVentrillon\Work\java\soapapi\src\com\test\st13.wsdl
Generating 
com\test\bean\CodePolitesse.java
Generating com\test\bean\Personne.java
Generating 
com\test\bean\Personne_Helper.java
Generating com\test\bean\Nom.java
Generating com\test\bean\Nom_Helper.java
Generating com\test\St13Service.java
Generating 
com\test\St13ServiceLocator.java
Generating com\test\St13Port.java
Generating com\test\St13BindingStub.java
Generating 
com\test\St13BindingSkeleton.java
Generating com\test\St13BindingImpl.java
Generating com\test\deploy.wsdd
Generating com\test\undeploy.wsdd
---
With axis 1.3 
wsdl2java output   (no class com\test\bean\Nom.java 
generated)
Generating D:\tmp\com\test\www\schema\CodePolitesse.java
Generating D:\tmp\com\test\www\schema\Personne.java
Generating D:\tmp\com\test\www\schema\Personne_Helper.java
Generating D:\tmp\com\test\www\St13Service.java
Generating D:\tmp\com\test\www\St13ServiceLocator.java
Generating D:\tmp\com\test\www\St13Port.java
Generating D:\tmp\com\test\www\St13BindingStub.java
Generating D:\tmp\com\test\www\St13BindingSkeleton.java
Generating D:\tmp\com\test\www\St13BindingImpl.java
Generating D:\tmp\com\test\www\deploy.wsdd
Generating 
D:\tmp\com\test\www\undeploy.wsdd


Re: [SPAM] - Re: Problems getting user exceptions to work - Found word(s) check out in the Text body

2006-03-30 Thread Thom Hehl
Hmmm. Check your SOAP messae. Our problem is that we're sending the 
correct data from the server and the error happens during 
deserialization. If that's not it, it's a different problem.


Jack Lund wrote:

Thanks! I'd love to hear the workaround - I've tried everything I can. 
It looks like the problem is that the server side doesn't really know 
how to serialize the exception, even though it should.


-Jack

Thom Hehl wrote:

We had EXACTLY the same problem! We just found it and found a 
work-around, but believe this to be a bug in AXIS that should be 
fixed. The guy on our team that found it was going to write something 
up for the list. I'll ask him to step this up a bit as it would be of 
benefit to you.


Jack Lund wrote:

Yeah, I can see that that would be easier. Unfortunately, I have no 
control over the exceptions being thrown - I just need the 
client-side to be able to catch them *as* the exceptions that are 
originally thrown. I also am doing dynamic proxying rather than 
stubs/skeletons, so it makes it that more complicated.


>From the debugging I've been able to do, it looks like the fault 
coming across contains the fully-qualified package name of the 
exception class, but for some reason on the client side it's not 
creating the exception. Since this is an area where there's 
practically no documentation, I'm finding myself pretty much 
randomly trying different things and seeing if they work.


The user's guide is really vague about this subject:

"If a method is marked as throwing an Exception that is not an 
instance or a subclass of java.rmi.RemoteException, then things are 
subtly different. The exception is no longer a SOAP Fault, but 
described as a wsdl:fault in the WSDL of the method. According to 
the JAX-RPC specification, your subclass of Exception must have 
accessor methods to access all the fields in the object to be 
marshalled /and/ a constructor that takes as parameters all the same 
fields (i.e, arguments of the same name and type). This is a kind of 
immutable variant of a normal JavaBean 
. The fields in the object 
must be of the datatypes that can be reliably mapped into WSDL.


If your exception meets this specification, then the WSDL describing 
the method will describe the exception too, enabling callers to 
create stub implementations of the exception, regardless of platform."


I was kind of hoping someone else out there would have had some 
experience with getting this to work.


-Jack

Jarmo Doc wrote:

I have an Axis client stub which was generated from WSDL. *All* of 
the client-side user-defined exceptions extend 
org.apache.axis.AxisFault.


The equivalent exceptions at the server also extend 
org.apache.axis.AxisFault, rather than Exception.


This is a decidedly dodgy area, imo, especially when it comes to 
interop with non-Axis clients.




From: Jack Lund <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: RE: Problems getting user exceptions to work
Date: Wed, 29 Mar 2006 14:51:47 -0600

Nope, didn't work. Wouldn't think it would - AxisFault isn't a 
subclass of InvalidDateException.


-Jack

Jarmo Doc wrote:


Try doing this:

catch (AxisFault ex)
{
if (ex instanceof InvalidDateException)
{
InvalidDateException myex = (InvalidDateException)ex;
// deal with myex here
}
// deal with others here
}



From: Jack Lund <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: Problems getting user exceptions to work
Date: Wed, 29 Mar 2006 12:21:33 -0600

Hi. I'm using axis 1.2.1, and I'm trying to get the exceptions 
sent by my service thrown to the client. For instance, my 
service can throw an "InvalidDateException" exception, which is 
a subclass of java.lang.Exception, and I want the client code to 
get that exception. What little is said on the axis website 
about this implies that it should "just work", but it doesn't 
seem to - what I get on the other side is an AxisFault with the 
message string from my exception embedded inside.


Is there something special I have to do, on either side, to get 
this to work?


Thanks.

-Jack






_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/





_
Express yourself instantly with MSN Messenger! Download today - 
it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/









Re: [Axis2] 0.95 installation

2006-03-30 Thread Eran Chinthaka
Ken Campbell wrote:
> Hi Chinthaka,
> 
> Now that I understand the problem I just need to refactor my services.
> However, I am a bit confused when you say that you refactored om *after*
> 0.95. Does this mean the  refactoring is now *in* 0.95, or does it mean it
> will be in 0.96?

It will be in 0.96 and in the current svn head.

> 
> The Eclipse Axis code generator (which I downloaded from the 0.94 release)
> produces a skeleton for me which has methods like:
> 
>   public org.apache.axis2.om.OMElement getPage(
> org.apache.axis2.om.OMElement param0) {
> //Todo fill this with the necessary business logic
> return null;
> }
> 
> However, the 0.95 jars that I am using in my build path have
> org.apache.ws.common.om.OMElement. I am pointing at
> %TOMCAT_HOME%/webapps/axis2/WEB-INF/lib/axiom-api-0.95.jar which is the
> directory that the 'magic' axis2.war created.
> 
> Yet the svn repository (which I would have thought would have the latest
> source) is the same as the Eclipse generator signatures.

Let me explain this.

This time we didn't have enough time to improve eclipse tools. So I
think we didn't distribute any of the plugins.

Abt Axiom package refactoring :
Initially Axiom was a module within Axis2. So the package names was
org.apache.axis2.om. This is what you have with Axis2 0.94.
But since OM is a generic xml model, we moved that to commons project,
which gave it the packaging org.apache.ws.commons.om. This is what you
have with Axis2 0.95.
Now we again had to change the axiom packaging to give it a better
meaning. So the packaging became org.apache.axiom.om.
I hope this will be the last refactoring that we will do as far as axiom
is concerned. So you will not have any problems.

And I don't think you can use 0.94 eclipse plugin to be used with 0.95.
Ajith, hope the last statement is true..

-- Chinthaka



signature.asc
Description: OpenPGP digital signature


Re: [SPAM] - Re: Problems getting user exceptions to work - Found word(s) check out in the Text body

2006-03-30 Thread Jack Lund
Thanks! I'd love to hear the workaround - I've tried everything I can. 
It looks like the problem is that the server side doesn't really know 
how to serialize the exception, even though it should.


-Jack

Thom Hehl wrote:

We had EXACTLY the same problem! We just found it and found a 
work-around, but believe this to be a bug in AXIS that should be 
fixed. The guy on our team that found it was going to write something 
up for the list. I'll ask him to step this up a bit as it would be of 
benefit to you.


Jack Lund wrote:

Yeah, I can see that that would be easier. Unfortunately, I have no 
control over the exceptions being thrown - I just need the 
client-side to be able to catch them *as* the exceptions that are 
originally thrown. I also am doing dynamic proxying rather than 
stubs/skeletons, so it makes it that more complicated.


>From the debugging I've been able to do, it looks like the fault 
coming across contains the fully-qualified package name of the 
exception class, but for some reason on the client side it's not 
creating the exception. Since this is an area where there's 
practically no documentation, I'm finding myself pretty much randomly 
trying different things and seeing if they work.


The user's guide is really vague about this subject:

"If a method is marked as throwing an Exception that is not an 
instance or a subclass of java.rmi.RemoteException, then things are 
subtly different. The exception is no longer a SOAP Fault, but 
described as a wsdl:fault in the WSDL of the method. According to the 
JAX-RPC specification, your subclass of Exception must have accessor 
methods to access all the fields in the object to be marshalled /and/ 
a constructor that takes as parameters all the same fields (i.e, 
arguments of the same name and type). This is a kind of immutable 
variant of a normal JavaBean 
. The fields in the object 
must be of the datatypes that can be reliably mapped into WSDL.


If your exception meets this specification, then the WSDL describing 
the method will describe the exception too, enabling callers to 
create stub implementations of the exception, regardless of platform."


I was kind of hoping someone else out there would have had some 
experience with getting this to work.


-Jack

Jarmo Doc wrote:

I have an Axis client stub which was generated from WSDL. *All* of 
the client-side user-defined exceptions extend 
org.apache.axis.AxisFault.


The equivalent exceptions at the server also extend 
org.apache.axis.AxisFault, rather than Exception.


This is a decidedly dodgy area, imo, especially when it comes to 
interop with non-Axis clients.




From: Jack Lund <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: RE: Problems getting user exceptions to work
Date: Wed, 29 Mar 2006 14:51:47 -0600

Nope, didn't work. Wouldn't think it would - AxisFault isn't a 
subclass of InvalidDateException.


-Jack

Jarmo Doc wrote:


Try doing this:

catch (AxisFault ex)
{
if (ex instanceof InvalidDateException)
{
InvalidDateException myex = (InvalidDateException)ex;
// deal with myex here
}
// deal with others here
}



From: Jack Lund <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: Problems getting user exceptions to work
Date: Wed, 29 Mar 2006 12:21:33 -0600

Hi. I'm using axis 1.2.1, and I'm trying to get the exceptions 
sent by my service thrown to the client. For instance, my service 
can throw an "InvalidDateException" exception, which is a 
subclass of java.lang.Exception, and I want the client code to 
get that exception. What little is said on the axis website about 
this implies that it should "just work", but it doesn't seem to - 
what I get on the other side is an AxisFault with the message 
string from my exception embedded inside.


Is there something special I have to do, on either side, to get 
this to work?


Thanks.

-Jack





_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/





_
Express yourself instantly with MSN Messenger! Download today - it's 
FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/







Re: Axis 1.3 as Client AND Server

2006-03-30 Thread Roslan Amir
Hi,

Not a problem at all. I have done this before. The method in the implementation
class of B just uses the client API to invoke the Web Services on C and A. They
can even be the same Web Service. It's the URL's that are different. Make sure
you call using the correct URL.

Roslan Amir

Quoting Kim Alster Larsen <[EMAIL PROTECTED]>:

> Hi,
> 
> I'm using Axis 1.3, and I have a question on how to configure my server.
> 
> The setup I want to use Axis to implement is the following two scenarios:
> (B is the process that uses Axis)
> 1)
>  A sends a message to B,
> B forwards the call via Axis using SOAP to C.
> 
> 2)
> C sends a message to B,
> B forwards the message to A.
> In scenario 1) I guess the Axis component in B should be configured as a
> Client, but in scenario 2) the setup requires a server setup?
> 
> B is actually a process that publishes a webservice interface through
> axis. How is it possible to support both scenarios?
> 
> Any help or suggestions would be greatly appriciated!
> 
> -Kim
> 
> 
> 





This mail sent through IMP: https://webmail.xybase.com 


BeanDeserializer Error

2006-03-30 Thread Senthil Shamugam
I deployed the document/literal webserivce in JBOSS 
4.0.4RC1 using Axis 1.3. I generated the server/client 
from the hand written WSDL. When I'm trying to access from 
the client I'm getting the following error. It seems a 
common problem when using document/literal. Could any of 
you guide me to solve this error.


09:24:31,531 ERROR [ServerEngine] Server error: AxisFault
 faultCode: 
{http://schemas.xmlsoap.org/soap/envelope/}Client

 faultSubcode:
 faultString: Invalid element in 
com.bluecanopy.concierge.webservices.TravelItineraryRQ - 
Location

 faultActor:
 faultNode:
 faultDetail:
	{http://xml.apache.org/axis/}stackTrace: 
org.xml.sax.SAXException: Invalid element in 
com.bluecanopy.concierge.webservices.TravelItineraryRQ - 
Location
	at 
org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:455)
	at 
org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:1168)
	at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:244)
	at 
org.apache.axis.message.SOAPElementAxisImpl.publishToHandler(SOAPElementAxisImpl.java:1394)
	at 
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:266)
	at 
org.apache.axis.message.RPCElement.getParams(RPCElement.java:402)
	at 
org.apache.axis.providers.java.RPCInvocation.prepareFromRequestEnvelope(RPCInvocation.java:235)
	at 
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:103)
	at 
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:358)
	at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
	at 
org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:160)
	at 
org.apache.axis.SimpleChain.invoke(SimpleChain.java:123)
	at 
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:560)
	at 
org.apache.webservice.server.ServerEngine.invokeInternal(ServerEngine.java:215)
	at 
org.apache.webservice.server.ServerEngine.invoke(ServerEngine.java:104)
	at 
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:911)
	at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at 
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
	at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at 
com.bluecanopy.commons.web.TransactionFilter.doHttpFilter(TransactionFilter.java:105)
	at 
com.bluecanopy.commons.web.BaseHttpServletFilter.doFilter(BaseHttpServletFilter.java:62)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at 
org.apache.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at 
org.apache.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
	at 
org.apache.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
	at 
org.apache.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
	at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
	at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at 
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)

at java.lang.Thread.run(Thread.java:595)

The WSDL looks like the following


targetNamespace="http://bluecanopy.com/concierge/definitions"; 
xmlns:tns="http://bluecanopy.com/concierge/definitions"; 
xmlns:type="http://bluecanopy.com/concierge/types"; 
xmlns:ota="http://www.opentravel.org/OTA/2003/05"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns="http://schemas.xmlsoap.org/wsdl/";>


		http://www.w3.org/2001/XMLSchema"; 
targetNamespace="http://bluecanopy.com/concierge/types"; 
xmlns="http://bluecanopy.com/concierge/types"; 
elementFormDefault="qualified">



Re: Removing Temporary Files after response is sent

2006-03-30 Thread nocoz
Found a solution :

I use a destructor in my web services class : this constructor call the
cleanUpFolders() method described previously.

I imagine that once service execution was done, TOMCAT or AXIS (or whatever)
will destroy the webservice instance : and it seems to work.

After 5 web services call, the olders folders have been automatically destroyed
(garbage collector stuff I suppose)

Thanks again to whom who tried to solve my problem.

Selon [EMAIL PROTECTED]:

> Hello,
>
> I have recently created some web services using TOMCAT 5.5 and AXIS 1.3. The
> aim
> of those web services is to compute some data and to generate ZIP files.
> Those
> ZIP files are returned to client each time he calls the web service.
>
> The thing is that those ZIP files have to be removed from the server after
> each
> call.
>
> Here is how my web services look like
>
> 
> public DataHandler generateFile(String myParam){
>   MyConfig myConf = new MyConfig(); //generate a temporary folder on the
> server
> in which data will be stored and ZIP file created
>   ...
>   DataHandler ret = new DataHandlern(new FileDataSource(myConf.myZipFile));
>   return ret; // return the zip file to client
> }
> 
>
> The thing is that I can't manage to remove the temporary folder created once
> the
>  the 'return ret' has been done.
>
> I tried many things:
> . Deleting the temporary folder before calling 'return' -> I got a
> FileNotFoundException (can't send the file if the file no longer exists ;-) )
> . Deleting the temporary folder using a 'try ... finally' block as follows:
> 
> try{
>   return ret;
> }finally{
>   myConf.cleanUpFolders(); // method that remove temporary folder
> }
> 
> but I also got a FileNotFoundException (the 'return ret' can't find the ZIP
> file
>  I need to send, is it a kind of synchronizing problem?) -> file is deleted
> before client get the ZIP file
> . Third solution, creating a destructor in MyConfig class:
> 
> public void finalize(){
>   cleanUpFolders();
> }
> 
> The problem here is that the destructor is called only when I restart the
> server
> (and a server purpose is not to be restarted each hours)
>
> Is there any solution to remove those temporary files (that are stored on
> various places on the server hard drive) after each web service call ?
>
> Thanks for your help
>
> Nicolas Cottais
>
> PS: this is how my client retrieves the file from the web service:
> 
>  ret = (DataHandler) call.invoke(new Object[] { monparam});
>  FileOutputStream archive = new FileOutputStream(savePath);// savepath is
> c:\\test.zip
>  ret.writeTo(archive);
>  archive.close();
> 
>




Axis 1.3 as Client AND Server

2006-03-30 Thread Kim Alster Larsen

Hi,

I'm using Axis 1.3, and I have a question on how to configure my server.

The setup I want to use Axis to implement is the following two scenarios:
(B is the process that uses Axis)
1)
A sends a message to B,
B forwards the call via Axis using SOAP to C.

2)
C sends a message to B,
B forwards the message to A.
In scenario 1) I guess the Axis component in B should be configured as a
Client, but in scenario 2) the setup requires a server setup?

B is actually a process that publishes a webservice interface through
axis. How is it possible to support both scenarios?

Any help or suggestions would be greatly appriciated!

-Kim




Re: How to generate WSDL with my formal parameter names

2006-03-30 Thread Anne Thomas Manes
Did you compile the implClass with debug?On 3/30/06, Rhimbo <[EMAIL PROTECTED]> wrote:
Dies,Ah, sorry to be bothersome... I tried --implClass and it doesn'twork.  I also tried -i and it didn't work.I then tried using all "--" long arg names or all "-" short argnames.  Nothing worked.
Maybe I should sleep on it and tackle it tomorrow morning.  Pastexperience tells me I never solve the problem when frustrated.Has ANYONE got this to work?Thanks,Vartan--- Dies Koper <
[EMAIL PROTECTED]> wrote:> Try:> $ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl \>  --implClass FamilyImpl \>  -l"
http://10.196.130.245:8080/axis/services/familyAccounts" \>  -n urn:familyAccounts \>  -p"disney.dis.family" urn:familyAccounts \>  disney.dis.family.Family>> When you use the long option names, use two hyphens.
>> Regards,> Dies>>> Rhimbo wrote:> > Hello Dies,> >> > Still having trouble  I had already tried what you suggested.> > Here is what I did.
> >> > $ rm *.class> > $ javac -g FamilyImpl.java> > $ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl \> > -l"
http://10.196.130.245:8080/axis/services/familyAccounts" \> > -p"disney.dis.family" \> > urn:familyAccounts disney.dis.family.FamilyImpl> >> > I ran the command from my ../src/disney/dis/family directory.
> > I also ran it from the ../src directory (containing the> > ./disney/dis/family directory)> >> > I have no idea what's wrong.> >> > I get a WSDL file.  Here is an excerpt:
> >> >> > > > xmlns:apachesoap="http://xml.apache.org/xml-soap"
> > xmlns:impl="urn:familyAccounts" xmlns:intf="urn:familyAccounts"> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/
"> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/
"> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">> > 
> >  > >   > > xmlns="http://www.w3.org/2001/XMLSchema">
> >http://schemas.xmlsoap.org/soap/encoding/"/>> >
> > > >  > >   > > wsdl:arrayType="soapenc:string[]"/>
> >  > > > >> >   > >  > >> >
> >> >> >> >   > >   
> >   > >   > >   
> >> >   ...> >> >> >> > Vartan> >> >> >> >> >> > --- Dies Koper <
[EMAIL PROTECTED]> wrote:> >> >> Try:> >> javac -g FamilyImpl.java> >>> >> The interface class will NEVER get the original parameter names.> >>
> >> Regards,> >> Dies> >>> >>> >> Rhimbo wrote:> >>> Hello again all,>   >>> Does anyone know how to generate a WSDL that uses the formal
> >>> parameter names from the original source file... either the Java> >>> interface or the implement class?>  >>> I've tried every combination I can think of using the -implClass
> >>> command line argument to Java2WSDL, but I can't get it to work.>  >>> I want to generate my WSDL so it uses the formal parameter names in> >>> my methods instead of "in0", "in1", etc.
>  >>> I found the following URL:>   >>
http://publib.boulder.ibm.com/infocenter/wasinfo/v5r0/index.jsp?topic=/com.ibm.websphere.exp.doc/info/exp/ae/rwbs_java2wsdl.html> >>> This page has a much better explanation that the Apache> >>> documentation.  Nevertheless, I still can't generate a WSDL with
> >>> my formal parameter names.>  >>> Here is an excerpt from the explanation on the above URL:>  >>> "If the class is compiled without debug information, or if the
> >>>  class is an interface, the method parameter names are not> >>>  available.  In this case, you can use the -implClass argument> >>>  to provide an alternative class from which to obtain method
> >>>  parameter names. The impl-class does not need to implement> >>>  the class if the class is an interface, but it must implement> >>>  the same methods as class. "
>   >>> So I tried the following:>  >>> interface : Family.java> >>> implementing class: FamilyImpl.java
>  >>> First try by compiling interface with debug:>  >>> $ javac -g Family.java> >>> $ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl
 \> >>> -l"http://10.196.130.245:8080/axis/services/familyAccounts" \> >>> -n urn:familyAccounts \
> >>> -p"disney.dis.family" urn:familyAccounts \> >>> disney.dis.family.Family>   >>> Doesn't work.  family.wsdl still has "in0", ... etc.
>  >>> Then tried specifying alternate class file containing the> >>> implementation class:>  >>> $ java org.apache.axis.wsdl.Java2WSDL
 -o family.wsdl \> >>> -implClass FamilyImpl \> >>> -l"http://10.196.130.245:8080/axis/services/familyAccounts
" \> >>> -n urn:familyAccounts \> >>> -p"disney.dis.family" urn:familyAccounts \> >>> disney.dis.family.Family>  >>> Error:
> >>> java.lang.ClassNotFoundException: mplClass> >>> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)> >>> at java.security.AccessController.doPrivileged
(Native> Method)> >>> at> java.net.URLClassLoader.findClass(URLClassLoader.java:188)> >>> at java.lang.ClassLoader.l

Re: Axis java2wsdl fails WebSphere validator

2006-03-30 Thread Anne Thomas Manes
It's possible that WebSphere is rejecting the invalid URIs. Would you try replacing your current namespace URIs with valid URIs and seeing if you experience the same problem?If not, please send me the WSDL privately, and I'll see if I can figure out what's wrong.
On 3/30/06, Jarmo Doc <[EMAIL PROTECTED]> wrote:
Hi Anne, I'm not able (allowed) to post the complete WSDL online.  I couldemail it to a trusted party (for example, to you) but I realize that that'sprobably asking too much of you, and goes against the general compact of
newsgroups and this forum.>From: "Anne Thomas Manes" <[EMAIL PROTECTED]>>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org>Subject: Re: Axis java2wsdl fails WebSphere validator>Date: Thu, 30 Mar 2006 08:56:38 -0500>>Please provide the complete WSDL so that we can help you identify the
>problem.>>On 3/30/06, Jarmo Doc <[EMAIL PROTECTED]> wrote:> >> > Hi Anne, my apologies -- that's one thing that I left out of my original
> > post.  It's hard to separate the wheat from the chaff with WSDL (or more> > appropriately with my level of knowledge of WSDL).> >> > My 1st schema does indeed have  and my 2nd> > schema> > does have .  So, I'm stumped.> >> > Note that my namespaces are all Java-style package names such as 
a.b.c.> > They're not URL-style such as http://com.ibm.blob.> >> >> > >From: "Anne Thomas Manes" <
[EMAIL PROTECTED]>> > >Reply-To: axis-user@ws.apache.org> > >To: axis-user@ws.apache.org> > >Subject: Re: Axis java2wsdl fails WebSphere validator
> > >Date: Thu, 30 Mar 2006 08:25:14 -0500> > >> > >It's not the WSDL that's wrong, it's the schema. You must add an> > > after line 03. In order to reference an element or type
>from> > >another namespace, you must both declare the namespace and import it.> > (I'm> > >assuming that you purposefully left out a bunch of namespace>declarations> > >in
> > >the  element to save space.)> > >> > >01. > > >02. 
> > >03. > > >03.5 > > >04. 
> > >05. > > >06. > > >07. > > >08.   ... definition here ...
> > >09. > > >10. > > >11. > > >> > >On 3/30/06, Jarmo Doc <[EMAIL PROTECTED]
> wrote:> > > >> > > > Can you recommend an easily-downloadable validator?  The WSDL's not> > > > publicly> > > > available so web-sites that offer to validate based upon a URL won't
> > >work> > > > for me.> > > >> > > > I've run the WSDL through various XML validators and they all report> > >fine.> > > > I don't have a WSDL validator though and haven't been able to locate
> > > > anything good.  There is one at the pocketsoap site but it seems to> > > > require> > > > you to download half a dozen other things and then tweak a bunch of> > > > scripts
> > > > which is not exactly what I'd call convenient.> > > >> > > > PS the WSDL is very large, and proprietary, so I doubt I'll be able>to> > > > upload the whole thing.
> > > >> > > >> > > > >From: Dies Koper <[EMAIL PROTECTED]>> > > > >Reply-To: 
axis-user@ws.apache.org> > > > >To: axis-user@ws.apache.org> > > > >Subject: Re: Axis java2wsdl fails WebSphere validator> > > > >Date: Thu, 30 Mar 2006 10:58:35 +0900
> > > > >> > > > >Have you tried running it through a validating parser?> > > > >Please try and post the result.> > > > >#I could try if you post the whole WSDL before I go home tonight.
> > > > >> > > > >Regards,> > > > >Dies> > > > >> > > > >Jarmo Doc wrote:> > > > > > My WSDL document, generated directly from Java via Axis 
1.3> > >java2wsdl,> > > > > > is structured something like this:> > > > > >> > > > > > 01. >xmlns:tns2="x.y.z">> > > > > > 02. > > > > > > 03. >targetNamespace="a.b.c
> > ">> > > > > > 04. > > > > > > 05. > > > > > > 06. >targetNamespace="x.y.z> > ">> > > > > > 07. > > > > > > 08.   ... definition here ...> > > > > > 09. 
> > > > > > 10. > > > > > > 11. > > > > > >> > > > > > This WSDL appears to be quite acceptable to Axis' wsdl2java and
>to> > >the> > > > > > gSOAP equivalent.  However, WebSphere's wsdl2java does not like> > it.> > > > > > Specifically it complains that tns2:MyFault on line 04 cannot be
> > > > >resolved.> > > > > >> > > > > > So, a few questions:> > > > > >> > > > > > 1. is the type definition for MyFault on line 07 correct?  I had
> > > > assumed> > > > > > that it was implicitly in namespace x.y.z because that is the> > > > > > targetNamespace of the enclosing schema (line 06) and hence does
> > not> > > > > > need to be explicitly decorated with tns2.> > > > > >> > > > > > 2. Generally, is it valid to reference MyFault in schema #2 from
> > > > schema> > > > > > #1 in this way?> > > > > >> > > > > > 3. Any idea if this is a bug in WebSphere wsdl2java or in Axis> > > > >java2wsdl?
> > > > > >> > > > > > Thanks.> > > > >> > > > >> > > >> > > > _
> > > > On the road to retirement? Check out MSN Life Events for advice on>how> > >to> > > > get there! 
http://lifeevents.msn.com/category.aspx?cid=Retirement> > > >> > > >> >> > _> > Exp

Re: Axis java2wsdl fails WebSphere validator

2006-03-30 Thread Jarmo Doc
Hi Anne, I'm not able (allowed) to post the complete WSDL online.  I could 
email it to a trusted party (for example, to you) but I realize that that's 
probably asking too much of you, and goes against the general compact of 
newsgroups and this forum.




From: "Anne Thomas Manes" <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: Re: Axis java2wsdl fails WebSphere validator
Date: Thu, 30 Mar 2006 08:56:38 -0500

Please provide the complete WSDL so that we can help you identify the
problem.

On 3/30/06, Jarmo Doc <[EMAIL PROTECTED]> wrote:
>
> Hi Anne, my apologies -- that's one thing that I left out of my original
> post.  It's hard to separate the wheat from the chaff with WSDL (or more
> appropriately with my level of knowledge of WSDL).
>
> My 1st schema does indeed have  and my 2nd
> schema
> does have .  So, I'm stumped.
>
> Note that my namespaces are all Java-style package names such as a.b.c.
> They're not URL-style such as http://com.ibm.blob.
>
>
> >From: "Anne Thomas Manes" <[EMAIL PROTECTED]>
> >Reply-To: axis-user@ws.apache.org
> >To: axis-user@ws.apache.org
> >Subject: Re: Axis java2wsdl fails WebSphere validator
> >Date: Thu, 30 Mar 2006 08:25:14 -0500
> >
> >It's not the WSDL that's wrong, it's the schema. You must add an
> > after line 03. In order to reference an element or type 
from

> >another namespace, you must both declare the namespace and import it.
> (I'm
> >assuming that you purposefully left out a bunch of namespace 
declarations

> >in
> >the  element to save space.)
> >
> >01. 
> >02. 
> >03. 
> >03.5 
> >04. 
> >05. 
> >06. 
> >07. 
> >08.   ... definition here ...
> >09. 
> >10. 
> >11. 
> >
> >On 3/30/06, Jarmo Doc <[EMAIL PROTECTED]> wrote:
> > >
> > > Can you recommend an easily-downloadable validator?  The WSDL's not
> > > publicly
> > > available so web-sites that offer to validate based upon a URL won't
> >work
> > > for me.
> > >
> > > I've run the WSDL through various XML validators and they all report
> >fine.
> > > I don't have a WSDL validator though and haven't been able to locate
> > > anything good.  There is one at the pocketsoap site but it seems to
> > > require
> > > you to download half a dozen other things and then tweak a bunch of
> > > scripts
> > > which is not exactly what I'd call convenient.
> > >
> > > PS the WSDL is very large, and proprietary, so I doubt I'll be able 
to

> > > upload the whole thing.
> > >
> > >
> > > >From: Dies Koper <[EMAIL PROTECTED]>
> > > >Reply-To: axis-user@ws.apache.org
> > > >To: axis-user@ws.apache.org
> > > >Subject: Re: Axis java2wsdl fails WebSphere validator
> > > >Date: Thu, 30 Mar 2006 10:58:35 +0900
> > > >
> > > >Have you tried running it through a validating parser?
> > > >Please try and post the result.
> > > >#I could try if you post the whole WSDL before I go home tonight.
> > > >
> > > >Regards,
> > > >Dies
> > > >
> > > >Jarmo Doc wrote:
> > > > > My WSDL document, generated directly from Java via Axis 1.3
> >java2wsdl,
> > > > > is structured something like this:
> > > > >
> > > > > 01. xmlns:tns2="x.y.z">

> > > > > 02. 
> > > > > 03. targetNamespace="a.b.c

> ">
> > > > > 04. 
> > > > > 05. 
> > > > > 06. targetNamespace="x.y.z

> ">
> > > > > 07. 
> > > > > 08.   ... definition here ...
> > > > > 09. 
> > > > > 10. 
> > > > > 11. 
> > > > >
> > > > > This WSDL appears to be quite acceptable to Axis' wsdl2java and 
to

> >the
> > > > > gSOAP equivalent.  However, WebSphere's wsdl2java does not like
> it.
> > > > > Specifically it complains that tns2:MyFault on line 04 cannot be
> > > >resolved.
> > > > >
> > > > > So, a few questions:
> > > > >
> > > > > 1. is the type definition for MyFault on line 07 correct?  I had
> > > assumed
> > > > > that it was implicitly in namespace x.y.z because that is the
> > > > > targetNamespace of the enclosing schema (line 06) and hence does
> not
> > > > > need to be explicitly decorated with tns2.
> > > > >
> > > > > 2. Generally, is it valid to reference MyFault in schema #2 from
> > > schema
> > > > > #1 in this way?
> > > > >
> > > > > 3. Any idea if this is a bug in WebSphere wsdl2java or in Axis
> > > >java2wsdl?
> > > > >
> > > > > Thanks.
> > > >
> > > >
> > >
> > > _
> > > On the road to retirement? Check out MSN Life Events for advice on 
how

> >to
> > > get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
> > >
> > >
>
> _
> Express yourself instantly with MSN Messenger! Download today - it's 
FREE!

> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>


_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/




Enum -> xsd:restriction

2006-03-30 Thread Stefan Freyr Stefansson
Hello.

I've been working on this all morning and I'm just not solving this!

I apologise, I know this must have been asked before but none of the 
discussions I found solved my problem.

What I'm trying to do is generate a WSDL file from my Java source code. I want 
one of the parameters to a method in my service class to be an enumeration of 
values. From the web I've read that this should be possible by using the 
typesafe enumeration pattern in the Java code.

What I'm looking for is that in the end (after the WSDL has been generated) 
the aforementioned parameter contains the following "restriction" in the 
WSDL:


  


So for this I've created the EpgFormatEnum class which represents the 
enumeration and the actual service class which contains the following method:

  public void importEpgAssets(EpgFormatEnum format, String data){}

I created an ant build script that runs the  target on the 
service class.

I'm attaching the build file, enumeration class and complete output from 
running the Ant target for reference.

The problem is that whenever I run the java2wsdl target I get the following 
exception:

30.3.2006 13:57:16 org.apache.axis.wsdl.fromJava.Emitter writePartToMessage
WARNING: Please register a typemapping/beanmapping for 
'com.mycompany1.myproduct.management.EpgFormatEnum'
java.lang.ExceptionInInitializerError
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at 
sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
at 
sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:917)
at java.lang.reflect.Field.getFieldAccessor(Field.java:898)
at java.lang.reflect.Field.get(Field.java:357)
at org.apache.axis.wsdl.fromJava.Types.writeEnumType(Types.java:1211)
at 
org.apache.axis.encoding.ser.EnumSerializer.writeSchema(EnumSerializer.java:86)
at org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1849)
...

The stacktrace suggests that Axis is trying to create some enumerated type but 
something is not going the way it should. If I change the method in the 
service class to receive simple types such as strings as parameters 
everything works fine.

Any help with this would be greatly appreciated.

Kind regards, Stefan Freyr.
/usr/lib/j2sdk1.5-sun/bin/java -Xmx128m 
-Dant.home=/home/stefan/apps/idea-irida/idea-4155/lib/ant -Dfile.encoding=UTF-8 
-classpath 
/home/stefan/mycompany2/svn/myproduct/library/static/axis/axis-ant.jar:/home/stefan/mycompany2/svn/myproduct/library/static/axis/axis.jar:/home/stefan/mycompany2/svn/myproduct/library/static/axis/commons-discovery-0.2.jar:/home/stefan/mycompany2/svn/myproduct/library/static/axis/jaxrpc.jar:/home/stefan/mycompany2/svn/myproduct/library/static/axis/saaj.jar:/home/stefan/mycompany2/svn/myproduct/library/static/axis/wsdl4j-1.5.1.jar:/home/stefan/mycompany2/svn/myproduct/library/static/activation.jar:/home/stefan/mycompany2/svn/myproduct/library/static/commons-logging-1.0.4.jar:/home/stefan/mycompany2/svn/myproduct/library/static/mail.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-antlr.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-apache-bcel.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-apache-bsf.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-apache-log4j.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-apache-oro.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-apache-regexp.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-apache-resolver.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-commons-logging.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-commons-net.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-icontract.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-jai.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-javamail.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-jdepend.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-jmf.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-jsch.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-junit.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-launcher.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-netrexx.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-nodeps.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-starteam.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-stylebook.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-swing.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-trax.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-vaj.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-weblogic.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-xalan1.jar:/home/stefan/apps/idea-irida/idea-4155/lib/ant/lib/ant-xslp.jar:/home/stefan/

Re: [axis2] - 0.95 - WSDL2Java

2006-03-30 Thread Anne Thomas Manes
When using RPC style, your message parts must reference types rather than elements.AnneOn 3/30/06, Ameet Hasmucrai Amarchande <
[EMAIL PROTECTED]> wrote:Hi Ken,That's what I thought. But when I changed it to "rpc", it gave this error when I was trying to generate the classes:
--Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: org.apache.axis2.schema.SchemaCompilationException
: java.lang.NullPointerExceptionat org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:146)at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)Caused by: java.lang.RuntimeException: org.apache.axis2.schema.SchemaCompilationException: java.lang.NullPointerExceptionat 
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:162)at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:101)... 2 more
Caused by: org.apache.axis2.schema.SchemaCompilationException: java.lang.NullPointerExceptionat org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:184)at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage
(SimpleDBExtension.java:115)... 3 moreCaused by: java.lang.NullPointerExceptionat org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:354)at org.apache.axis2.schema.SchemaCompiler.processElement
(SchemaCompiler.java:338)at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:403)at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:328)
at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:899)at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:862)at org.apache.axis2.schema.SchemaCompiler.processComplexType
(SchemaCompiler.java:631)at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:604)at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java
:569)at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:444)at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:338)at org.apache.axis2.schema.SchemaCompiler.compile
(SchemaCompiler.java:220)at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:179)... 4 more--
Thanks,Ameet-Original Message-From: Ken Campbell [mailto:[EMAIL PROTECTED]]Sent: quinta-feira, 30 de Março de 2006 9:36
To: axis-user@ws.apache.orgSubject: RE: [axis2] - 0.95 - WSDL2JavaHi Ameet,Perhaps your problem is here :...
  ...Regards,Ken-Original Message-From: Ameet Hasmucrai Amarchande [mailto:[EMAIL PROTECTED]]
Sent: 29 March 2006 16:57To: axis-user@ws.apache.orgSubject: RE: [axis2] - 0.95 - WSDL2JavaOk, here it is.


Re: Axis java2wsdl fails WebSphere validator

2006-03-30 Thread Anne Thomas Manes
Please provide the complete WSDL so that we can help you identify the problem.On 3/30/06, Jarmo Doc <[EMAIL PROTECTED]
> wrote:Hi Anne, my apologies -- that's one thing that I left out of my original
post.  It's hard to separate the wheat from the chaff with WSDL (or moreappropriately with my level of knowledge of WSDL).My 1st schema does indeed have  and my 2nd schema
does have .  So, I'm stumped.Note that my namespaces are all Java-style package names such as a.b.c.They're not URL-style such as http://com.ibm.blob
.>From: "Anne Thomas Manes" <[EMAIL PROTECTED]>>Reply-To: axis-user@ws.apache.org>To: 
axis-user@ws.apache.org>Subject: Re: Axis java2wsdl fails WebSphere validator>Date: Thu, 30 Mar 2006 08:25:14 -0500>>It's not the WSDL that's wrong, it's the schema. You must add an> after line 03. In order to reference an element or type from
>another namespace, you must both declare the namespace and import it. (I'm>assuming that you purposefully left out a bunch of namespace declarations>in>the  element to save space.)
>>01. >02. >03. >03.5 >04. >05. >06. >07. >08.   ... definition here ...>09. >10. >11. >>On 3/30/06, Jarmo Doc <
[EMAIL PROTECTED]> wrote:> >> > Can you recommend an easily-downloadable validator?  The WSDL's not> > publicly> > available so web-sites that offer to validate based upon a URL won't
>work> > for me.> >> > I've run the WSDL through various XML validators and they all report>fine.> > I don't have a WSDL validator though and haven't been able to locate
> > anything good.  There is one at the pocketsoap site but it seems to> > require> > you to download half a dozen other things and then tweak a bunch of> > scripts> > which is not exactly what I'd call convenient.
> >> > PS the WSDL is very large, and proprietary, so I doubt I'll be able to> > upload the whole thing.> >> >> > >From: Dies Koper <
[EMAIL PROTECTED]>> > >Reply-To: axis-user@ws.apache.org> > >To: axis-user@ws.apache.org> > >Subject: Re: Axis java2wsdl fails WebSphere validator
> > >Date: Thu, 30 Mar 2006 10:58:35 +0900> > >> > >Have you tried running it through a validating parser?> > >Please try and post the result.> > >#I could try if you post the whole WSDL before I go home tonight.
> > >> > >Regards,> > >Dies> > >> > >Jarmo Doc wrote:> > > > My WSDL document, generated directly from Java via Axis 1.3>java2wsdl,
> > > > is structured something like this:> > > >> > > > 01. > > > > 02. 
> > > > 03. > > > > 04. > > > > 05. 
> > > > 06. > > > > 07. > > > > 08.   ... definition here ...
> > > > 09. > > > > 10. > > > > 11. > > > >> > > > This WSDL appears to be quite acceptable to Axis' wsdl2java and to
>the> > > > gSOAP equivalent.  However, WebSphere's wsdl2java does not like it.> > > > Specifically it complains that tns2:MyFault on line 04 cannot be> > >resolved.
> > > >> > > > So, a few questions:> > > >> > > > 1. is the type definition for MyFault on line 07 correct?  I had> > assumed> > > > that it was implicitly in namespace 
x.y.z because that is the> > > > targetNamespace of the enclosing schema (line 06) and hence does not> > > > need to be explicitly decorated with tns2.> > > >> > > > 2. Generally, is it valid to reference MyFault in schema #2 from
> > schema> > > > #1 in this way?> > > >> > > > 3. Any idea if this is a bug in WebSphere wsdl2java or in Axis> > >java2wsdl?> > > >
> > > > Thanks.> > >> > >> >> > _> > On the road to retirement? Check out MSN Life Events for advice on how
>to> > get there! http://lifeevents.msn.com/category.aspx?cid=Retirement> >> >_
Express yourself instantly with MSN Messenger! Download today - it's FREE!http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



Re: How to reproduce "WSDL2Java okay"+"uncompilable code generated"

2006-03-30 Thread Anne Thomas Manes
There are other problems with this WSDL besides the wrong qnames in your message parts. (Note that they aren't unqualified because there is a default namespace (the wsdl namespace); but these elements are in the xsd1 namespace.) 
When using RPC style, your message parts must reference types, not elements. To fix the WSDL, either change the style to "document" (and remove the namespace attributes from the  definitions) or change the message parts to reference types rather than elements.
I disagree with you that wsdl2java should have a built-in WSDL validator and should be able to catch all WSDL errors. As a best practice, you should validate your WSDL before running wsdl2java. Many WSDL editors provide WSDL validators. I'm not aware of an open source WSDL validator, though. (Perhaps someone would like to volunteer to build one?) I do think that wsdl2java should generate an error when it encounters an unresolvable reference, though. 
e.g.,"http://schemas.xmlsoap.org/wsdl/}echoStringParam is referenced but not defined"Anne
On 3/30/06, Morten Mortensen <[EMAIL PROTECTED]> wrote:
I can now directly provoke, what I said yesterday: WSDL2Java runningsmoothly, but the generated coded in an uncompilable state!To reproduce, take the "Axis2SampleDocLit.wsdl" from the 0.95distribution, make the error like I did in my own WSDL by removing the
qualification from the message-elements like this (see the attachedfile; slightly modified variant of the original sample):Change e.g. -  <- remove
"xsd1"- into - <- no "xsd1"
Now the WSDL2Java runs without any errors, but the compilation failssince the code shown in my original message below is produced.I think, that there ought to be a negative test-case for WSDL2Java with
this type of WSDL!It is very good, that given correct WSDL, then all is fine - but in reallife, we fiddle with WSDL for a long time, maybe do not get it right forthe first number of times and then it is important to have tools like
WSDL2Java do some aggressive verification of the WSDL...Having to track down the cause of generated, uncompilable code is tootough.Developers - are you listening?Regards,Morten Sabroe Mortensen
-Oprindelig meddelelse-Fra: Morten MortensenSendt: 29. marts 2006 17:38Til: axis-user@ws.apache.orgEmne: Mode "Document/literal" vs. "Document/literal wrapped"
Hi allWith the 0.95 version, how come I can use WSDL2Java to generate*un-compilable* code?Apparently, when I write WSDL as "Document/literal wrapped", thegenerated "XXXReceiverInOut" has bad "toOM()", "fromOM()" and
"toEnvelope()" (for an example, see the below "toOM()"-implementation;the parameter does not have the right type!).Why does this happen? What to do?Regards,Morten Sabroe Mortensen
---   ...private  org.apache.ws.commons.om.OMElementtoOM(org.apache.ws.commons.om.OMElement param){if (param instanceoforg.apache.axis2.databinding.ADBBean
){org.apache.ws.commons.om.impl.builder.StAXOMBuilder builder = neworg.apache.ws.commons.om.impl.builder.StAXOMBuilder(org.apache.ws.commons.om.OMAbstractFactory.getOMFactory(),param.getPullParser(
org.apache.ws.commons.om.OMElement.MY_QNAME));org.apache.ws.commons.om.OMElementdocumentElement = builder.getDocumentElement();((org.apache.ws.commons.om.impl.OMNodeEx
)documentElement).setParent(null); // remove the parent linkreturn documentElement;}else{   //todo finish this onece the bean serializer
has the necessary methodsreturn null;}}   ...---


RE: [Axis2] 0.95 installation

2006-03-30 Thread Ken Campbell
Hi Chinthaka,

Now that I understand the problem I just need to refactor my services.
However, I am a bit confused when you say that you refactored om *after*
0.95. Does this mean the  refactoring is now *in* 0.95, or does it mean it
will be in 0.96?

The Eclipse Axis code generator (which I downloaded from the 0.94 release)
produces a skeleton for me which has methods like:

  public org.apache.axis2.om.OMElement getPage(
org.apache.axis2.om.OMElement param0) {
//Todo fill this with the necessary business logic
return null;
}

However, the 0.95 jars that I am using in my build path have
org.apache.ws.common.om.OMElement. I am pointing at
%TOMCAT_HOME%/webapps/axis2/WEB-INF/lib/axiom-api-0.95.jar which is the
directory that the 'magic' axis2.war created.

Yet the svn repository (which I would have thought would have the latest
source) is the same as the Eclipse generator signatures.

Which is the old package name and which is the new?

Regards,
Ken

-Original Message-
From: Eran Chinthaka [mailto:[EMAIL PROTECTED] 
Sent: 30 March 2006 12:38
To: axis-user@ws.apache.org
Subject: Re: [Axis2] 0.95 installation

Hi Ken,

Soon after Axis2 0.95 release I did a package name refactoring in OM. So
you will not able to use the latest om with Axis2 0.95.

But if you are only using the jars came with the release, you wouldn't
have got this issue.

Are you saying that you are getting errors even when using the jars came
 in Axis2 0.95 ? If yes, let us reproduce the problem and we'll see what
we can do.

-- Chinthaka






Re: Axis java2wsdl fails WebSphere validator

2006-03-30 Thread Jarmo Doc
Hi Anne, my apologies -- that's one thing that I left out of my original 
post.  It's hard to separate the wheat from the chaff with WSDL (or more 
appropriately with my level of knowledge of WSDL).


My 1st schema does indeed have  and my 2nd schema 
does have .  So, I'm stumped.


Note that my namespaces are all Java-style package names such as a.b.c. 
They're not URL-style such as http://com.ibm.blob.




From: "Anne Thomas Manes" <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: Re: Axis java2wsdl fails WebSphere validator
Date: Thu, 30 Mar 2006 08:25:14 -0500

It's not the WSDL that's wrong, it's the schema. You must add an
 after line 03. In order to reference an element or type from
another namespace, you must both declare the namespace and import it. (I'm
assuming that you purposefully left out a bunch of namespace declarations 
in

the  element to save space.)

01. 
02. 
03. 
03.5 
04. 
05. 
06. 
07. 
08.   ... definition here ...
09. 
10. 
11. 

On 3/30/06, Jarmo Doc <[EMAIL PROTECTED]> wrote:
>
> Can you recommend an easily-downloadable validator?  The WSDL's not
> publicly
> available so web-sites that offer to validate based upon a URL won't 
work

> for me.
>
> I've run the WSDL through various XML validators and they all report 
fine.

> I don't have a WSDL validator though and haven't been able to locate
> anything good.  There is one at the pocketsoap site but it seems to
> require
> you to download half a dozen other things and then tweak a bunch of
> scripts
> which is not exactly what I'd call convenient.
>
> PS the WSDL is very large, and proprietary, so I doubt I'll be able to
> upload the whole thing.
>
>
> >From: Dies Koper <[EMAIL PROTECTED]>
> >Reply-To: axis-user@ws.apache.org
> >To: axis-user@ws.apache.org
> >Subject: Re: Axis java2wsdl fails WebSphere validator
> >Date: Thu, 30 Mar 2006 10:58:35 +0900
> >
> >Have you tried running it through a validating parser?
> >Please try and post the result.
> >#I could try if you post the whole WSDL before I go home tonight.
> >
> >Regards,
> >Dies
> >
> >Jarmo Doc wrote:
> > > My WSDL document, generated directly from Java via Axis 1.3 
java2wsdl,

> > > is structured something like this:
> > >
> > > 01. 
> > > 02. 
> > > 03. 
> > > 04. 
> > > 05. 
> > > 06. 
> > > 07. 
> > > 08.   ... definition here ...
> > > 09. 
> > > 10. 
> > > 11. 
> > >
> > > This WSDL appears to be quite acceptable to Axis' wsdl2java and to 
the

> > > gSOAP equivalent.  However, WebSphere's wsdl2java does not like it.
> > > Specifically it complains that tns2:MyFault on line 04 cannot be
> >resolved.
> > >
> > > So, a few questions:
> > >
> > > 1. is the type definition for MyFault on line 07 correct?  I had
> assumed
> > > that it was implicitly in namespace x.y.z because that is the
> > > targetNamespace of the enclosing schema (line 06) and hence does not
> > > need to be explicitly decorated with tns2.
> > >
> > > 2. Generally, is it valid to reference MyFault in schema #2 from
> schema
> > > #1 in this way?
> > >
> > > 3. Any idea if this is a bug in WebSphere wsdl2java or in Axis
> >java2wsdl?
> > >
> > > Thanks.
> >
> >
>
> _
> On the road to retirement? Check out MSN Life Events for advice on how 
to

> get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
>
>


_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




Re: Axis java2wsdl fails WebSphere validator

2006-03-30 Thread Anne Thomas Manes
It's not the WSDL that's wrong, it's the schema. You must add an  after line 03. In order to reference an element or type from another namespace, you must both declare the namespace and import it. (I'm assuming that you purposefully left out a bunch of namespace declarations  in the  element to save space.)
01. 02. 03. 
03.5 04. 05. 06. 07. 08.   ... definition here ...09. 10. 11. On 3/30/06, 
Jarmo Doc <[EMAIL PROTECTED]> wrote:
Can you recommend an easily-downloadable validator?  The WSDL's not publiclyavailable so web-sites that offer to validate based upon a URL won't workfor me.I've run the WSDL through various XML validators and they all report fine.
I don't have a WSDL validator though and haven't been able to locateanything good.  There is one at the pocketsoap site but it seems to requireyou to download half a dozen other things and then tweak a bunch of scripts
which is not exactly what I'd call convenient.PS the WSDL is very large, and proprietary, so I doubt I'll be able toupload the whole thing.>From: Dies Koper <
[EMAIL PROTECTED]>>Reply-To: axis-user@ws.apache.org>To: axis-user@ws.apache.org>Subject: Re: Axis java2wsdl fails WebSphere validator
>Date: Thu, 30 Mar 2006 10:58:35 +0900>>Have you tried running it through a validating parser?>Please try and post the result.>#I could try if you post the whole WSDL before I go home tonight.
>>Regards,>Dies>>Jarmo Doc wrote:> > My WSDL document, generated directly from Java via Axis 1.3 java2wsdl,> > is structured something like this:> >> > 01. > > 02. > > 03. > > 04. 
> > 05. > > 06. > > 07. > > 08.   ... definition here ...
> > 09. > > 10. > > 11. > >> > This WSDL appears to be quite acceptable to Axis' wsdl2java and to the> > gSOAP equivalent.  However, WebSphere's wsdl2java does not like it.
> > Specifically it complains that tns2:MyFault on line 04 cannot be>resolved.> >> > So, a few questions:> >> > 1. is the type definition for MyFault on line 07 correct?  I had assumed
> > that it was implicitly in namespace x.y.z because that is the> > targetNamespace of the enclosing schema (line 06) and hence does not> > need to be explicitly decorated with tns2.> >
> > 2. Generally, is it valid to reference MyFault in schema #2 from schema> > #1 in this way?> >> > 3. Any idea if this is a bug in WebSphere wsdl2java or in Axis>java2wsdl?
> >> > Thanks.>>_On the road to retirement? Check out MSN Life Events for advice on how toget there! 
http://lifeevents.msn.com/category.aspx?cid=Retirement


Re: How to prevent WSDL2Java from overwriting my interface file?

2006-03-30 Thread Rick Reumann
On 3/30/06, Rhimbo <[EMAIL PROTECTED]> wrote:


> How do I prevent WSDL2Java from overwriting my interface file?



> This command overwrites my Family.java file.
>
> I know I can specify
>-o .
>
> as an option and WSDL2Java will create a disney/dis/family
> hierarchy underneath my current directory.

Actually wouldn't that above would just make them in the same directory?

> But then I have to move the generated files to my current directory
> in order to compile everything.
>
> I'm sure there is a "best practice" that solves this problem.
>
> Is there a command line option that tells WSDL2Java "don't
> overwrite".

I'm new to axis and web services, so I might be stating something
incorrectly, but I was basically confused by the same issue. None of
the simple lessons or tutorials I was doing online really mentioned
this behavior so I was cofused at first, so I'm not sure of the 'best
practice.' However, as was mentioned to me in a recent post it's ok
that they are overwritten and if you don't want them overwritten, you
have to build them to a different directory. If you look at what's
generated (in the overwritten files) you'll see that what axis changes
is obviously necessary so those generated files need to be somwhere
(you can't just say 'don't make them' since they are obviously
needed).

I actually don't mind them being replaced and just using the replaced
ones. Is there a reason why you don't want to just work with the newly
generated classes?

Also, I'm not sure what you mean by having to move the generated
classes back into the original directory. If you do that, and leave
out the generated ones that you think are 'duplicates' I don't see how
your web service will work when you deploy it. (It'll compile locally
but does the web service work). Also, even if you do have the
generated files go to a new pacakge, the files should still compile
ok.

I wouldn't minding knowing either, though, if most experiecned axis
users just work with files that overwrite the initial ones, or if they
use ones generated to a new package.

Another thing that sort of hit me also, that I could be wrong about,
is that some people I think generate their wsdl file first before even
creating any Java files  - so they then use the WSDL2Java to make
their stubs and create what the other supporting classes they need. 
(In other words they aren't using Java2WSDL to make a wsdl from
existing classes, they are possibly creating the wsdl manually with
their own schema inside and then using WSDL2Java).

--
Rick


Re: Axis java2wsdl fails WebSphere validator

2006-03-30 Thread Jarmo Doc
Can you recommend an easily-downloadable validator?  The WSDL's not publicly 
available so web-sites that offer to validate based upon a URL won't work 
for me.


I've run the WSDL through various XML validators and they all report fine.  
I don't have a WSDL validator though and haven't been able to locate 
anything good.  There is one at the pocketsoap site but it seems to require 
you to download half a dozen other things and then tweak a bunch of scripts 
which is not exactly what I'd call convenient.


PS the WSDL is very large, and proprietary, so I doubt I'll be able to 
upload the whole thing.




From: Dies Koper <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: Re: Axis java2wsdl fails WebSphere validator
Date: Thu, 30 Mar 2006 10:58:35 +0900

Have you tried running it through a validating parser?
Please try and post the result.
#I could try if you post the whole WSDL before I go home tonight.

Regards,
Dies

Jarmo Doc wrote:
> My WSDL document, generated directly from Java via Axis 1.3 java2wsdl,
> is structured something like this:
>
> 01. 
> 02. 
> 03. 
> 04. 
> 05. 
> 06. 
> 07. 
> 08.   ... definition here ...
> 09. 
> 10. 
> 11. 
>
> This WSDL appears to be quite acceptable to Axis' wsdl2java and to the
> gSOAP equivalent.  However, WebSphere's wsdl2java does not like it.
> Specifically it complains that tns2:MyFault on line 04 cannot be 
resolved.

>
> So, a few questions:
>
> 1. is the type definition for MyFault on line 07 correct?  I had assumed
> that it was implicitly in namespace x.y.z because that is the
> targetNamespace of the enclosing schema (line 06) and hence does not
> need to be explicitly decorated with tns2.
>
> 2. Generally, is it valid to reference MyFault in schema #2 from schema
> #1 in this way?
>
> 3. Any idea if this is a bug in WebSphere wsdl2java or in Axis 
java2wsdl?

>
> Thanks.




_
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement




Re: Problems getting user exceptions to work

2006-03-30 Thread Thom Hehl
We had EXACTLY the same problem! We just found it and found a 
work-around, but believe this to be a bug in AXIS that should be fixed. 
The guy on our team that found it was going to write something up for 
the list. I'll ask him to step this up a bit as it would be of benefit 
to you.


Jack Lund wrote:

Yeah, I can see that that would be easier. Unfortunately, I have no 
control over the exceptions being thrown - I just need the client-side 
to be able to catch them *as* the exceptions that are originally 
thrown. I also am doing dynamic proxying rather than stubs/skeletons, 
so it makes it that more complicated.


>From the debugging I've been able to do, it looks like the fault 
coming across contains the fully-qualified package name of the 
exception class, but for some reason on the client side it's not 
creating the exception. Since this is an area where there's 
practically no documentation, I'm finding myself pretty much randomly 
trying different things and seeing if they work.


The user's guide is really vague about this subject:

"If a method is marked as throwing an Exception that is not an 
instance or a subclass of java.rmi.RemoteException, then things are 
subtly different. The exception is no longer a SOAP Fault, but 
described as a wsdl:fault in the WSDL of the method. According to the 
JAX-RPC specification, your subclass of Exception must have accessor 
methods to access all the fields in the object to be marshalled /and/ 
a constructor that takes as parameters all the same fields (i.e, 
arguments of the same name and type). This is a kind of immutable 
variant of a normal JavaBean . 
The fields in the object must be of the datatypes that can be reliably 
mapped into WSDL.


If your exception meets this specification, then the WSDL describing 
the method will describe the exception too, enabling callers to create 
stub implementations of the exception, regardless of platform."


I was kind of hoping someone else out there would have had some 
experience with getting this to work.


-Jack

Jarmo Doc wrote:

I have an Axis client stub which was generated from WSDL. *All* of 
the client-side user-defined exceptions extend 
org.apache.axis.AxisFault.


The equivalent exceptions at the server also extend 
org.apache.axis.AxisFault, rather than Exception.


This is a decidedly dodgy area, imo, especially when it comes to 
interop with non-Axis clients.




From: Jack Lund <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: RE: Problems getting user exceptions to work
Date: Wed, 29 Mar 2006 14:51:47 -0600

Nope, didn't work. Wouldn't think it would - AxisFault isn't a 
subclass of InvalidDateException.


-Jack

Jarmo Doc wrote:


Try doing this:

catch (AxisFault ex)
{
if (ex instanceof InvalidDateException)
{
InvalidDateException myex = (InvalidDateException)ex;
// deal with myex here
}
// deal with others here
}



From: Jack Lund <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: Problems getting user exceptions to work
Date: Wed, 29 Mar 2006 12:21:33 -0600

Hi. I'm using axis 1.2.1, and I'm trying to get the exceptions 
sent by my service thrown to the client. For instance, my service 
can throw an "InvalidDateException" exception, which is a subclass 
of java.lang.Exception, and I want the client code to get that 
exception. What little is said on the axis website about this 
implies that it should "just work", but it doesn't seem to - what 
I get on the other side is an AxisFault with the message string 
from my exception embedded inside.


Is there something special I have to do, on either side, to get 
this to work?


Thanks.

-Jack




_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/





_
Express yourself instantly with MSN Messenger! Download today - it's 
FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/





Re: [Axis2] 0.95 installation

2006-03-30 Thread Eran Chinthaka
Hi Ken,

Soon after Axis2 0.95 release I did a package name refactoring in OM. So
you will not able to use the latest om with Axis2 0.95.

But if you are only using the jars came with the release, you wouldn't
have got this issue.

Are you saying that you are getting errors even when using the jars came
 in Axis2 0.95 ? If yes, let us reproduce the problem and we'll see what
we can do.

-- Chinthaka





signature.asc
Description: OpenPGP digital signature


RE: [Axis2] 0.95 installation

2006-03-30 Thread Ken Campbell
Hi Chinthaka,

I found the solution today: the problems only came about when I dropped a
service into axis2. 
I downloaded the axis2 source from http://svn.apache.org/repos/asf to try
and track the problem and discovered that none of that source will build
largely because it uses org.apache.axis2.om package structure instead of
org.apache.ws.commons.om.

Seemingly, all the service archives that I have dropped in have been using 
these package names. When I changed one of them to the new(?) ones and
rebuilt the aar everything worked without problem. 

So now I am scratching my head and wondering is this a change from 0.94 or
have I picked things up from even earlier versions? Looking back at every
experiment I've done with axis2 it seems as if I have the wrong packages. I
rebuilt my Eclipse axis2 library after I re-installed Tomcat at your
suggestion, so you were right about the classpath problem. It never occurred
to me that it was the Eclipse classpath and not the system or Tomcat
classpath!

Oh well, onwards...!

Regards,
Ken


-Original Message-
From: Eran Chinthaka [mailto:[EMAIL PROTECTED] 
Sent: 29 March 2006 17:01
To: axis-user@ws.apache.org
Subject: Re: [Axis2] 0.95 installation


>Anyway, it seems like you have a classpath problem.


>-- Chinthaka



Re: TCP mon (Axis1 and Axis2)

2006-03-30 Thread Franz Fehringer




I created WSCOMMONS-5.
tcpmon is not selectable as component in JIRA yet so i chose Utilities.

Best regards

Franz

Ajith Ranabahu schrieb:

  Hi Franz,
I was not aware of the bugs that you've posted, I would have tried
fixing it!. BTW I think it is better if you can post a commons Jira so
that the issue is reported in the right place.

Ajith

On 3/30/06, Franz Fehringer <[EMAIL PROTECTED]> wrote:
  
  
 I checked and tcpmon still suffers from AXIS-2373 (resend does not work).
 The fix i attached to AXIS-2373 is really simple (although it is possible
in principle that behaviour differs among platforms and JREs).
 Can some Axis(2) developer have a look at it?
 Should i file a ws-commons issue?

 Greetings

 Franz

 Franz Fehringer schrieb:
 Thanks,

 I`ll give it a try.

 Franz

 Ajith Ranabahu schrieb:
 Hi Franz,
The TCPMon releases were uploaded to Apache dist but the site is still
not there due to a build problem in the commons base site.

http://www.apache.org/dist/ws/commons/tcpmon/1_0/

I can upload the site but it'll not show up in the base site! I've not
sent in the release notes yet.

Ajith

On 3/30/06, Franz Fehringer <[EMAIL PROTECTED]> wrote:


 Eran Chinthaka schrieb:
 Franz Fehringer wrote:


 And, by the way, what happened to the project of factoring out tcpmon
into WS commons?


Its now in ws-commons.

-- Chinthaka


 I cannot see it in http://ws.apache.org/commons/ ?!

 regards

 Franz





--
Ajith Ranabahu








  
  

--
Ajith Ranabahu

  




begin:vcard
fn:Dr. Franz Fehringer
n:Fehringer;Franz
org:ISO Software Systeme
adr;quoted-printable:;;Eichendorffstrasse 29;N=C3=BCrnberg;;90491;Deutschland
email;internet:mailto:[EMAIL PROTECTED]
tel;work:+49/(911) - 99594-0 
tel;fax:+49/(911) - 99594-580
x-mozilla-html:TRUE
url:http://www.isogmbh.de/
version:2.1
end:vcard



How to change "charset=utf-8" or "encoding=utf-8" to other charsets or encodings?

2006-03-30 Thread ajax chelsea

POST /wstest/NetWebService/SampleService HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8  
Content-Length: length
SOAPAction: "http://tempuri.org/max"

encoding="utf-8"?> 
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema
" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  
http://tempuri.org/">
  int
  int

  

 
Assume the operation name is not "max", but a japanese string, and I prefer shift_jis to utf-8, then what should I do?
Thanks.


Removing Temporary Files after response is sent

2006-03-30 Thread nocoz
Hello,

I have recently created some web services using TOMCAT 5.5 and AXIS 1.3. The aim
of those web services is to compute some data and to generate ZIP files. Those
ZIP files are returned to client each time he calls the web service.

The thing is that those ZIP files have to be removed from the server after each
call.

Here is how my web services look like


public DataHandler generateFile(String myParam){
  MyConfig myConf = new MyConfig(); //generate a temporary folder on the server
in which data will be stored and ZIP file created
  ...
  DataHandler ret = new DataHandlern(new FileDataSource(myConf.myZipFile));
  return ret; // return the zip file to client
}


The thing is that I can't manage to remove the temporary folder created once the
 the 'return ret' has been done.

I tried many things:
. Deleting the temporary folder before calling 'return' -> I got a
FileNotFoundException (can't send the file if the file no longer exists ;-) )
. Deleting the temporary folder using a 'try ... finally' block as follows:

try{
  return ret;
}finally{
  myConf.cleanUpFolders(); // method that remove temporary folder
}

but I also got a FileNotFoundException (the 'return ret' can't find the ZIP file
 I need to send, is it a kind of synchronizing problem?) -> file is deleted
before client get the ZIP file
. Third solution, creating a destructor in MyConfig class:

public void finalize(){
  cleanUpFolders();
}

The problem here is that the destructor is called only when I restart the server
(and a server purpose is not to be restarted each hours)

Is there any solution to remove those temporary files (that are stored on
various places on the server hard drive) after each web service call ?

Thanks for your help

Nicolas Cottais

PS: this is how my client retrieves the file from the web service:

 ret = (DataHandler) call.invoke(new Object[] { monparam});
 FileOutputStream archive = new FileOutputStream(savePath);// savepath is
c:\\test.zip
 ret.writeTo(archive);
 archive.close();



Re: TCP mon (Axis1 and Axis2)

2006-03-30 Thread Ajith Ranabahu
Hi Franz,
I was not aware of the bugs that you've posted, I would have tried
fixing it!. BTW I think it is better if you can post a commons Jira so
that the issue is reported in the right place.

Ajith

On 3/30/06, Franz Fehringer <[EMAIL PROTECTED]> wrote:
>  I checked and tcpmon still suffers from AXIS-2373 (resend does not work).
>  The fix i attached to AXIS-2373 is really simple (although it is possible
> in principle that behaviour differs among platforms and JREs).
>  Can some Axis(2) developer have a look at it?
>  Should i file a ws-commons issue?
>
>  Greetings
>
>  Franz
>
>  Franz Fehringer schrieb:
>  Thanks,
>
>  I`ll give it a try.
>
>  Franz
>
>  Ajith Ranabahu schrieb:
>  Hi Franz,
> The TCPMon releases were uploaded to Apache dist but the site is still
> not there due to a build problem in the commons base site.
>
> http://www.apache.org/dist/ws/commons/tcpmon/1_0/
>
> I can upload the site but it'll not show up in the base site! I've not
> sent in the release notes yet.
>
> Ajith
>
> On 3/30/06, Franz Fehringer <[EMAIL PROTECTED]> wrote:
>
>
>  Eran Chinthaka schrieb:
>  Franz Fehringer wrote:
>
>
>  And, by the way, what happened to the project of factoring out tcpmon
> into WS commons?
>
>
> Its now in ws-commons.
>
> -- Chinthaka
>
>
>  I cannot see it in http://ws.apache.org/commons/ ?!
>
>  regards
>
>  Franz
>
>
>
>
>
> --
> Ajith Ranabahu
>
>
>
>
>
>
>


--
Ajith Ranabahu


How to reproduce "WSDL2Java okay"+"uncompilable code generated"

2006-03-30 Thread Morten Mortensen

I can now directly provoke, what I said yesterday: WSDL2Java running
smoothly, but the generated coded in an uncompilable state!

To reproduce, take the "Axis2SampleDocLit.wsdl" from the 0.95
distribution, make the error like I did in my own WSDL by removing the
qualification from the message-elements like this (see the attached
file; slightly modified variant of the original sample):

Change e.g. -


  <- remove
"xsd1"


- into -


 <- no "xsd1"


Now the WSDL2Java runs without any errors, but the compilation fails
since the code shown in my original message below is produced.

I think, that there ought to be a negative test-case for WSDL2Java with
this type of WSDL!
It is very good, that given correct WSDL, then all is fine - but in real
life, we fiddle with WSDL for a long time, maybe do not get it right for
the first number of times and then it is important to have tools like
WSDL2Java do some aggressive verification of the WSDL...
Having to track down the cause of generated, uncompilable code is too
tough.
Developers - are you listening?

Regards,
Morten Sabroe Mortensen

 

-Oprindelig meddelelse-
Fra: Morten Mortensen 
Sendt: 29. marts 2006 17:38
Til: axis-user@ws.apache.org
Emne: Mode "Document/literal" vs. "Document/literal wrapped"


Hi all

With the 0.95 version, how come I can use WSDL2Java to generate
*un-compilable* code?
Apparently, when I write WSDL as "Document/literal wrapped", the
generated "XXXReceiverInOut" has bad "toOM()", "fromOM()" and
"toEnvelope()" (for an example, see the below "toOM()"-implementation;
the parameter does not have the right type!).

Why does this happen? What to do?

Regards,
Morten Sabroe Mortensen

---
   ...
private  org.apache.ws.commons.om.OMElement
toOM(org.apache.ws.commons.om.OMElement param){
if (param instanceof
org.apache.axis2.databinding.ADBBean){
 
org.apache.ws.commons.om.impl.builder.StAXOMBuilder builder = new
org.apache.ws.commons.om.impl.builder.StAXOMBuilder
 
(org.apache.ws.commons.om.OMAbstractFactory.getOMFactory(),
param.getPullParser(org.apache.ws.commons.om.OMElement.MY_QNAME));
org.apache.ws.commons.om.OMElement
documentElement = builder.getDocumentElement();
((org.apache.ws.commons.om.impl.OMNodeEx)
documentElement).setParent(null); // remove the parent link
return documentElement;
}else{
   
   //todo finish this onece the bean serializer
has the necessary methods
return null;
}
}
   ...
---


Axis2SampleDocLit.wsdl
Description: Axis2SampleDocLit.wsdl


RE: [Axis2] Converting 1.x RPC to 2.0 Document style

2006-03-30 Thread trevor paterson \(RI\)
Thanks

Returning an OMElement is good enough for now - but if I have a very big return 
document it would be nice to zip up and transport as a binary attachment - I 
can't find any clues how I specify use of SOAP attachments in axis 2 service 
deployment.

trevor 

-Original Message-
From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED] 
Sent: 30 March 2006 05:58
To: axis-user@ws.apache.org
Subject: Re: [Axis2] Converting 1.x RPC to 2.0 Document style

Hi Ttrevor

RPCMessgeReciver or any other messageReciver in Axis2 can not deal with 
org.w3c.dom.Document , so I think you have to modify your service class to 
return OM element , or you have to write you own message receiver to deal with 
this case. But I think easy way is to just return OMElement , any simple type 
or any JavaBean from service class, then RPCMessageReciver can handle that.

So pls try that and if you have any q pls drop a mail. :)


trevor paterson (RI) wrote:

>The original method returned an instance of an XML Document:
>
>public org.w3c.dom.Document; getChromosomes(String SpeciesAccession, 
>String SpeciesName, String SpeciesLatinName ) throws 
>java.rmi.RemoteException
>
>If I make a service using this method by deploying with a services.xml 
>file (below)  the service deploys ok, but always throws an error when 
>run
>
>If I change the method to return an OMElement and add the Document node to the 
>OMElement in the method body the service works ok, and I just have to extract 
>the Document from the OMElement.
>
>I guess I just don't know how to specify the services.xml correctly to deploy 
>a service returning anything but an OMElement - and can find no documentation 
>on thismy services.xml is below: I don't feel confident to write my own 
>wsdl
>
>
>
>   refactored service  for getting karyotype for a species through the 
> current Ark on axis 1.2 to 2.0.
>
>
> locked="false">org.thearkdb.services2.ReturnCGKaryotypeView
>
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>
>
>
>
>Ta
>
>trevor
>
>-Original Message-
>From: SOA Work [mailto:[EMAIL PROTECTED]
>Sent: 27 March 2006 16:45
>To: axis-user@ws.apache.org
>Subject: RE: [Axis2] Converting 1.x RPC to 2.0 Document style
>
>
>Hm, so your original method returned a java class. For example a bean?
>So what problem do you have with the return value? 
>
>  
>
>>-Ursprüngliche Nachricht-
>>Von: axis-user@ws.apache.org
>>Gesendet: 27.03.06 16:51:44
>>An: 
>>Betreff: RE: [Axis2] Converting 1.x RPC to 2.0 Document style
>>
>>
>
>
>  
>
>>Yes
>>
>>I am getting there - I can invoke the server method OK - the server code 
>>executes OK but am having trouble returning the results as a Document.
>>
>>Maybe I need to chenge my methods to create and return an OMElement instead 
>>of Document?
>>
>>trevor
>>
>>-Original Message-
>>From: SOA Work [mailto:[EMAIL PROTECTED]
>>Sent: 27 March 2006 15:48
>>To: axis-user@ws.apache.org
>>Subject: Re: [Axis2] Converting 1.x RPC to 2.0 Document style
>>
>>
>>I'm not sure if I understand the question right. But try using your existing 
>>service class with axis2 and the RPCMessageReceiver. RPCMessageReceiver is 
>>used to map the xml data to java objects. I think this is what you want.
>>The wsdl is generated.
>>
>>RPCMessageReceiver means RPC programming model, not the wsdl style (which can 
>>be document).
>>This article descripes the different wsdl styles and the difference to the 
>>programming model:
>>http://www-128.ibm.com/developerworks/webservices/library/ws-whichwsdl
>>/
>>
>>I hope this helps.
>>
>>
>>
>>
>>>-Ursprüngliche Nachricht-
>>>Von: axis-user@ws.apache.org
>>>Gesendet: 27.03.06 14:21:38
>>>An: 
>>>Betreff: [Axis2] Converting 1.x RPC to 2.0 Document style
>>>  
>>>
>>
>>
>>>I have used java:RPC style SOAP messaging in axis 1.2 and now want to 
>>>migrate to axis2 - where as I understand it Document style messaging is 
>>>preferred.
>>>
>>> 
>>>
>>>I can't find any documentation on how to create the wsdl to map to the 
>>>methodName(parameterX, parameterY) of my service.
>>>
>>> 
>>>
>>>Do I have to write a bespoke receiver that takes the OMElement apart and 
>>>calls the service method with the correct parameters - or can this be done 
>>>'automatically' by creating an appropriate service.xml, using either the  
>>>RawXMLINOutMessageReceiver or the RPCMessageReceiver?
>>>
>>> 
>>>
>>>thanks for any help
>>>
>>>Trevor Paterson
>>>
>>>Roslin Institute
>>>
>>> 
>>>
>>> 
>>>  
>>>
>>__
>>Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach!  
>>
>>Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131
>>
>>
>>
>
>
>__
>Verschicken Sie romantische, coole und witzige Bilder per SMS!
>Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
>
>
>
>  
>

--
Than

Re: Java2WSDL throws NullPointerException

2006-03-30 Thread Dies Koper

Hello Martin,

I'm glad to hear you found the cause of the error.
Please do not hesitate to open a JIRA bug with your suggestion and a patch.

Regards,
Dies


Martin Atkins wrote:

Dies Koper wrote:

Hello Martin,

Judging from your stacktrace the NPE occurs in the following line:

URL[] urls = new URL[names.length];

"names" is an array of strings that should contain the path entries in 
your classpath. I do not know under what circumstances it could be 
null, but you could try tweaking your classpath setting (-X classes/). 
Maybe it's the slash?




Your message prompted me to go for a little look through the source code 
myself. It turns out that this error is caused by including a space 
between the -X and the classpath value.


I'd like to politely suggest that either this create a more sensible 
error (by checking if option.getArgument() is null at about line 491 of 
Java2WSDL.java?) or ideally the tool support the space, for consistency 
with most other utilities which have single-letter options.





Re: Java2WSDL throws NullPointerException

2006-03-30 Thread Martin Atkins

Dies Koper wrote:

Hello Martin,

Judging from your stacktrace the NPE occurs in the following line:

URL[] urls = new URL[names.length];

"names" is an array of strings that should contain the path entries in 
your classpath. I do not know under what circumstances it could be null, 
but you could try tweaking your classpath setting (-X classes/). Maybe 
it's the slash?




Your message prompted me to go for a little look through the source code 
myself. It turns out that this error is caused by including a space 
between the -X and the classpath value.


I'd like to politely suggest that either this create a more sensible 
error (by checking if option.getArgument() is null at about line 491 of 
Java2WSDL.java?) or ideally the tool support the space, for consistency 
with most other utilities which have single-letter options.




RE: [axis2] - 0.95 - WSDL2Java

2006-03-30 Thread Ameet Hasmucrai Amarchande
Hi Ken,

That's what I thought. But when I changed it to "rpc", it gave this error when 
I was trying to generate the classes:

--
Exception in thread "main" 
org.apache.axis2.wsdl.codegen.CodeGenerationException: 
java.lang.RuntimeException: org.apache.axis2.schema.SchemaCompilationException

: java.lang.NullPointerException

at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:146)

at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)

at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)

Caused by: java.lang.RuntimeException: 
org.apache.axis2.schema.SchemaCompilationException: 
java.lang.NullPointerException

at 
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:162)

at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:101)

... 2 more

Caused by: org.apache.axis2.schema.SchemaCompilationException: 
java.lang.NullPointerException

at 
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:184)

at 
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:115)

... 3 more

Caused by: java.lang.NullPointerException

at 
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:354)

at 
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:338)

at 
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:403)

at 
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:328)

at 
org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:899)

at 
org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:862)

at 
org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:631)

at 
org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:604)

at 
org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:569)

at 
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:444)

at 
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:338)

at 
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:220)

at 
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:179)

... 4 more
--



Thanks,


Ameet




-Original Message-
From: Ken Campbell [mailto:[EMAIL PROTECTED] 
Sent: quinta-feira, 30 de Março de 2006 9:36
To: axis-user@ws.apache.org
Subject: RE: [axis2] - 0.95 - WSDL2Java

Hi Ameet,

Perhaps your problem is here :

...

  mailto:[EMAIL PROTECTED] 
Sent: 29 March 2006 16:57
To: axis-user@ws.apache.org
Subject: RE: [axis2] - 0.95 - WSDL2Java

Ok, here it is.




Re: TCP mon (Axis1 and Axis2)

2006-03-30 Thread Franz Fehringer




I checked and tcpmon still suffers from AXIS-2373 (resend does not
work).
The fix i attached to AXIS-2373 is really simple (although it is
possible in principle that behaviour differs among platforms and JREs).
Can some Axis(2) developer have a look at it?
Should i file a ws-commons issue?

Greetings

Franz

Franz Fehringer schrieb:

  
Thanks,
  
I`ll give it a try.
  
Franz
  
Ajith Ranabahu schrieb:
  
Hi Franz,
The TCPMon releases were uploaded to Apache dist but the site is still
not there due to a build problem in the commons base site.

http://www.apache.org/dist/ws/commons/tcpmon/1_0/

I can upload the site but it'll not show up in the base site! I've not
sent in the release notes yet.

Ajith

On 3/30/06, Franz Fehringer <[EMAIL PROTECTED]> wrote:
  

   Eran Chinthaka schrieb:
 Franz Fehringer wrote:


 And, by the way, what happened to the project of factoring out tcpmon
into WS commons?


Its now in ws-commons.

-- Chinthaka


 I cannot see it in http://ws.apache.org/commons/ ?!

 regards

 Franz







--
Ajith Ranabahu


  
  
  




begin:vcard
fn:Dr. Franz Fehringer
n:Fehringer;Franz
org:ISO Software Systeme
adr;quoted-printable:;;Eichendorffstrasse 29;N=C3=BCrnberg;;90491;Deutschland
email;internet:mailto:[EMAIL PROTECTED]
tel;work:+49/(911) - 99594-0 
tel;fax:+49/(911) - 99594-580
x-mozilla-html:TRUE
url:http://www.isogmbh.de/
version:2.1
end:vcard



No Such Operation Error?

2006-03-30 Thread fee genyuan
hi all,
Today I generated a webservice with axis1.3, it was published
successfully, but when I use Eclipse to generated the test client with
JSP, It threw out the Exception "No Such Operation messageDTO1", but
here "messageDTO1" is a element in my wsdl document(see below
content).

I know the situation is that element "messageDTO" and "messageDTO1"
referrenced the same complexType "MessageDTO"

and element "messageDTO" and "messageDTO1" are referrenced by message
"createMessageRequest" and "createMessageWithRTVRequest"

I tried out that if I remove anyone of the webservice methods
"createMessageWithRTV" and "createMessage" It runs well.

In another word, if the complexType "MessageDTO" was referrenced only
once, it runs well.

So in my opinion, the problem is happened in this part:
*
 
   
*

But I don't know why?

BTW: The Exception was threw out in the client server side, Not the
webservice server.

regards.

FeeGenyuan


Attach a part of my wsdl document:


http://message.qqht.qel.com";
xmlns:apachesoap="http://xml.apache.org/xml-soap";
xmlns:impl="http://message.qqht.qel.com";
xmlns:intf="http://message.qqht.qel.com";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

 
  http://message.qqht.qel.com";
xmlns="http://www.w3.org/2001/XMLSchema";>
   

 .

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

   

   

   



--
FeeGenyuan

http://message.qqht.qel.com"; xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:impl="http://message.qqht.qel.com"; xmlns:intf="http://message.qqht.qel.com"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

 
  http://message.qqht.qel.com"; xmlns="http://www.w3.org/2001/XMLSchema";>
   

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

   
   
   
   
  
 

   

  

   

   

   

   

  

   

   

  

   

   

  

 

 

  

  

 

 

  

   

   

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

  

 

 



 

 



 

  

  

 

 



 

 



 

  

   

   

  

 http://192.168.100.1:7001/qqht/services/MessageDelegate"/>

  

   




Re: TCP mon (Axis1 and Axis2)

2006-03-30 Thread Franz Fehringer




Thanks,

I`ll give it a try.

Franz

Ajith Ranabahu schrieb:

  Hi Franz,
The TCPMon releases were uploaded to Apache dist but the site is still
not there due to a build problem in the commons base site.

http://www.apache.org/dist/ws/commons/tcpmon/1_0/

I can upload the site but it'll not show up in the base site! I've not
sent in the release notes yet.

Ajith

On 3/30/06, Franz Fehringer <[EMAIL PROTECTED]> wrote:
  
  
 Eran Chinthaka schrieb:
 Franz Fehringer wrote:


 And, by the way, what happened to the project of factoring out tcpmon
into WS commons?


Its now in ws-commons.

-- Chinthaka


 I cannot see it in http://ws.apache.org/commons/ ?!

 regards

 Franz




  
  

--
Ajith Ranabahu


  




begin:vcard
fn:Dr. Franz Fehringer
n:Fehringer;Franz
org:ISO Software Systeme
adr;quoted-printable:;;Eichendorffstrasse 29;N=C3=BCrnberg;;90491;Deutschland
email;internet:mailto:[EMAIL PROTECTED]
tel;work:+49/(911) - 99594-0 
tel;fax:+49/(911) - 99594-580
x-mozilla-html:TRUE
url:http://www.isogmbh.de/
version:2.1
end:vcard



SOAP and Numeric Character References

2006-03-30 Thread Anna Krajewska



Hi
 
I managed to find the reason why polish characters 
(with tails) looks so strange in the SOAPEnvelope. The thing is that they are 
replaced by numeric character references (NCR) which are defined as &# 
 ; . When I create my DOM Element and 
put it on my screen I can see polish characters, they are encoded in utf-8 and 
each takes only one byte. When I do something like that:
 
SOAPBodyElement input = new SOAPBodyElement( 
myDomElement);
 
and then put the input on the screen - polish 
characters are gone, they are replaced by NCRs. So the implementation of the 
SOAPBodyElement is the place where source of the problem starts. Now, is it 
possible to force SOAPBodyElement not to replace my polish characters with 
NCRs? DOM Element is able to serialize Element which contain polish characters 
into byte stream in "utf-8" with no problem. So why SOAP can't?
 
Regards
 
Ania


Re: TCP mon (Axis1 and Axis2)

2006-03-30 Thread Ajith Ranabahu
Hi Franz,
The TCPMon releases were uploaded to Apache dist but the site is still
not there due to a build problem in the commons base site.

http://www.apache.org/dist/ws/commons/tcpmon/1_0/

I can upload the site but it'll not show up in the base site! I've not
sent in the release notes yet.

Ajith

On 3/30/06, Franz Fehringer <[EMAIL PROTECTED]> wrote:
>  Eran Chinthaka schrieb:
>  Franz Fehringer wrote:
>
>
>  And, by the way, what happened to the project of factoring out tcpmon
> into WS commons?
>
>
> Its now in ws-commons.
>
> -- Chinthaka
>
>
>  I cannot see it in http://ws.apache.org/commons/ ?!
>
>  regards
>
>  Franz
>
>
>


--
Ajith Ranabahu