For check out the latest axis c++ code

2006-02-16 Thread Arshad Ahamad
hi, 



How I can check out the latest src code  for axis c++.
I try
   cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login
   password: anoncvs 

  cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout ws-axis 

but it shows connection refeused. 

any body help me. 



thanks and regards
Ahamad


Re: For check out the latest axis c++ code

2006-02-16 Thread John Hawkins

svn has replaced cvs - http://ws.apache.org/axis/cpp/developers-guide.html#checkingOut







Arshad Ahamad
[EMAIL PROTECTED] 
16/02/2006 12:41



Please respond to
Apache AXIS C User List axis-c-user@ws.apache.org





To
axis-c-user@ws.apache.org


cc



Subject
For check out the latest axis c++ code








hi, 


 How I can check out the latest src code for axis c++.
 I try
  cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login
  password: anoncvs 

  cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout
ws-axis 

 but it shows connection refeused. 

 any body help me. 


thanks and regards
Ahamad



Axis2C Milestone Release M0.4 Released

2006-02-16 Thread Damitha Kumarage
Hi All,



The fourth milestone release of Axis2 C, M0.4 has been released and could be downloaded at



http://www.apache.org/dyn/closer.cgi/ws/axis2/c/M0.4/



We have done considerable amount of improvements in the past two weeks since the M0.3 release.

Hence this release.



We have the following features added on top of the M0.3 release



1. Threading support and threaded simple axis server

2. Module loading support

3. Addressing module and addressing based dispatching

4. HTTP chunking support

5. Improved logging mechanism

6. Ability to build and run on Windows platform



By now, we have implemented all the core features except MTOM support.

The following are a list of TODOs to be handled in the next milestone.



1. Comprehensive testing for thread safety

2. Fixing memory leaks

3. Organize the source code and header structure

4. Encoding support with streams

5. Website and documentation



We welcome your early feedback on this implementation.



Best Regards

Damitha


Re: WSS4j with passwordText doesn't work

2006-02-16 Thread Ulf Dittmer
Hi-

It's a little counter-intuitive, because it works in different ways
depending on whether you use cleartext or digested passwords. I'm
attaching a handler that does both, and which works fine for me.

Ulf


// the username and password we expect incoming WS calls to use
private String user = wsuser;
private String pwd = wspwd;

public void handle (Callback[] callbacks) throws IOException,
UnsupportedCallbackException {
  for (int i = 0; i  callbacks.length; i++) {
if (callbacks[i] instanceof WSPasswordCallback) {
  WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];

  if (pc.getUsage() == WSPasswordCallback.USERNAME_TOKEN) {
// digested password
if (user.equals(pc.getIdentifer()))
  pc.setPassword(pwd);
  } else if (pc.getUsage() ==
WSPasswordCallback.USERNAME_TOKEN_UNKNOWN) {
// cleartext password
if (! user.equals(pc.getIdentifer()))
  throw new IOException(unknown user: +pc.getIdentifer());

if (! pwd.equals(pc.getPassword()))
  throw new IOException(password incorrect for user:
+pc.getIdentifer());
  }
} else {
  throw new UnsupportedCallbackException(callbacks[i], Unrecognized
Callback);
}
  }
}





RE: WSS4j with passwordText doesn't work

2006-02-16 Thread Girish_Kumar
Hi,

How do I unsubscribe from this group? I sent a mail as explained in the
subscription mail. But still I am getting the mails from this group.

Regards,
Girish

-Original Message-
From: Ulf Dittmer [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 16, 2006 2:44 PM
To: axis-user@ws.apache.org
Subject: Re: WSS4j with passwordText doesn't work

Hi-

It's a little counter-intuitive, because it works in different ways
depending on whether you use cleartext or digested passwords. I'm
attaching a handler that does both, and which works fine for me.

Ulf


// the username and password we expect incoming WS calls to use
private String user = wsuser;
private String pwd = wspwd;

public void handle (Callback[] callbacks) throws IOException,
UnsupportedCallbackException {
  for (int i = 0; i  callbacks.length; i++) {
if (callbacks[i] instanceof WSPasswordCallback) {
  WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];

  if (pc.getUsage() == WSPasswordCallback.USERNAME_TOKEN) {
// digested password
if (user.equals(pc.getIdentifer()))
  pc.setPassword(pwd);
  } else if (pc.getUsage() ==
WSPasswordCallback.USERNAME_TOKEN_UNKNOWN) {
// cleartext password
if (! user.equals(pc.getIdentifer()))
  throw new IOException(unknown user: +pc.getIdentifer());

if (! pwd.equals(pc.getPassword()))
  throw new IOException(password incorrect for user:
+pc.getIdentifer());
  }
} else {
  throw new UnsupportedCallbackException(callbacks[i], Unrecognized
Callback);
}
  }
}






DISCLAIMER:
This email (including any attachments) is intended for the sole use of the 
intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE 
COMPANY INFORMATION. Any review or reliance by others or copying or 
distribution or forwarding of any or all of the contents in this message is 
STRICTLY PROHIBITED. If you are not the intended recipient, please contact the 
sender by email and delete all copies; your cooperation in this regard is 
appreciated.



Re: How to not send nillable=true for null elements in a SOAP message

2006-02-16 Thread Tim R J Langford

Thanks Kasi,

OK I am trying thsi approach now as it si my final option.

I have created a handler class that extend BasicHandler and have 
attached it to my outgoing Request SimpleChain in my 
EngineConfiguration. I can grab the message context and display it as a 
string. I also have access to the DOM and the various RPC elements, but 
it is becoming fairly complicated and bespoke to try and remove these 
nil elements. Is there any simple way of getting the string, processing 
it to remove the elements and setting my desired string back again at 
this level?


Thanks for your time,

Tim



Kasi, Anand wrote:


Write up a response flow handler that gets the response message from the
MessageContext object and removes the xsi:nil = true elements.


-Original Message-
From: Tim R J Langford [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 15, 2006 9:42 AM

To: axis-user@ws.apache.org
Subject: Re: How to not send nillable=true for null elements in a SOAP
message

Hello All,

I am still trying to remove 'nil=true' elements from my messages sent 
out by axis. I have modified the wsdl in elements where I want axis not 
to send these strings (i.e: have a blank element) as follows :


element name=sendNothingIfNull nillable=true type=xsd:string/

to :

element name=sendNothingIfNull nillable=false minOccurs=0 
type=xsd:string/


so that instead of sending :

someXML
   sendNothingIfNull xsi:type=xsd:string xsi:nil=true/
/someXML

I send something like :

someXML/someXML


I have tried a few other methods (such as the one Rod suggested not 
specifying nillable at all in the schema and setting minOccurs=0) 
but axis keeps sending these elements as nillable. Should this work or 
am I making a mistake somwhere?


It may be PEBCAK but I just cant get axis1.3  to exhibit the behavior 
the server expects. Is there any other lower level method in axis to 
deal with this? (I traced the code calls down to the HTTP sender class 
but even at this level there is no easy access to the string as it is 
being passed by chunk encoded HTTP - and of course in some cases the 
server we are trying to attach too actually wants us to send these 
nillable=true elements so this approach is not suitable).


I know I must have exhausted all you guys by now! Sorry, and thanks.


Tim

PS: I am generating the axis code form the wsdl using the following ant 
task configuration :


   axis-wsdl2java
 output=${src.dir}
 deployScope=Application
 verbose=true
 serverSide=true
wrapArrays=true
 url=eurostar_hack2.wsdl   
   /axis-wsdl2java








Rodrigo Ruiz wrote:

 

By what you describe, I think you should add minOccurs='0' and remove 
nillable='true'


Regards,
Rodrigo Ruiz

Tim R J Langford wrote:

   


Thanks Anne,

Thats what I thought. Unfortunatly our provider does not seem too 
clued up on their tech, and the wsdl does not allow minOccurs=0.  I
 



 

guess I will have to update our automated build process to fix their 
schema before generating my soap beans and classes. The best way to 
do this would be by adding minOccurs=0 to the faulty elements I 
presume?


Thanks to everybody for their time,

Tim


Anne Thomas Manes wrote:

 

If the service cannot accept xsi:nil=true then the service 
provider should adjust the schema accordingly. Does the schema allow
   



 

minOccurs=0? If not, then there's no valid way to send no element 
instead of xsi:nil=true.


Anne

On 2/14/06, *Tim R J Langford* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:



   Hi Jeff,

   Thanks for your response.

   Sorry for being unclear. Yes you are correct. I am sending
   'xsi:nil=true' and I want to configure axis to send  nothing 
instead

   of this string.  e.g : *

   XXX* xsi:type=xsd:string xsi:nil=true/*
   YYY* xsi:type=zzz:YYY xsi:nil=true xmlns:zzz=KKK*/

   *I think Axis 1.2 did it this way? Is there anyway of
   


configuring
 


   Axis
   1.3 to not send these 'xsi:nil=true' elements?

   Thanks for you time,

   Tim


   PS: The service wsdl does have  'xsd:nillable=true' elements 
in the
   message schema, but their system cannot actually handle the 
situation
   where it is null (even if they return it in a response), and 
they have
   asked us to remove the 'xsi:nil=true' elements from our 
requests. We

   could fix the wsdl schema, but this would impede our codegen
   system as
   we are the client, so were wondering if there was a way to do it
   



 


from
   within axis?*



   *

   Jeff Greif wrote:

   Just to be sure, you're sending xsi:nil=true, not
   xsd:nillable=true, right?
   
   The latter is used only in the schema, and means that the 
element is

   allowed to have no content.  The former means that this
   particular use
   of the element has no content.
   
   Jeff
   
   On 2/14/06, Tim R J Langford [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] wrote:
   
   
   Hello All,
   
   I am writing a 

How to get Axis context params from a Web Service

2006-02-16 Thread oziris
hi,

I defined a context-param in the web.xml of the Axis webapp and I would
like to get the value of this param from my web service.

The code below doesn't seem to work:

code
AxisServlet axisServlet = new AxisServlet();
ServletContext axisServletContext =
axisServlet.getServletContext();
String paramValue =
axisServletContext.getInitParameter(
VERSION_PROTOCOLE));
/code

Thanks a lot.

-o--


Re: wsdl2java bug ???

2006-02-16 Thread Simone Bonazzoli
sorry the element uploadRequest is wrong :)forget it :)On 2/16/06, Simone Bonazzoli [EMAIL PROTECTED]
 wrote:however, this is my xsd:?xml version=
1.0 encoding=UTF-8?schema targetNamespace=http://www.informatica.uniroma2.it/WebDisk
   xmlns=http://www.w3.org/2001/XMLSchema   xmlns:tns=
http://www.informatica.uniroma2.it/WebDisk
  xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/
  xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/
   import namespace=http://schemas.xmlsoap.org/soap/encoding/
 schemaLocation=
http://schemas.xmlsoap.org/soap/encoding//   complexType name=myFileType  sequence   element name=name type=string/element
   element name=user type=string minOccurs=0/element   element name=group type=string minOccurs=0/element
   element name=rigths type=string minOccurs=0/element   element name=size type=long/element   element name=date type=dateTime/element
   element name=isDirectory type=boolean/element  /sequence /complexType element name=listRequest  complexType
   sequenceelement name=path type=string/elementelement name=options type=string/element
   /sequence  /complexType /element  element name=listResponse  complexType   sequence minOccurs=0 maxOccurs=unbounded
element name=myFile type=tns:myFileType/   /sequence  /complexType /element  element name=uploadRequest
  complexType   sequenceelement name=fileName type=string/element name=file type=base64Binary/
   /sequence  /complexType /element/schemaOn 2/16/06, 
Simone Bonazzoli 
[EMAIL PROTECTED] wrote:how i can define my binding to use attachments??? i try the SWA approach but i have a problem with axis... a few weeks ago i sent few mail but i didn't resolve my error... so i try the attachments sample (in the samples direcotry of axis distribution) but there isn't wsdl of the example so i try to see the wsdl generated from axis
can you help me?thx SimoneOn 2/16/06, Anne Thomas Manes 
[EMAIL PROTECTED] wrote:
My guess is that it's your WSDL, but we need the imported XSD to make a final determination.
One error that I see in the WSDL: wsdl:message name=uploadResponse
  wsdl:part name=return type=xsd:string/ /wsdl:messageWhen using document style, a message part must reference an element, not a type. This error could be causing the NPE.
Also suspect is the reference to the element apachesoap:DataHandler. First, you need to make sure that this element is actually defined. And second, typically, you use this type when sending attachments, but you have not defined your binding to use attachments.
Anne
On 2/16/06, 
Simone Bonazzoli [EMAIL PROTECTED] wrote:



i run wsdl2java for this instance do wsdl and i have the error below, this is an error of mine or bug of wsdl2java tool???thanksSimone[axis-wsdl2java] java.lang.NullPointerException[axis-wsdl2java]  at 
org.apache.axis.wsdl.toJava.Utils.getParameterTypeName(Utils.java:994)[axis-wsdl2java]  at org.apache.axis.wsdl.toJava.JavaGeneratorFactory.constructSignature(JavaGeneratorFactory.java:1473)[axis-wsdl2java]  at 
org.apache.axis.wsdl.toJava.JavaGeneratorFactory.constructSignatures(JavaGeneratorFactory.java:1420)[axis-wsdl2java]  at org.apache.axis.wsdl.toJava.JavaGeneratorFactory.generatorPass(JavaGeneratorFactory.java:213)
[axis-wsdl2java]  at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:425)[axis-wsdl2java]  at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)[axis-wsdl2java]  at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run




(Parser.java:362)[axis-wsdl2java]  at java.lang.Thread.run(Thread.java:595)BUILD FAILED/home/simo/develop/java/WebDisk/build.xml:104: WSDL processing error for /home/simo/develop/java/WebDisk/src/it/uniroma2/informatica/WebDisk.wsdl :
nullTotal time: 3 seconds-WSDL?xml version=1.0 encoding=UTF-8?wsdl:definitions targetNamespace=




http://www.informatica.uniroma2.it/WebDisk/wsdl xmlns=http://schemas.xmlsoap.org/wsdl/
 xmlns:tns=
http://www.informatica.uniroma2.it/WebDisk/wsdl xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/
 xmlns:wsdl=
http://schemas.xmlsoap.org/wsdl/ xmlns:apachesoap=http://xml.apache.org/xml-soap
 xmlns:types=
http://www.informatica.uniroma2.it/WebDisk xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/
 xmlns:xsd=
http://www.w3.org/2001/XMLSchema name=WebDisk  wsdl:types  xsd:schema elementFormDefault=qualified   targetNamespace=




http://www.informatica.uniroma2.it/WebDisk/wsdl/types  xsd:import namespace=



http://www.informatica.uniroma2.it/WebDisk schemaLocation=/home/simo/develop/java/WebDisk/src/it/uniroma2/informatica/WebDisk.xsd/
  /xsd:schema /wsdl:types  wsdl:message name=listRequest  wsdl:part name=parameters element=types:listRequest /
 /wsdl:message wsdl:message name=listResponse  wsdl:part name=parameters element=types:listResponse/ /wsdl:message




 wsdl:message name=uploadRequest  wsdl:part name=file element=apachesoap:DataHandler/ /wsdl:message wsdl:message name=uploadResponse
  wsdl:part name=return type=xsd:string/ /wsdl:message  wsdl:portType 

Re: wsdl2java bug ???

2006-02-16 Thread Anne Thomas Manes
Check the Wiki for information on using attachments.http://wiki.apache.org/ws/FrontPage/Axis.(scroll down to the section on Attachments)Anne
On 2/16/06, Simone Bonazzoli [EMAIL PROTECTED] wrote:
sorry the element uploadRequest is wrong :)forget it :)On 2/16/06, Simone Bonazzoli 
[EMAIL PROTECTED]
 wrote:however, this is my xsd:?xml version=
1.0 encoding=UTF-8?schema targetNamespace=http://www.informatica.uniroma2.it/WebDisk
   xmlns=http://www.w3.org/2001/XMLSchema   xmlns:tns=
http://www.informatica.uniroma2.it/WebDisk
  xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/
  xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/
   import namespace=http://schemas.xmlsoap.org/soap/encoding/
 schemaLocation=
http://schemas.xmlsoap.org/soap/encoding//   complexType name=myFileType  sequence   element name=name type=string/element
   element name=user type=string minOccurs=0/element   element name=group type=string minOccurs=0/element
   element name=rigths type=string minOccurs=0/element   element name=size type=long/element   element name=date type=dateTime/element
   element name=isDirectory type=boolean/element  /sequence /complexType element name=listRequest  complexType
   sequenceelement name=path type=string/elementelement name=options type=string/element
   /sequence  /complexType /element  element name=listResponse  complexType   sequence minOccurs=0 maxOccurs=unbounded
element name=myFile type=tns:myFileType/   /sequence  /complexType /element  element name=uploadRequest
  complexType   sequenceelement name=fileName type=string/element name=file type=base64Binary/
   /sequence  /complexType /element/schemaOn 2/16/06, 
Simone Bonazzoli 
[EMAIL PROTECTED] wrote:how i can define my binding to use attachments??? i try the SWA approach but i have a problem with axis... a few weeks ago i sent few mail but i didn't resolve my error... so i try the attachments sample (in the samples direcotry of axis distribution) but there isn't wsdl of the example so i try to see the wsdl generated from axis
can you help me?thx SimoneOn 2/16/06, Anne Thomas Manes 
[EMAIL PROTECTED] wrote:
My guess is that it's your WSDL, but we need the imported XSD to make a final determination.
One error that I see in the WSDL: wsdl:message name=uploadResponse
  wsdl:part name=return type=xsd:string/ /wsdl:messageWhen using document style, a message part must reference an element, not a type. This error could be causing the NPE.
Also suspect is the reference to the element apachesoap:DataHandler. First, you need to make sure that this element is actually defined. And second, typically, you use this type when sending attachments, but you have not defined your binding to use attachments.
Anne
On 2/16/06, 
Simone Bonazzoli [EMAIL PROTECTED] wrote:




i run wsdl2java for this instance do wsdl and i have the error below, this is an error of mine or bug of wsdl2java tool???thanksSimone[axis-wsdl2java] java.lang.NullPointerException[axis-wsdl2java]  at 
org.apache.axis.wsdl.toJava.Utils.getParameterTypeName(Utils.java:994)[axis-wsdl2java]  at org.apache.axis.wsdl.toJava.JavaGeneratorFactory.constructSignature(JavaGeneratorFactory.java:1473)[axis-wsdl2java]  at 
org.apache.axis.wsdl.toJava.JavaGeneratorFactory.constructSignatures(JavaGeneratorFactory.java:1420)[axis-wsdl2java]  at org.apache.axis.wsdl.toJava.JavaGeneratorFactory.generatorPass(JavaGeneratorFactory.java:213)
[axis-wsdl2java]  at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:425)[axis-wsdl2java]  at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)[axis-wsdl2java]  at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run





(Parser.java:362)[axis-wsdl2java]  at java.lang.Thread.run(Thread.java:595)BUILD FAILED/home/simo/develop/java/WebDisk/build.xml:104: WSDL processing error for /home/simo/develop/java/WebDisk/src/it/uniroma2/informatica/WebDisk.wsdl :
nullTotal time: 3 seconds-WSDL?xml version=1.0 encoding=UTF-8?wsdl:definitions targetNamespace=





http://www.informatica.uniroma2.it/WebDisk/wsdl xmlns=http://schemas.xmlsoap.org/wsdl/
 xmlns:tns=
http://www.informatica.uniroma2.it/WebDisk/wsdl xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/
 xmlns:wsdl=
http://schemas.xmlsoap.org/wsdl/ xmlns:apachesoap=http://xml.apache.org/xml-soap
 xmlns:types=
http://www.informatica.uniroma2.it/WebDisk xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/
 xmlns:xsd=
http://www.w3.org/2001/XMLSchema name=WebDisk  wsdl:types  xsd:schema elementFormDefault=qualified   targetNamespace=





http://www.informatica.uniroma2.it/WebDisk/wsdl/types  xsd:import namespace=




http://www.informatica.uniroma2.it/WebDisk schemaLocation=/home/simo/develop/java/WebDisk/src/it/uniroma2/informatica/WebDisk.xsd/
  /xsd:schema /wsdl:types  wsdl:message name=listRequest  wsdl:part name=parameters element=types:listRequest /
 /wsdl:message wsdl:message name=listResponse  wsdl:part name=parameters element=types:listResponse/ /wsdl:message





 

Re: wsdl2java bug ???

2006-02-16 Thread Simone Bonazzoli
thanks for the link anne, there are some code samples but there isn't a wsdl example... where can i find it?SimoneOn 2/16/06, Anne Thomas Manes
 [EMAIL PROTECTED] wrote:Check the Wiki for information on using attachments.
http://wiki.apache.org/ws/FrontPage/Axis.(scroll down to the section on Attachments)
Anne
On 2/16/06, Simone Bonazzoli [EMAIL PROTECTED]
 wrote:
sorry the element uploadRequest is wrong :)forget it :)On 2/16/06, Simone Bonazzoli 

[EMAIL PROTECTED]
 wrote:however, this is my xsd:?xml version=
1.0 encoding=UTF-8?schema targetNamespace=http://www.informatica.uniroma2.it/WebDisk
   xmlns=http://www.w3.org/2001/XMLSchema   xmlns:tns=
http://www.informatica.uniroma2.it/WebDisk
  xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/
  xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/
   import namespace=http://schemas.xmlsoap.org/soap/encoding/
 schemaLocation=
http://schemas.xmlsoap.org/soap/encoding//   complexType name=myFileType  sequence   element name=name type=string/element
   element name=user type=string minOccurs=0/element   element name=group type=string minOccurs=0/element
   element name=rigths type=string minOccurs=0/element   element name=size type=long/element   element name=date type=dateTime/element
   element name=isDirectory type=boolean/element  /sequence /complexType element name=listRequest  complexType
   sequenceelement name=path type=string/elementelement name=options type=string/element
   /sequence  /complexType /element  element name=listResponse  complexType   sequence minOccurs=0 maxOccurs=unbounded
element name=myFile type=tns:myFileType/   /sequence  /complexType /element  element name=uploadRequest
  complexType   sequenceelement name=fileName type=string/element name=file type=base64Binary/
   /sequence  /complexType /element/schemaOn 2/16/06, 
Simone Bonazzoli 
[EMAIL PROTECTED] wrote:how i can define my binding to use attachments??? i try the SWA approach but i have a problem with axis... a few weeks ago i sent few mail but i didn't resolve my error... so i try the attachments sample (in the samples direcotry of axis distribution) but there isn't wsdl of the example so i try to see the wsdl generated from axis
can you help me?thx SimoneOn 2/16/06, Anne Thomas Manes 
[EMAIL PROTECTED] wrote:
My guess is that it's your WSDL, but we need the imported XSD to make a final determination.
One error that I see in the WSDL: wsdl:message name=uploadResponse
  wsdl:part name=return type=xsd:string/ /wsdl:messageWhen using document style, a message part must reference an element, not a type. This error could be causing the NPE.
Also suspect is the reference to the element apachesoap:DataHandler. First, you need to make sure that this element is actually defined. And second, typically, you use this type when sending attachments, but you have not defined your binding to use attachments.
Anne
On 2/16/06, 
Simone Bonazzoli [EMAIL PROTECTED] wrote:





i run wsdl2java for this instance do wsdl and i have the error below, this is an error of mine or bug of wsdl2java tool???thanksSimone[axis-wsdl2java] java.lang.NullPointerException[axis-wsdl2java]  at 
org.apache.axis.wsdl.toJava.Utils.getParameterTypeName(Utils.java:994)[axis-wsdl2java]  at org.apache.axis.wsdl.toJava.JavaGeneratorFactory.constructSignature(JavaGeneratorFactory.java:1473)[axis-wsdl2java]  at 
org.apache.axis.wsdl.toJava.JavaGeneratorFactory.constructSignatures(JavaGeneratorFactory.java:1420)[axis-wsdl2java]  at org.apache.axis.wsdl.toJava.JavaGeneratorFactory.generatorPass(JavaGeneratorFactory.java:213)
[axis-wsdl2java]  at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:425)[axis-wsdl2java]  at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)[axis-wsdl2java]  at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run






(Parser.java:362)[axis-wsdl2java]  at java.lang.Thread.run(Thread.java:595)BUILD FAILED/home/simo/develop/java/WebDisk/build.xml:104: WSDL processing error for /home/simo/develop/java/WebDisk/src/it/uniroma2/informatica/WebDisk.wsdl :
nullTotal time: 3 seconds-WSDL?xml version=1.0 encoding=UTF-8?wsdl:definitions targetNamespace=






http://www.informatica.uniroma2.it/WebDisk/wsdl xmlns=http://schemas.xmlsoap.org/wsdl/
 xmlns:tns=
http://www.informatica.uniroma2.it/WebDisk/wsdl xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/
 xmlns:wsdl=
http://schemas.xmlsoap.org/wsdl/ xmlns:apachesoap=http://xml.apache.org/xml-soap
 xmlns:types=
http://www.informatica.uniroma2.it/WebDisk xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/
 xmlns:xsd=
http://www.w3.org/2001/XMLSchema name=WebDisk  wsdl:types  xsd:schema elementFormDefault=qualified   targetNamespace=






http://www.informatica.uniroma2.it/WebDisk/wsdl/types  xsd:import namespace=





http://www.informatica.uniroma2.it/WebDisk schemaLocation=/home/simo/develop/java/WebDisk/src/it/uniroma2/informatica/WebDisk.xsd/
  /xsd:schema /wsdl:types  wsdl:message name=listRequest  

Re: wsdl2java bug ???

2006-02-16 Thread Rodrigo Ruiz

Hi Simone,

Take a look at another axis example: samples/swa

It took me several days to notice this example was there :-D

Regards,
Rodrigo Ruiz



WSRF webservice proxy

2006-02-16 Thread Asaf Lahav








Hi,



Is
it possible to generate a WSRF webservice proxy using the WSDL2JAVA utility?



Asaf
Lahav

VP
RD, Prima Grid LTD.

Cellular:
972-54-4717955

Phone:
972-3-6540255

Fax:
972-3-6540254












Re: Remote Administration question

2006-02-16 Thread Vinicius Carvalho
Could someone please give me a hand here?Best RegardsOn 2/15/06, Vinicius Carvalho [EMAIL PROTECTED]
 wrote:Hello There! I've deployed my App in a remote server and I'd like to publish webservices from a remote machine. From the docs I've seen that I need to provide a custom 
server-config.wsdd so I add this to my WEB-INF dir:
deployment xmlns=http://xml.apache.org/axis/wsdd/ xmlns:java=
http://xml.apache.org/axis/wsdd/providers/java
service name=AdminService provider=java:MSG parameter name=className value=org.apache.axis.utils.Admin/ parameter name=allowedMethods value=*/
 parameter name=enableRemoteAdmin value=true//service/deploymentWell, ok, now when I run the AdminClient task I get another error:faultString: The AXIS engine could not find a target service to invoke! targetService is null
I also tried to pack inside my server-config all my services at once, well they get listed on the AxisServlet, but I can`t access the WSDL it says there's no SOAP service at the location.Could someone help me with this? What should be done to have a Axis engine that accepts remote services publishing
Regards




RE: Two WSDD's one Orion instance?? Classload error??

2006-02-16 Thread Phil Burgin



All,

After spending more time on this I've since discovered that 
the problem doesn't seem to be in the Class Loader, it is infact that you just 
don't seem to be able to run two applications using Axis on the same instance of 
Orion Application Server. Is this correct? I can't see why this would be a 
problem.

To prove this I've created two completly different example 
applications and then deployed them to there own instance of Orion - Both work 
fine. I then changed the setup so that they both got deployed to the same 
instance of Orion. As before the first one works fine, the second one fails. The 
actual web application and the EJB parts work fine its just the Axis bit that 
doesn't work (same error as before).

Any ideas?

Thanks.



From: Phil Burgin 
[mailto:[EMAIL PROTECTED] Sent: 16 February 2006 
11:02To: axis-user@ws.apache.orgSubject: Two WSDD's one 
Orion instance?? Classload error?? 

Using: Axis 1.3, Orion 2.0.5, Java 
1.4.1_02

Hi 
all,

I've been using Axis 
for the last couple of years very successfully, using a simple setup of 3 Orion 
instances (LIVE || TEST || UAT). Due to reasons out of my control the UAT and 
TEST enviroments are to be combined so that there is only one instance of Orion. 


The problem is that 
when I run the orion instance everything seems well and the UAT and TEST web 
sites work, when I go to siteswsdl's it all looks fine and the webservices 
can be called. However when I then look at the second sites wsdl's I get the 
error below. I beleive that what is going on is that the classes defined in my 
WSDD are been loaded into the same namespace by classloader, so the second site 
thinks it doesn't need to load them. All the classes implement serializable 
(they don't have a GID). I am really stuck with this, there must be something 
that I am missing.

I've attached the 
WSDD to this email - The @SERVER-ADD@ and @SERVER-BEAN@ are just values that are 
replaced by ANT at build time, depending on whether its LIVE || TEST || 
UAT.

Here is the error I 
get:
org.apache.axis.InternalException: 
org.apache.axis.ConfigurationException: 
org.apache.axis.deployment.wsdd.WSDDException: javax.xml.rpc.JAXRPCException: 
Null serializer factory specified.javax.xml.rpc.JAXRPCException: Null 
serializer factory specified.

Thanks in 
advance,

Phil BurginT + 44 (0) 1423 
532992 F + 44 (0) 1423 709439 
E [EMAIL PROTECTED] W www.FSLimited.com 
The information in 
this email and any files transmitted with it are confidential to the intended 
recipient at the e-mail address to which it has been addressed. The e-mail may 
not be disclosed or used by any other than the addressee, nor may it be copied 
in any way. If you have received this message in error please notify the sender 
by e-mail immediately and delete the message from your computer. Although this 
email and any attachments are believed to be free of any virus, or any other 
defect which might affect any computer or IT system into which they are received 
and opened, it is the responsibility of the recipient to ensure that they are 
virus free and no responsibility is accepted by Field Solutions Ltd for any loss 
or damage arising in any way from receipt or use thereof. FieldSolutions Ltd 
reserves the right to monitor all email communications through its internal and 
external networks. 
Field Solutions Ltd Keepers Lodge 
Barrow Road Denham Bury St Edmunds Suffolk IP29 5EQ 



RE: How to not send nillable=true for null elements in a SOAP message

2006-02-16 Thread Kasi, Anand
Tim,
 
   I have pasted some code to help guide you. Do the same where you have access 
to your MessageContext object in your class that extends the 
   BasicHandler interface. 
 
Anand

  Message response = msg.getResponseMessage();
  SOAPEnvelope responseEnvelope = response.getSOAPEnvelope();
  SOAPEnvelope requestEnvelope = msg.getRequestMessage().getSOAPEnvelope();
  java.util.Vector v = responseEnvelope.getBodyElements();

  Iterator it = v.iterator();
 
  while (it.hasNext())
  {
   SOAPBodyElement sbe = (SOAPBodyElement) it.next();
   NodeList nodes = doc.getElementsByTagName(NodeNameYouWantToRemove);
   if (nodes != null  nodes.getLength()  0)
   {
 removeAll(doc, Node.ELEMENT_NODE, NodeNameYouWantToRemove);  // 
removeAll method defined below
 responseEnvelope.removeBodyElement(sbe);  // removing 
soapBodyElement from responseEnvelope
 SOAPBodyElement newBody = new 
SOAPBodyElement(doc.getDocumentElement()); // create soapBody from transformed 
doc object 
  responseEnvelope.addBodyElement(newBody);  // Add new soap body 
to responseEnvelope
   }
 
  }
  

  //A generic removeAll method 
 public static void removeAll(Node node, short nodeType, String name) 
 {
   if (node.getNodeType() == nodeType 
 (name == null || node.getNodeName().equals(name))) 
   {
node.getParentNode().removeChild(node);
   } 
   else 
   {
// Visit the children
NodeList list = node.getChildNodes();
for (int i=0; ilist.getLength(); i++) 
{
 removeAll(list.item(i), nodeType, name);
}
   }
  }




From: Tim R J Langford [mailto:[EMAIL PROTECTED]
Sent: Thu 2/16/2006 4:37 AM
To: axis-user@ws.apache.org
Subject: Re: How to not send nillable=true for null elements in a SOAP message



Thanks Kasi,

OK I am trying thsi approach now as it si my final option.

I have created a handler class that extend BasicHandler and have
attached it to my outgoing Request SimpleChain in my
EngineConfiguration. I can grab the message context and display it as a
string. I also have access to the DOM and the various RPC elements, but
it is becoming fairly complicated and bespoke to try and remove these
nil elements. Is there any simple way of getting the string, processing
it to remove the elements and setting my desired string back again at
this level?

Thanks for your time,

Tim



Kasi, Anand wrote:

Write up a response flow handler that gets the response message from the
MessageContext object and removes the xsi:nil = true elements.


-Original Message-
From: Tim R J Langford [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 15, 2006 9:42 AM
To: axis-user@ws.apache.org
Subject: Re: How to not send nillable=true for null elements in a SOAP
message

Hello All,

I am still trying to remove 'nil=true' elements from my messages sent
out by axis. I have modified the wsdl in elements where I want axis not
to send these strings (i.e: have a blank element) as follows :

element name=sendNothingIfNull nillable=true type=xsd:string/

to :

element name=sendNothingIfNull nillable=false minOccurs=0
type=xsd:string/

so that instead of sending :

someXML
sendNothingIfNull xsi:type=xsd:string xsi:nil=true/
/someXML

I send something like :

someXML/someXML


I have tried a few other methods (such as the one Rod suggested not
specifying nillable at all in the schema and setting minOccurs=0)
but axis keeps sending these elements as nillable. Should this work or
am I making a mistake somwhere?

It may be PEBCAK but I just cant get axis1.3  to exhibit the behavior
the server expects. Is there any other lower level method in axis to
deal with this? (I traced the code calls down to the HTTP sender class
but even at this level there is no easy access to the string as it is
being passed by chunk encoded HTTP - and of course in some cases the
server we are trying to attach too actually wants us to send these
nillable=true elements so this approach is not suitable).

I know I must have exhausted all you guys by now! Sorry, and thanks.


Tim

PS: I am generating the axis code form the wsdl using the following ant
task configuration :

axis-wsdl2java
  output=${src.dir}
  deployScope=Application
  verbose=true
  serverSide=true
 wrapArrays=true
  url=eurostar_hack2.wsdl  
/axis-wsdl2java







Rodrigo Ruiz wrote:

 

By what you describe, I think you should add minOccurs='0' and remove
nillable='true'

Regards,
Rodrigo Ruiz

Tim R J Langford wrote:

   

Thanks Anne,

Thats what I thought. Unfortunatly our provider does not seem too
clued up on their tech, and the wsdl does not allow minOccurs=0.  I
 


 

guess I will have to update our automated build process to fix their
schema before generating my soap beans and classes. The best way to
do this would be by adding minOccurs=0 to the faulty elements I
presume?

Thanks to everybody for their time,


Problem with choice resulting in unwanted nil element

2006-02-16 Thread Niklas Koponen
Hi!

I'm having problems with an axis generated client.

I'm using Axis 1.2. I generate the client stubs with the goal which
comes with maven. The wsdl uses datastructures which are in a separate
file.  The client is generated ok except for the element where I have a
choice element. The datastructure looks like this

xs:complexType name=MyType
xs:sequence
xs:element name=id type=hoti:idType/
xs:choice
xs:element name=someElementOne 
type=hoti:ElementOneType/
xs:element name=someElementTwo 
type=hoti:ElementTwoType/
/xs:choice
/xs:sequence
/xs:complexType

When I don't set any value to someElementOne I get 

java.io.IOException: Non nillable element 'someElementOne' is null.

The types are complex types.

This is what I have in the wsdl as the binding:

  wsdl:binding name=HOTI_SOAP type=tns:HOTI
soap:binding style=document 
transport=http://schemas.xmlsoap.org/soap/http/

Any suggestions what I have done wrong?

-Niklas



Axis Bug? Returning array of compley type. hot deployment not possible

2006-02-16 Thread Nikunj Trivedi
Hi All,

When I deploy a service on Axis1.3-Tomcat5.5.15 and try to access it by any Java client(axis or weblogic) it sends wrong SOAP response message. 

1) However after restarting the server it works fine. Again redeploying will give above problem.
2) Pls note that it generates identical server-config.wsdd in both cases.
3) This also happens with Tomcat 4.1 server and any Java Client.
4)This happens only when the return type is array of Complex Type.

Here I am simply returing array of MyBean. The style is Document-wrapped.

It should return following response---
testResponse xmlns=http://nickstrivedi.com/MyService testReturn xsi:type=ns1:MyBean xmlns:ns1=
 http://nickstrivedi.com/MyService ns1:aa/ns1:a ns1:bb/ns1:b
 ns1:c10/ns1:c /testReturn  testReturn xsi:type=ns2:MyBean xmlns:ns2=
http://nickstrivedi.com/MyService ns2:aa/ns2:a ns2:bb/ns2:b ns2:c10/ns2:c /testReturn

.
 But it returns following 
Wrapps testReturn with one more testReturn element.
testResponse xmlns=http://nickstrivedi.com/MyService testReturn
 testReturn aa/a  bb/b c10/c /testReturn testReturn
 aa/a bb/b  c10/c /testReturn
...

Here is the WSDD file:

deployment
xmlns=http://xml.apache.org/axis/wsdd/
xmlns:java=http://xml.apache.org/axis/wsdd/providers/java
service name=MyService provider=java:RPC style=wrapped use=literal
parameter name=wsdlTargetNamespace value=http://nickstrivedi.com/MyService/
parameter name=wsdlServiceElement value=MyServiceService/
parameter name=schemaQualified value=http://nickstrivedi.com/MyService/
parameter name=wsdlServicePort value=MyService/
parameter name=className value=server.MyService/
parameter name=wsdlPortType value=MyService/
parameter name=typeMappingVersion value=1.2/
operation name=test qname=operNS:test xmlns:operNS=http://nickstrivedi.com/MyService
returnQName=retNS:testReturn xmlns:retNS=http://nickstrivedi.com/MyService 
returnType=rtns:ListOfMyBean xmlns:rtns=http://nickstrivedi.com/MyService 
soapAction= 
/operation
parameter name=allowedMethods value=test/
parameter name=scope value=Request/
arrayMapping
xmlns:ns=http://nickstrivedi.com/MyService
qname=ns:ListOfMyBean
type=java:server.MyBean[]
languageSpecificType=java:server.MyBean[]
innerType=ns:MyBean
encodingStyle=
/
typeMapping
xmlns:ns=http://nickstrivedi.com/MyService
qname=ns:MyBean
type=java:server.MyBean
serializer=org.apache.axis.encoding.ser.BeanSerializerFactory
deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
encodingStyle=
/
/service
/deployment

Regards
Nikunj


[Axis2-0.94] messages with RelatesTo message id are not processed

2006-02-16 Thread Andreas Bobek

Hi all,

I have a problem related to the message id in the RelatesTo SOAP header:

If somebody sends a message with a RelatesTo message id, Axis tries to find
the related OperationContext when the InstanceDispatcher is invoked.
OperationContext are stored in the operation context map within
ConfigurationContext. If a related OperationContext is not found there,
AxisFault is thrown and message processing stops.

How can I disable this feature? Because in my case the first message (the
outgoing one) is a out-only MEP, e.g. fire and forget. And the response
messages (there can be more than one) are in-only MEPs which contain the
message id of the first message in the RelatesTo header.

Thanks, Andreas Bobek.




Re: wsdl2java bug ???

2006-02-16 Thread Rodrigo Ruiz
From the logs you give in your post, it seems you are trying to catch 
the wrong error :-)


The NoSuchMethodException is not an error condition. If you watch the 
axis source code you will see that it is just a first attempt to get a 
factory instance. Just after this log entry, there is a second attempt 
(using another approach) and this one is successful.


The real problem is this one:

1047 [main] DEBUG org.apache.axis.ConfigurationException   - Exception:
org.apache.axis.ConfigurationException: No service named WebDiskSOAP is 
available

1048 [main] DEBUG org.apache.axis.ConfigurationException  - Exception:
org.apache.axis.ConfigurationException: No service named 
http://www.informatica.uniroma2.it/WebDisk/wsdl/upload 
http://www.informatica.uniroma2.it/WebDisk/wsdl/upload is available


It seems the service is not correctly deployed on axis, and therefore, 
it does not know how to handle your service soapAction.



Best Regards,
Rodrigo Ruiz

Simone Bonazzoli wrote:
i see that example but i have a problem and i didn't be able to 
resolve it...

the title of the mail sended in this mailing list is SWA PRoblem...

howevere i paste the text below if u can help me i appreciate 
your help :)


Simone

-
Hi, i'm developing a simple webservice that support the upload and 
download of binary files... i look at the example swa present in the 
samples directory of the axis distribution
i customize my wsdl and all otherthings but when i try to run my 
client the axis.log report this exception:


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




Re: How to not send nillable=true for null elements in a SOAP message

2006-02-16 Thread Tim R J Langford

Thanks Anand,

I really appreciate your help, and thankyou for supplying your source 
code. It was very kind.


I was infact trying a similar method too,  although I need to process my 
outgoing request, which I accessed using either:


SOAPEnvelope currentEnvelope = 
msgContext.getCurrentMessage().getSOAPEnvelope();

or
SOAPEnvelope requestEnvelope = 
msgContext.getRequestMessage().getSOAPEnvelope();



The problem occurs when manipulating the DOM however, when I call 
'getElementsByTagName(str)' with a label I know exists, or even 
'getChildren()' recursively on nodes I can only decend two levels into 
my DOM based message structure before I start obtaining nulls for 
subsequent children. When I run it in a debugger I can see my data 
wrapped in a 'RPCParam' element a few nodes down, and can even 
'getAsString()' but I cannot manipulate it any further using the DOM. I 
can process the 'getAsString()' output  to remove the required elements 
but when I try to set it using the 'rpcParam.setValue(processedStr)' 
method, my  and  tag markers (the one of elements that cant be 
accessed with the DOM programatically) get converted to lt; and 
gt; respectively which obviously screws the xml.


Have I made a mistake further up in my methodology? Wrong WSDL2Java 
options, or their schema is broken in a way that somehow causes this 
strange DOM behaviour (ie 2 nodes of DOM, and the rest hidden in an 
element that returns null when asking for all children - even though 
they are displayed in the debugger)?


Am I being a n00b? I dont know a lot about SOAP/RPC/etc (hence using the 
Axis framework), and so I dont know why I cant access these elements 
programatically. All I want to do is strip out the nillable elements! 
Why doesnt setting nilable=false and/or minOccurs=0 in the WSDL 
stop Axis sending these elements?



Anyway, thankyou for your help and especially your code. Glad to know I 
was not being stupid (I hope!)


Sorry to everyone else for bombing the list so much... I am going nuts! 
I dont wanna try and hack the HTTPSender class!


Thanks

Tim





Kasi, Anand wrote:


Tim,

  I have pasted some code to help guide you. Do the same where you have access to your MessageContext object in your class that extends the 
  BasicHandler interface. 


Anand

 Message response = msg.getResponseMessage();
 SOAPEnvelope responseEnvelope = response.getSOAPEnvelope();
 SOAPEnvelope requestEnvelope = msg.getRequestMessage().getSOAPEnvelope();
 java.util.Vector v = responseEnvelope.getBodyElements();

 Iterator it = v.iterator();

 while (it.hasNext())
 {
  SOAPBodyElement sbe = (SOAPBodyElement) it.next();
  NodeList nodes = doc.getElementsByTagName(NodeNameYouWantToRemove);
  if (nodes != null  nodes.getLength()  0)
  {
removeAll(doc, Node.ELEMENT_NODE, NodeNameYouWantToRemove);  // 
removeAll method defined below
responseEnvelope.removeBodyElement(sbe);  // removing 
soapBodyElement from responseEnvelope
SOAPBodyElement newBody = new SOAPBodyElement(doc.getDocumentElement()); // create soapBody from transformed doc object 
 responseEnvelope.addBodyElement(newBody);  // Add new soap body to responseEnvelope

  }

 }
 

 //A generic removeAll method 
public static void removeAll(Node node, short nodeType, String name) 
{

  if (node.getNodeType() == nodeType 
(name == null || node.getNodeName().equals(name))) 
  {

   node.getParentNode().removeChild(node);
  } 
  else 
  {

   // Visit the children
   NodeList list = node.getChildNodes();
   for (int i=0; ilist.getLength(); i++) 
   {

removeAll(list.item(i), nodeType, name);
   }
  }
 }




From: Tim R J Langford [mailto:[EMAIL PROTECTED]
Sent: Thu 2/16/2006 4:37 AM
To: axis-user@ws.apache.org
Subject: Re: How to not send nillable=true for null elements in a SOAP message



Thanks Kasi,

OK I am trying thsi approach now as it si my final option.

I have created a handler class that extend BasicHandler and have
attached it to my outgoing Request SimpleChain in my
EngineConfiguration. I can grab the message context and display it as a
string. I also have access to the DOM and the various RPC elements, but
it is becoming fairly complicated and bespoke to try and remove these
nil elements. Is there any simple way of getting the string, processing
it to remove the elements and setting my desired string back again at
this level?

Thanks for your time,

Tim



Kasi, Anand wrote:

 


Write up a response flow handler that gets the response message from the
MessageContext object and removes the xsi:nil = true elements.


-Original Message-
From: Tim R J Langford [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 15, 2006 9:42 AM
To: axis-user@ws.apache.org
Subject: Re: How to not send nillable=true for null elements in a SOAP
message

Hello All,

I am still trying to remove 'nil=true' elements from my messages sent
out by axis. I have modified the wsdl in elements where I want 

[Axis2] read documentation but still lost

2006-02-16 Thread Andreas Bohnert
hello,

I have downloaded 0.94, have had a look at the documentation and the
samples, but I have still a couple of questions and I hope the axis
community can help me out:

1.) Axis2SampleDocLit seems to be an example for document literal, so
why are the operations (echoString, echoStringArray..) inside the wsdl
are type rpc?

2.) My webservice client has to be independant from further changes to
the wsdl. That means: if I do enhance my webservice and change the wsdl
(e.g.: add fields to a complex type structure) my client should still
run without modifications ( get the content minus the new fields)
Is that possible or do I get deserialization errors then (because the
complex type has changend)?

3.) the best thing for me would be, if I'm able to deal with the soap
body entries directly. it seems to be easy to iterate through the
entries and get what I want. so I would not run into the problems I
descriped in 2.)
a.) is there a technique for doing so?
b.) how can I do this with axis or shouldn't I use axis in this case?

I'm really thankfull for any advices!!
andreas



Re: WSRF webservice proxy

2006-02-16 Thread José Antonio Sánchez
I tried, but I couldn't generate it because it was complaining about a missing schema. Now I'm using the provided soapclient and sending raw messages to the service.On 2/16/06, 
Asaf Lahav [EMAIL PROTECTED] wrote:














Hi,



Is
it possible to generate a WSRF webservice proxy using the WSDL2JAVA utility?



Asaf
Lahav

VP
RD, Prima Grid LTD.

Cellular:
972-54-4717955

Phone:
972-3-6540255

Fax:
972-3-6540254












-- Saludos.José Antonio Sánchez


Re: wsdl2java bug ???

2006-02-16 Thread Simone Bonazzoli
thank you for the information i will tryregardssimoneOn 2/16/06, Rodrigo Ruiz [EMAIL PROTECTED]
 wrote: From the logs you give in your post, it seems you are trying to catch
the wrong error :-)The NoSuchMethodException is not an error condition. If you watch theaxis source code you will see that it is just a first attempt to get afactory instance. Just after this log entry, there is a second attempt
(using another approach) and this one is successful.The real problem is this one:1047 [main] DEBUG org.apache.axis.ConfigurationException - Exception:org.apache.axis.ConfigurationException: No service named WebDiskSOAP is
available1048 [main] DEBUG org.apache.axis.ConfigurationException- Exception:org.apache.axis.ConfigurationException: No service namedhttp://www.informatica.uniroma2.it/WebDisk/wsdl/upload
http://www.informatica.uniroma2.it/WebDisk/wsdl/upload is availableIt seems the service is not correctly deployed on axis, and therefore,
it does not know how to handle your service soapAction.Best Regards,Rodrigo RuizSimone Bonazzoli wrote: i see that example but i have a problem and i didn't be able to resolve it...
 the title of the mail sended in this mailing list is SWA PRoblem... howevere i paste the text below if u can help me i appreciate your help :) Simone -
 Hi, i'm developing a simple webservice that support the upload and download of binary files... i look at the example swa present in the samples directory of the axis distribution
 i customize my wsdl and all otherthings but when i try to run my client the axis.log report this exception: java.lang.NoSuchMethodException: org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.create
(java.lang.Class, javax.xml.namespace.QName)


Re: [Axis2] read documentation but still lost

2006-02-16 Thread robert
Hi Andreas, see below: 

Em Quinta 16 Fevereiro 2006 11:40, o Andreas Bohnert escreveu:
 hello,

 I have downloaded 0.94, have had a look at the documentation and the
 samples, but I have still a couple of questions and I hope the axis
 community can help me out:

 1.) Axis2SampleDocLit seems to be an example for document literal, so
 why are the operations (echoString, echoStringArray..) inside the wsdl
 are type rpc?

Do search for Axis2SampleDocLit.wsdl and you'll find that it is indeed rpc / 
lit. You can find a simple doc / lit example in the code generation guide - 
showing how to use ant with wsdl2java. 


 2.) My webservice client has to be independant from further changes to
 the wsdl. That means: if I do enhance my webservice and change the wsdl
 (e.g.: add fields to a complex type structure) my client should still
 run without modifications ( get the content minus the new fields)
 Is that possible or do I get deserialization errors then (because the
 complex type has changend)?

This question comes up a lot recently. First, AFAIK you won't see the axis 1.x 
deserialization errors in axis2. As far as not syncing changes, I myself 
haven't found a compelling reason to not sync changes and so I haven't tried 
it. However, what you could do is trying to define your new elements as: 

element minOccurs=0 maxOccurs=1

And see what that does, ie, not syncing the changes. And let us know. 


 3.) the best thing for me would be, if I'm able to deal with the soap
 body entries directly. it seems to be easy to iterate through the
 entries and get what I want. so I would not run into the problems I
 descriped in 2.)
 a.) is there a technique for doing so?

You can implement handlers to access the bodies and access all the elements, 
but I don't see how it solves your problem. If you have fewer fields arriving 
from the client because it hasn't been synced, how does modifying the body 
help you? Maybe I misunderstand the question. 

 b.) how can I do this with axis or shouldn't I use axis in this case?


There's probably an easier way. 

 I'm really thankfull for any advices!!
 andreas

HTH,
Robert  
http://www.braziloutsource.com/


RE: custom SoapFault in Axis2

2006-02-16 Thread Jesse Stockall



Were the changes in the axis engine or in the object model 
and SOAP message code? I posted an issue to Jira and I'm wondering if it might 
be affected by your changes.

http://issues.apache.org/jira/browse/AXIS2-413

Thanks

Jesse

  
  
  From: Eran Chinthaka 
  [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 14, 2006 
  12:37 PMTo: axis-user@ws.apache.orgSubject: Re: custom 
  SoapFault in Axis2
  Hi Magnus and all,I just fixed some of the bugs that were 
  there with the fault handling and added a test case too for that. Now you can 
  use the customized fault handling. See [1], if you wanna know how to create 
  custom faults.Let me know if you have any more concerns on 
  this.-- Chinthaka[1] : http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/FaultHandler.javaEran 
  Chinthaka wrote: 
  Hi Magnus,

Magnus Olsson wrote:

  
Hi Erin,
 

You must have meant Eran ;-)

  
how would I create a custom SOAP Fault if the fault is generated by Axis (i.e. not in the service itself)? Lets say that the service is missing, could the SOAP Fault be customized somehow? By using a handler in the out fault flow?
 

Sorry for the late reply. I'm writing a test case for you all to see how
faults can be custommized. I'm not done with this test, but you can have
a look at that.

What I have done there was, I deployed a handler in the server side,
which simply throw an AxisFault. Before that it puts some information to
the message context, so that Axis2 fault handling is picking that up.
I invoked a service from ServiceClient and trying to validate the recd
SOAPfault. I found some bugs in om and Axis2 engine. Give me some time
to finish this, but if you want you can take a loot at the test
org.apache.axis2.engine.FaultHandlingTest in integration module [1].
(this is not a test still, I'm testing with a System.out. Will put a
XMLUnit in to this soon)

-- Chinthaka

[1] :
http://svn.apache.org/viewcvs.cgi/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/FaultHandlingTest.java?view=markup


  
 




Re: wsdl2java bug ???

2006-02-16 Thread Simone Bonazzoli
rodriguo, i think that the service is deployed correctly... this is the wsdd. any suggests???simone!-- Use this file to deploy some handlers/chains and services --!-- Two ways to do this: --
!-- java org.apache.axis.client.AdminClient deploy.wsdd --!-- after the axis server is running --!-- or --
!-- java org.apache.axis.utils.Admin client|server deploy.wsdd --!-- from the same directory that the Axis engine runs --deployment xmlns=
http://xml.apache.org/axis/wsdd/ xmlns:java=http://xml.apache.org/axis/wsdd/providers/java !-- Services from WebDiskService WSDL service --
 service name=WebDiskSOAP provider=java:RPC style=document use=literal parameter name=wsdlTargetNamespace value=
http://www.informatica.uniroma2.it/WebDisk/wsdl/ parameter name=wsdlServiceElement value=WebDiskService/ parameter name=schemaQualified value=
http://www.informatica.uniroma2.it/WebDisk/wsdl/types/ parameter name=schemaUnqualified value=
http://www.informatica.uniroma2.it/WebDisk/ parameter name=wsdlServicePort value=WebDiskSOAP/ parameter name=className value=it.uniroma2.informatica.webservices.WebDiskSOAPBindingImpl
/ parameter name=wsdlPortType value=WebDiskPortType/ parameter name=typeMappingVersion value=1.2/  operation name=list qname=list returnQName=retNS:listResponse xmlns:retNS=
http://www.informatica.uniroma2.it/WebDisk returnType=rtns:listResponse soapAction=
http://www.informatica.uniroma2.it/WebDisk/wsdl/list  parameter qname=pns:listRequest xmlns:pns=http://www.informatica.uniroma2.it/WebDisk
 type=tns:listRequest xmlns:tns=http://www.informatica.uniroma2.it/WebDisk/ /operation operation name=upload qname=upload returnQName=retNS:uploadResponse xmlns:rtNS=
http://www.informatica.uniroma2.it/WebDisk returnType=xsd:string soapAction=
http://www.informatica.uniroma2.it/WebDisk/wsdl/upload  parameter qname=fileName type=pns:string xmlns:pns=http://www.w3.org/2001/XMLSchema
/ parameter qname=file type=pns:Multipart xmlns:pns=http://xml.apache.org/xml-soap/ /operation
 parameter name=allowedMethods value=list upload/ requestFlow  handler type=soapmonitor/ /requestFlow responseFlow
 handler type=soapmonitor/ /responseFlow typeMapping xmlns:ns=http://www.informatica.uniroma2.it/WebDisk
 qname=ns:listRequest type=java:it.uniroma2.informatica.types.ListRequest serializer=org.apache.axis.encoding.ser.castor.CastorSerializerFactory
 deserializer=org.apache.axis.encoding.ser.castor.CastorDeserializerFactory encodingStyle= / typeMapping xmlns:ns=
http://www.informatica.uniroma2.it/WebDisk qname=ns:listResponse type=java:it.uniroma2.informatica.types.ListResponse serializer=org.apache.axis.encoding.ser.castor.CastorSerializerFactory
 deserializer=org.apache.axis.encoding.ser.castor.CastorDeserializerFactory encodingStyle= / typeMapping xmlns:ns=
http://www.informatica.uniroma2.it/WebDisk qname=ns:myFileType type=java:it.uniroma2.informatica.types.MyFileType serializer=org.apache.axis.encoding.ser.castor.CastorSerializerFactory
 deserializer=org.apache.axis.encoding.ser.castor.CastorDeserializerFactory encodingStyle= / typeMapping xmlns:ns=
http://www.informatica.uniroma2.it/WebDisk qname=ns:DataHandler type=java:javax.activation.DataHandler serializer=org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory
 deserializer=org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory encodingStyle= //service/deployment
On 2/16/06, Simone Bonazzoli [EMAIL PROTECTED] wrote:
thank you for the information i will tryregardssimoneOn 2/16/06, Rodrigo Ruiz
 [EMAIL PROTECTED]
 wrote: From the logs you give in your post, it seems you are trying to catch
the wrong error :-)The NoSuchMethodException is not an error condition. If you watch theaxis source code you will see that it is just a first attempt to get afactory instance. Just after this log entry, there is a second attempt
(using another approach) and this one is successful.The real problem is this one:1047 [main] DEBUG org.apache.axis.ConfigurationException - Exception:org.apache.axis.ConfigurationException: No service named WebDiskSOAP is
available1048 [main] DEBUG org.apache.axis.ConfigurationException- Exception:org.apache.axis.ConfigurationException: No service named
http://www.informatica.uniroma2.it/WebDisk/wsdl/upload
http://www.informatica.uniroma2.it/WebDisk/wsdl/upload is available
It seems the service is not correctly deployed on axis, and therefore,
it does not know how to handle your service soapAction.Best Regards,Rodrigo RuizSimone Bonazzoli wrote: i see that example but i have a problem and i didn't be able to resolve it...
 the title of the mail sended in this mailing list is SWA PRoblem... howevere i paste the text below if u can help me i appreciate your help :) Simone -
 Hi, i'm developing a simple webservice that support the upload and download of binary files... i look at the example swa present in the samples directory of the axis distribution

 i customize my wsdl and all otherthings but 

Re: Simplesession, soap header not appeared in the generated wsdl

2006-02-16 Thread Sueveges Gyoergy

Hi

 Thanx for the answers.
Now I use the possibility of the http session, cookies, and it works (also  
with axis-generated source). (Some parts have to be done till tomorrow,   
so it is ok now) But in the future I will consider your suggests (session  
handling of my own with uuid,..), because maybe we will use other than  
http as transport layer.


Cheers,
 George



On Wed, 15 Feb 2006 09:18:48 -0200, robert [EMAIL PROTECTED]  
wrote:



For an alternative, as simple as it seems what I often employ is just
generating an id myself using the uuid standard (java.util.uuid or
commons-id) and passing that back after login. Or you can do something
similar with an ejb stateful session bean. So I just have a wsdl  
template I

use just about everywhere via 'extension base'  .

Axis2 also does generate an uuid which is sent in the soap message via
ws-addressing. I still typically just handle it myself due to a wide  
range of

integration issues and legacy support - though I am watching the
ws-addressing standard as it evolves and all the soap engines support it.

HTH,
Robert
http://www.braziloutsource.com/

Em Quarta 15 Fevereiro 2006 07:02, o Richard Gregory escreveu:

Hi George,

Unfortuntely, axis does not include the SimpleSessionHandler details in
the wsdl it generates, or any header details as far as I know.
Similarly, if you write the wsdl yourself  (see the example wsdl below,
with the relevant parts highlighted in *bold*) to include the required
information, axis will not include it in any of the files created on the
client side, although it will be incoprporated by any .Net clients
genreated from the wsdl (so if your services will be used by .Net
clients it is worth doing). For axis clients, the only option is to
include documentation/ elements in a hand written wsdl to state that
the SimpleSessionHandler is needed on the client side.

Cheers,

Richard.

wsdl:definitions  
targetNamespace=urn:wsdl.quickquery.ws.biors.biomax.de

xmlns=http://schemas.xmlsoap.org/wsdl/;
xmlns:apachesoap=http://xml.apache.org/xml-soap;
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
*xmlns:sess=http://xml.apache.org/axis/session*
xmlns:tns=urn:wsdl.quickquery.ws.biors.biomax.de
xmlns:types=urn:quickquery.ws.biors.biomax.de

wsdl:documentationWeb Service providing the ability to query a BioRS
server with a simple text query. Clients invoking the service specify a
simple text query with one or more search terms linked with AND/OR  
(or
amp;/|) operators, which will be evaluated against the BioRS  
server's
AllText index (or indices). The result format to be returned and the  
list

of databanks to be searched  must be provided as parameters, and also
optionally, a specific list of elements to be returned (only applicable  
to

the ELEMENTS and XML_ELEMENTS result formats). Clients with their own
username/password for the BioRS server may provide these parameters, or  
if

these a provided as null a default quot;guestquot; username is used. A
session is maintained between the client and service via SOAP Header
session IDs, and each invocation of an operation of the service returns  
a

successive entry from the set of entries matching the given query, or a
message indicating that no entries matched the query. Each entry is
returned with the number of the entry and the total number of entries
matching the query, enabling clients to determine when all entries have
been returned. In order to make use of the SOAP header session IDs,  
Apache

Axis clients need only to include the
org.apache.axis.handlers.SimpleSessionHandler in the request and  
response
flows of the client. Clients based on proxy classes generated by  
Microsoft

Visual Studio from this WSDL will have the code required to use the
sessions in the proxy. /wsdl:documentation

wsdl:types

*!-- SOAP Header Session ID --

schema targetNamespace=http://xml.apache.org/axis/session;
xmlns=http://www.w3.org/2001/XMLSchema; simpleType name=sessID
restriction base=xsd:long/
/simpleType
element name=sessionID type=sess:sessID/
/schema*

xsd:schema xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns=urn:quickquery.ws.biors.biomax.de
targetNamespace=urn:quickquery.ws.biors.biomax.de

!-- Input message elements --

xsd:simpleType name=formatType
wsdl:documentation
	Enumeration type giving the possible data formats in which entries  
can

be retrieved from the BioRS server. FASTA - FASTA format.
ENTRY - Complete entries in source 
formatting.
XML_ENTRY - Complete entry in 

Redirecting message calls with a handler

2006-02-16 Thread Patrick McNally
Hey guys,

Sent this out before but I didn't get any response.  Can anyone tell
me what the correct way is to redirect an operation through a handler?
 For example, a user has always called a function called monkey() on
my webservice.  But now monkey() is outdated so I want any incoming
messages for monkey() to be redirected to donkey().  What is the
correct way to do this?

My original message is below (if you want more details) and I will
post (attach) code if that would help.  Any suggestions on other
sites/lists that might have an answer would be appreciated too.

Thanks,
Patrick


Original Message:
--
Hi everybody,

I'm new to Axis and I need help getting functions redirected.  Here is
the scenario:

We have a webservice with a defined interface that we must maintain.
It has functions like getX() and getY().  We want to change our code
so we only have one get() function that is used when any get_()
request is recieved.  I have a handler to do this but I don't
understand why it functions like it does and it leads me to believe
that I'm messing it up.

If our service class has getX() and getY() methods defined then I can
use the messageContext to get the OperationDesc and us its setMethod()
call to redirect it to our get() method.

However, we don't want to have empty getX() and getY() methods and if
I remove them it throws an exception when I call
messageContext.getOperation() (I'm assuming because the method getY()
does not exist).  I fixed this by doing the following:

messageContext.setOperation(null);
OperationDesc opDesc = messageContext.getOperationByQName(new QName(get));
messageContext.setOperation(opDesc);

This works if the original Operation they requested does not exist.
However, if it does, it won't set it to the get() method and still
calls the old getY() method.

In essence, I want to have a class with only a get() method.  However,
I want people to be able to send requests for a getY() method and have
my handler redirect it to the get() method.  What is the proper way to
accomplish this?

Thanks,
Patrick


wsdl, attachment

2006-02-16 Thread Sueveges Gyoergy

Hi all (again :)

I would like to write such a service method, that can get receive binary  
files (so it can recieve soap attachments). I tested the sample service  
sample/attachments (like Simone and Fabricio  
http://marc.theaimsgroup.com/?l=axis-userm=113940005201713w=2), it works  
(also the hand written client), but when trying to create client from the  
wsdl WSDL2java throws an exception that DataHandler is not defined (and it  
is really not deined).
 Is there possibility to create a webmethod, from that the generated wsdl  
contains also the attachment informations? Or Is it always better to use  
the generated wsdl as a template, so always to insert the attachment  
information into it?

I use Axis 1.3

Thnx for the help
 George


thrown exception when calling WSDL2java:

java.io.IOException: Type {urn:EchoAttachmentsService}DataHandler is  
referenced

but not defined.
at  
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(Symbol

Table.java:665)
at  
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545

)
at  
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav

a:518)
at  
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav

a:495)
at  
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)

at java.lang.Thread.run(Unknown Source)



axis-generated WSDL

?xml version=1.0 encoding=UTF-8?
wsdl:definitions
targetNamespace=http://localhost:8085/axis/services/urn:EchoAttachmentsService;
xmlns:apachesoap=http://xml.apache.org/xml-soap;
xmlns:impl=http://localhost:8085/axis/services/urn:EchoAttachmentsService;
xmlns:intf=http://localhost:8085/axis/services/urn:EchoAttachmentsService;
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:tns1=urn:EchoAttachmentsService
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)--
 wsdl:types
  schema
targetNamespace=http://localhost:8085/axis/services/urn:EchoAttachmentsService;
xmlns=http://www.w3.org/2001/XMLSchema;
   import namespace=urn:EchoAttachmentsService/
   import namespace=http://schemas.xmlsoap.org/soap/encoding//
   complexType name=ArrayOf_tns1_DataHandler
complexContent
 restriction base=soapenc:Array
  attribute ref=soapenc:arrayType  
wsdl:arrayType=tns1:DataHandler[]/

 /restriction
/complexContent
   /complexType
  /schema
 /wsdl:types

   wsdl:message name=echoDirRequest

  wsdl:part name=attachments type=impl:ArrayOf_tns1_DataHandler/

   /wsdl:message

   wsdl:message name=echoDirResponse

  wsdl:part name=echoDirReturn  
type=impl:ArrayOf_tns1_DataHandler/


   /wsdl:message

   wsdl:message name=echoResponse

  wsdl:part name=returnqname type=tns1:DataHandler/

   /wsdl:message

   wsdl:message name=echoRequest

  wsdl:part name=dh type=tns1:DataHandler/

   /wsdl:message

   wsdl:portType name=EchoAttachmentsService

  wsdl:operation name=echo parameterOrder=dh

 wsdl:input message=impl:echoRequest name=echoRequest/

 wsdl:output message=impl:echoResponse name=echoResponse/

  /wsdl:operation

  wsdl:operation name=echoDir parameterOrder=attachments

 wsdl:input message=impl:echoDirRequest name=echoDirRequest/

 wsdl:output message=impl:echoDirResponse  
name=echoDirResponse/


  /wsdl:operation

   /wsdl:portType

   wsdl:binding name=urn:EchoAttachmentsServiceSoapBinding
type=impl:EchoAttachmentsService

  wsdlsoap:binding style=rpc
transport=http://schemas.xmlsoap.org/soap/http/

  wsdl:operation name=echo

 wsdlsoap:operation soapAction=/

 wsdl:input name=echoRequest

wsdlsoap:body
encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
namespace=http://localhost:8085/axis/services/urn:EchoAttachmentsService;
use=encoded/

 /wsdl:input

 wsdl:output name=echoResponse

wsdlsoap:body
encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
namespace=http://localhost:8085/axis/services/urn:EchoAttachmentsService;
use=encoded/

 /wsdl:output

  /wsdl:operation

  wsdl:operation name=echoDir

 wsdlsoap:operation soapAction=/

 wsdl:input name=echoDirRequest

wsdlsoap:body
encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
namespace=http://attachments.samples; use=encoded/

 /wsdl:input

 wsdl:output name=echoDirResponse

wsdlsoap:body
encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
namespace=http://localhost:8085/axis/services/urn:EchoAttachmentsService;
use=encoded/

 /wsdl:output

  /wsdl:operation

   /wsdl:binding

   wsdl:service name=EchoAttachmentsServiceService

  wsdl:port binding=impl:urn:EchoAttachmentsServiceSoapBinding
name=urn:EchoAttachmentsService

 

Re: [Axis2] read documentation but still lost

2006-02-16 Thread Andreas Bohnert
thanks a lot for your answer, robert!


 Do search for Axis2SampleDocLit.wsdl and you'll find that it is indeed rpc / 
 lit. You can find a simple doc / lit example in the code generation guide - 
 showing how to use ant with wsdl2java. 

ah, great, I missed that because I was working with the eclipse plugin
instead.
isn't it strange, that axis2 goes for document literal and provides a
rpc literal example?

 
 This question comes up a lot recently. First, AFAIK you won't see the axis 
 1.x 
 deserialization errors in axis2. As far as not syncing changes, I myself 
 haven't found a compelling reason to not sync changes and so I haven't tried 
 it. However, what you could do is trying to define your new elements as: 
 
 element minOccurs=0 maxOccurs=1


I'm not sure what you mean with 'sync changes'.Is there a technique to
automatically sync wsdl changes to the webservice client?
Am I'm doing something wrong?
my situation is this:

the webservice client asks for data and the service is returning an
array of complex data objects. the client displays the data or whatever.

I give the client to different customers. some of them will use the
client, some of them will build their own solution based on my example
client.
now, if I have to change my webservice ( add fields to my complex data
object) our customers will be notified. some of them will update their
client, but some of them wont.
And I want to satisfy both with one webservice.
when I use wsdl2java generator to build up the client, a java bean is
generated for each complex type, so this beans (the old and the one
after the update) do not match after a change and that's why I was
asking for deserialization errors.


 You can implement handlers to access the bodies and access all the elements, 
 but I don't see how it solves your problem. If you have fewer fields arriving 
 from the client because it hasn't been synced, how does modifying the body 
 help you? Maybe I misunderstand the question. 

I don't want to modify the body. I just want to read the content on the
client side.
If I write the client in such a way, that it parse the returned soap
body (the returned array of data objects), in this case, I don't depend
on a static bean. this will still work after an update (adding fields)
to the service.

please correct me, if I have someting wrong on my mind.
thanks again, andreas




WS-I Compliant messages.

2006-02-16 Thread Scott McCoy
Hello, I am trying to build a mechanism for which authentication takes place in the header. I was able to easily write a lower-level component I can use in the requestFlow/ of my WSDD, the only problem exists in that I need a WSDL that can easily be used to generate a client interface. What are a few solutions for this? I know I can specify my own WSDL through my WSDD, but I am also using WSDL2Java and I don't really want to specify a WSDL other than the one I am using for code generation.
 I've found a few threads about this, and I used one of them to specify my mechanism for including my header in RPC-style arguments...this allowed me to build a service that accepted two arguments, one for my main body element one for my header element - But I found that in my code when it was actually running, both parts of the message came through in the body.
 It doesn't matter to me if the authentication is specified through the request flow, or not, but it is part of my specification that it must belong to the header, and I need to have a WS-I compliant WSDL, and it needs to properly match my web service so clients can easily be built.
My message needs to look something like:Envelope Header credentials username=... password=../ /Header Body createAccount
 account name=.. daily-cap=.. auto-renew=../ /createAccount /Body/Element


Re: problems with initial Axis installation.

2006-02-16 Thread Jim Azeltine
You said it yourself!   "I searched my system for tools.jar and so I copied the one I have in c:\j2dsk1.4.2_10\lib to axis\WEB-INF\lib "  Then your error said::Invalid class file format in C:\Program Files\Java\jre1.5.0_06\lib\rt.jar(java/util/Enumeration.class)."  Do you see it? You have two different versions of Java in play.   The next thing is that the correct version of tools.jar needs to go in the Tomcat/common/lib directory, not axis. Make sense now? 8)HTH!JimJim Strathmeyer [EMAIL PROTECTED] wrote:So I have Axis set up under Tomcat on WinXP. I’m not very experienced with Tomcat, MS Windows, or Java, but still very experienced with computers. I’m having some huge problems setting up axis.First off, when I load http://localhost:8080/axis/EchoHeaders.jws?method=list I would get a “tools.jar: file not found” error. I searched my system for tools.jar and so I copied the one I have in c:\j2dsk1.4.2_10\lib to axis\WEB-INF\lib and I get the faultstring “Error while compiling: C:\Program Files\Tomcat 5.5\webapps\axis\WEB-INF\jwsClasses\EchoHeaders.java”, and the errors starts out to say: “Error compiling C:\Program Files\Tomcat 5.5\webapps\axis\WEB-INF\jwsClasses\EchoHeaders.java: Line 0, column 0: could not parse error message: Note: sun.tools.javac.Main has been deprecated. error: Invalid class file format in C:\Program Files\Java\jre1.5.0_06\lib\rt.jar(java/util/Enumeration.class). The major.minor version '49.0' is too recent for this tool to understand.  C:\Program Files\Tomcat 5.5\webapps\axis\WEB-INF\jwsClasses\EchoHeaders.java:22: Class java.util.Enumeration not found in import.”Second, in the userguide I am trying to run the test client under the heading “Consuming Web Services with Axis: Basics – Getting Started”. If I go into the axis-classes directory and type ‘java samples.userguide.example1.TestClient’ I get “Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis/client/Service at samples.userguide.example1.TestClient.main(TestClient.java:31)”.However, if I go into the samples\userguide\example1 directory and type “java TestClient” I get the following error:Exception in thread "main" java.lang.NoClassDefFoundError: TestClient (wrong name: samples/userguide/example1/TestClient)   at java.lang.ClassLoader.defineClass0(Native Method)   at java.lang.ClassLoader.defineClass(Unknown Source)   at java.security.SecureClassLoader.defineClass(Unknown Source)   at java.net.URLClassLoader.defineClass(Unknown Source)   at java.net.URLClassLoader.access$100(Unknown Source)   at java.net.URLClassLoader$1.run(Un
 known
 Source)   at java.security.AccessController.doPrivileged(Native Method)   at java.net.URLClassLoader.findClass(Unknown Source)   at java.lang.ClassLoader.loadClass(Unknown Source)   at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)   at java.lang.ClassLoader.loadClass(Unknown Source)   at java.lang.ClassLoader.loadClassInternal(Unknown Source)Any idea how I can figure out how to fix these problems?

Re: problems with initial Axis installation.

2006-02-16 Thread robert
Just a minor correction - don't move tools.jar anywhere. Its part of the jdk - 
on my system the only place its at is /usr/local/jdk1.5.0_03/lib/tools.jar . 

With the proper JAVA_HOME and perhaps CATALINA_HOME environment vars set, java 
and tomcat will be able to find your imports just fine. The latest tomcats 
may also want JRE_HOME set. Trying to be helpful, that all comes down to 
(note, I'm not a windows user): 

JAVA_HOME=/usr/local/jdk1.5.0_03
JRE_HOME=/usr/local/jdk1.5.0_03/jre
CATALINA_HOME=/home/iksrazal/tomcat

HTH,
Robert 
http://www.braziloutsource.com/

Em Quinta 16 Fevereiro 2006 18:08, o Jim Azeltine escreveu:
 You said it yourself!
   I searched my system for tools.jar and so I copied the one I have in
 c:\j2dsk1.4.2_10\lib to axis\WEB-INF\lib 

   Then your error said:
 :Invalid class file format in C:\Program
 : Files\Java\jre1.5.0_06\lib\rt.jar(java/util/Enumeration.class).

   Do you see it? You have two different versions of Java in play.
   The next thing is that the correct version of tools.jar needs to go in
 the Tomcat/common/lib directory, not axis. Make sense now? 8)

   HTH!

   Jim
 Jim Strathmeyer [EMAIL PROTECTED] wrote:
 So I have Axis set up under Tomcat on WinXP. I’m not very
 experienced with Tomcat, MS Windows, or Java, but still very experienced
 with computers. I’m having some huge problems setting up axis.

   First off, when I load
 http://localhost:8080/axis/EchoHeaders.jws?method=list I would get a
 “tools.jar: file not found” error. I searched my system for tools.jar and
 so I copied the one I have in c:\j2dsk1.4.2_10\lib to axis\WEB-INF\lib and
 I get the faultstring “Error while compiling:  C:\Program Files\Tomcat
 5.5\webapps\axis\WEB-INF\jwsClasses\EchoHeaders.java”, and the errors
 starts out to say: “Error compiling C:\Program Files\Tomcat
 5.5\webapps\axis\WEB-INF\jwsClasses\EchoHeaders.java: Line 0, column 0:
 could not parse error message:  Note: sun.tools.javac.Main has been
 deprecated. error: Invalid class file format in C:\Program
 Files\Java\jre1.5.0_06\lib\rt.jar(java/util/Enumeration.class).  The
 major.minor version '49.0' is too recent for this tool to understand.
 C:\Program Files\Tomcat
 5.5\webapps\axis\WEB-INF\jwsClasses\EchoHeaders.java:22: Class
 java.util.Enumeration not found in import.”

   Second, in the userguide I am trying to run the test client under the
 heading “Consuming Web Services with Axis: Basics – Getting Started”. If I
 go into the axis-classes directory and type ‘java
 samples.userguide.example1.TestClient’ I get “Exception in thread main
 java.lang.NoClassDefFoundError: org/apache/axis/client/Service at
 samples.userguide.example1.TestClient.main(TestClient.java:31)”.

   However, if I go into the samples\userguide\example1 directory and type
 “java TestClient” I get the following error:

   Exception in thread main java.lang.NoClassDefFoundError: TestClient
 (wrong name: samples/userguide/example1/TestClient) at
 java.lang.ClassLoader.defineClass0(Native Method)
   at java.lang.ClassLoader.defineClass(Unknown Source)
   at java.security.SecureClassLoader.defineClass(Unknown Source)
   at java.net.URLClassLoader.defineClass(Unknown Source)
   at java.net.URLClassLoader.access$100(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClassInternal(Unknown Source)

   Any idea how I can figure out how to fix these problems?

-- 


Can SOAPMonitor be used to sniff http requests/responses on clien t side?

2006-02-16 Thread Pantvaidya, Vishwajit



I am sending 
requeststo a remote webservice - 
canIuse SOAPMonitor to sniff 
and pick up those http requests?My understanding is that SOAPMonitor has to be deployed on the web 
service side to monitor the soap traffic to/from that service - since in this 
case I do not have access to the remote webservice host, I presume I will not be 
able to use the SOAPmonitor here.
I triedtcpmon- it is able to intercept my 
resuest messages -I am not able to get the response back from the service. 
Not sure what is 
goingwrong.


Bug in dateTime handling with Axis 1.2.1?

2006-02-16 Thread Ebert, Chris
Hi all,

I have an input that has type xs:dateTime. Axis is serializing the
Calendar object to something like Thu Oct 27 17:00:00 PDT 2005. This
isn't the format specified in
http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#dateTime-lexical-rep
r, which would look more like 2005-10-27T17:00:00-08:00.

My *server* isn't Axis, only the client, and the server doesn't like it.
I think this is a bug in Axis -- has it been fixed in some version? Is
there some subtlety in the wsdl declaration? Or am I all wet?

Chris


Re: Can SOAPMonitor be used to sniff http requests/responses on clien t side?

2006-02-16 Thread prashanth shivakumar
you can monitor on client as well...
Configure your monitor so that local port is X[this is any free local port on ur local system]and destination port is Y[this is the port on which ur webservice is running...Ex:8080]..

Now making use of ur client,send requests to port X and NOT Y...everything should work fine..

Rgds
Prashanth


On 2/16/06, Pantvaidya, Vishwajit [EMAIL PROTECTED] wrote:

I am sending requeststo a remote webservice - canIuse SOAPMonitor to sniff and pick up those http requests?
My understanding is that SOAPMonitor has to be deployed on the web service side to monitor the soap traffic to/from that service - since in this case I do not have access to the remote webservice host, I presume I will not be able to use the SOAPmonitor here.

I triedtcpmon- it is able to intercept my resuest messages -I am not able to get the response back from the service. Not sure what is goingwrong.



Re: Extracting cookies from MessageContext

2006-02-16 Thread Dies Koper
You can change the instance instantiation mode with WSDL2Java's 
--deployScope option.


Regards,
Dies


Prashanth.S wrote:

smashing!! That gave me a real good idea..Now using what you have
said,i can use HTTPSession for stateness of application and use
stateless session ejbs...

By the way,i see init() and destroy() methods being called for every
RPC method even when i set sessions/use sesions on client/server
end.. Is it a normal behaviour[which means that for every new rpc
request,jax-rpc runtime will be instantiating a new instance of
service endpoint interface]

Thanks Again Prashanth


Dies Koper [EMAIL PROTECTED] wrote: Hello Prashanth,

Let your impl file implement the javax.xml.rpc.server.ServiceLifeycle
 interface. Cast the object that gets passed to the init method to 
javax.xml.rpc.server.ServletEndpointContext. In your business

methods, use its getHttpSession() method to get to the HTTP session
object associated with the client's method call. (see JAX-RPC1.1 spec
section 10.1 for details.)

Hope that helps, Dies


prashanth shivakumar wrote:

Hi Cyrille/robert,

Thanks for your response!! There is nothing called
MessageContext.getCurrentContext() in websphere soap engine!! Its
only there in axis webservice engine.Dont know the 
reason.Therssomething called 
MessageContext.getCurrentThreadsContext() in one of the

MessageContext classes[I say one because i found out 3 different
MessageContext classes]

I too got stuck into the problem of statefull/stateless webservices
and after analysing a lot decided to go with stateless session
bean with maintaining state in HTTPSession object.

If i go with POJO[simple stupid java beans],hows session
maintainence being done there??How does it do session
tracking??does it use cookies to do that??[jsessionID ??]

Many Thanks Prashanth



On 2/14/06, Cyrille Le Clerc wrote:

Hi Prashanth ,

It is strange to use stateless ejb for a stateful web service?

Can you go stateful ? Do you really need ejbs ? Otherwise, simple
 stupid java beans will gracefully do the job. Syntax will look
like a simple MessageContext.getProperty() or something like
this that will rely on the HttpSession ; I couldn't find
Websphere SOAP library documentation to check.

Cyrille

-- Cyrille Le Clerc [EMAIL PROTECTED] 
[EMAIL PROTECTED]


On 2/14/06, prashanth shivakumar 
[EMAIL PROTECTED] wrote:

Hi Cyrille, Thanks for your response. SInce iam using ejb
endpoint[stateless session EJB] for webservice

implementation using ibm websphere,how can i get hold of
MessageContext on the server end inside stateless session bean??

Many Thanks




On 2/13/06, Cyrille Le Clerc wrote:

Hello Prashanth,

After your invocation, you have to play with 
binding._getCall().getMessageContext() and then get

properties  HTTPConstants.HEADER_COOKIE and 
HTTPConstants.HEADER_COOKIE2.

Here is a sample : TestSessionBindingStub binding =
(TestSessionBindingStub) new 
testSessionServiceLocator().gettestSessionBinding(); 
binding.setMaintainSession(true);


// invoke remote operation String result = binding.aMethod();


MessageContext messageContext =

binding._getCall().getMessageContext();
String cookie1 = (String) 
messageContext.getProperty(HTTPConstants.HEADER_COOKIE); 
String cookie2 = (String) 
messageContext.getProperty(HTTPConstants.HEADER_COOKIE2); 
System.out.println(cookie1= + cookie1); System.out.println

(cookie2= + cookie2);

Hope this helps,

Cyrille

-- Cyrille Le Clerc [EMAIL PROTECTED] 
[EMAIL PROTECTED]


On 2/7/06, prashanth shivakumar



wrote:

Hello All, Is there any way wherein i can extract cookies
from MessageContext

inside custom MessageHandler.

I tried using msgContext.getProperty (Cookie); but it
returns NULL Yes..I did set up sessions on both
client/server and can see cookie

passing between client/server and viceversa

Many Thanks






Axis2C Milestone Release M0.4 Released

2006-02-16 Thread Damitha Kumarage
Hi All,



The fourth milestone release of Axis2 C, M0.4 has been released and could be downloaded at



http://www.apache.org/dyn/closer.cgi/ws/axis2/c/M0.4/



We have done considerable amount of improvements in the past two weeks since the M0.3 release.

Hence this release.



We have the following features added on top of the M0.3 release



1. Threading support and threaded simple axis server

2. Module loading support

3. Addressing module and addressing based dispatching

4. HTTP chunking support

5. Improved logging mechanism

6. Ability to build and run on Windows platform



By now, we have implemented all the core features except MTOM support.

The following are a list of TODOs to be handled in the next milestone.



1. Comprehensive testing for thread safety

2. Fixing memory leaks

3. Organize the source code and header structure

4. Encoding support with streams

5. Website and documentation



We welcome your early feedback on this implementation.



Best Regards

Damitha


registering service in uddi registry on startup

2006-02-16 Thread Sherwin Kartick
I want my web services (in Axis) to publish to a UDDI when Tomcat starts up. I was initially going to just do the registration with init() on the ServiceLifecycle interface, until I read some old postings 
http://marc.theaimsgroup.com/?l=axis-userm=103242493516469w=2 (egad 3.5 years ago, time flies).In a nutshell ServiceLifecycle won't work, I need a request to trigger init which does the publish to UDDI but I can't get a request if I haven't published to a UDDI. So how have people solved this?
thanks ... sherwin