Simple example of typemapping

2003-07-15 Thread Gavriloaie_andrei






Hi,
 
I'm an axis beginer and I just want to make a service with some methods using beans containing arrays of other beans. My problem is that I want to make my own (de)serializers for this new types and I don't know how. Pls give me some start point, a internet link or something like that. A functional example would be great, but ANY HELP is very appreciated.
 
NOW I only know that i must use 
 
ns:localName" classname="classname" serializer="classname" deserializer="classname"/> 
 
in the wsdd file but I don't know what serializer and deserializer classes to create and what this classes implements or subclass.
 
 
Tx







  IncrediMail - Email has finally evolved - Click Here

Antwort: WSDL2Java

2003-07-15 Thread landgraf
Hello Gary,

we have a similar problem in out architecture:

We want to hide the webservice-aspects from our clients in the 1st Tier 
and from our clients in the appserver,
so we implemented EJBs with common data transfer classes in their 
remote-interfaces. The EJBs themselves
map the data transfer classes to the axis generated classes.

This overhead is necessary from my point of view in order to hide the 
webservices a much as possible from
the different clients and in order to have the useful infrastructure of 
our common data transfer classes (which have
some useful baseclasses themselves).

Since we design the data transfer classes with almost the same structure 
like tue axis generated classes, the
mapping can be done by some easy reflection (deep copying of objects, 
traversing class hierarchy and
aggegration paths).

regards,
Thomas
 




"Godfrey, Gary" <[EMAIL PROTECTED]> 
15.07.03 17:33
Bitte antworten zu
[EMAIL PROTECTED]


An
"'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Kopie
"Hardiman, Piers" <[EMAIL PROTECTED]>
Thema
WSDL2Java






The web service we are writing uses complex objects. We have created our 
main interface, implementation and complex data object structure.
We have run Java2WSDL and this has created the WSDL as expected. We have 
run WSDL2Java and asked for the generated classes to go into their own 
package. This has generated versions of our complex data structure.
How do we tie the Axis generated code to our implementation code? The only 
way we see of doing it is to write adapter classes to map our data 
transfer classes to the Axis versions. This is incredibly complex due to 
the data hierachy and requires business logic to handle null data.
Any help will be appreciated. 
Regards, 
Gary Godfrey 
 
** 
 The information transmitted herewith is sensitive information 
intended only for use by the individual or entity to which it is 
addressed. If the reader of this message is not the intended recipient, 
you are hereby notified that any review, retransmission, dissemination, 
distribution, copying or other use of, or taking of any action in reliance 
upon this information is strictly prohibited. If you have received this 
communication in error, please contact the sender and delete the material 
from your computer.



how to specify attachments in deploy.wsdd file

2003-07-15 Thread Astie, Sebastien
Hello,
 
First sorry to ask that question but I am new to axis.
 
I would like to create a webservice that receives a file from a client 
(.NET client).
I want to know if I have to create something specific in the wsdd to 
specify that the webservice requires/ accept attachment. 
I use the deploy.wsdd  file to avoid specifying the wsdl file. Am I 
wrong ? should I specify a wsdl and declare it in the wsdd ?
 
The file can be pretty big ( > 200 Mbytes) , I tried to specify a byte[] 
parameter in my java class exposed by axis but it wasn't successful on big 
files.
 
 
Thanks for your help.

Problem returning byte array in SOAP attachment

2003-07-15 Thread puccio
Hi,

I've been able to return strings in SOAP attachments, but I haven't been successful 
returning a byte array.  I wrote in previously about this problem because I was 
getting error messages such as "javax.activation.UnsupportedDataTypeException: no 
object DCH for MIME type application/octet-stream".  It was suggested that I try 
running with the latest build from CVS because Axis release 1.1 had a problem with 
byte arrays in attachments.  So I'm running with the July 9 build.  With this build, I 
no longer get the UnsupportedDataTypeException errors, but now I get no attachment in 
the response message.

Here's the simple example I used to get a string returned in an attachment.  Then a 
few small changes to return a byte array.  I would appreciate it if someone could 
detect where I'm going wrong with this approach.

Thanks!

. . . Phil


**
** Client code **
**

package us.pooch.soaptest.attachments;

import org.apache.axis.AxisFault;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory;
import org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory;
import org.apache.axis.transport.http.HTTPConstants;
import org.apache.axis.utils.Options;

import javax.activation.DataHandler;
import javax.activation.FileDataSource;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
import java.io.File;
import java.net.URL;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.ListIterator;
import java.util.Vector;

public class SOAPAttachmentMimeTypeDemoClient {

public static void main(String args[]) {
try {

SOAPAttachmentMimeTypeDemoClient demoClient =
new SOAPAttachmentMimeTypeDemoClient();

demoClient.demoGetString();
demoClient.demoGetBytes();
} catch (Exception e) {
System.err.println(e);
e.printStackTrace();
}
System.exit(18);
}

protected DataHandler runDemo(String functionName) throws Exception {
String endPointURLString =

"http://localhost:8080/SOAPAttachmentMimeTypeDemoProjectWeb/services/SOAPAttachmentMimeTypeDemoService";;

SOAPConnectionFactory soapConnectionFactory =
javax.xml.soap.SOAPConnectionFactory.newInstance();
SOAPConnection soapConnection =
soapConnectionFactory.createConnection();

MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage soapMessage = messageFactory.createMessage();
SOAPPart soapPart = soapMessage.getSOAPPart();
SOAPEnvelope requestEnvelope = soapPart.getEnvelope();
SOAPBody body = requestEnvelope.getBody();
SOAPBodyElement operation =
body.addBodyElement(requestEnvelope.createName(functionName));
javax.xml.soap.SOAPMessage returnedSOAPMessage =
soapConnection.call(soapMessage, endPointURLString);
Iterator iterator = returnedSOAPMessage.getAttachments();
if (!iterator.hasNext()) {
//The wrong type of object that what was expected.
System.out.println("Received problem response from server");
throw new AxisFault(
"",
"Received problem response from server",
null,
null);

}

return  (DataHandler) ((AttachmentPart) 
iterator.next()).getDataHandler();
}

public void demoGetString() throws Exception {

DataHandler rdh = runDemo("getString");
String returnedData = (String) rdh.getContent();

if (!returnedData.equals("You got me!")) {
System.err.println("Did not get the expected string.");
throw new AxisFault("", "Did not get the expected string.", 
null, null);
}

System.out.println("getString() succeeded");
}

public void demoGetBytes() throws Exception {

DataHandler rdh = runDemo("getBytes");
byte[] returnedData = (byte[]) rdh.getContent();
byte[] expectedArray = new byte[] { 01,

odd bug: Does axis reparse its own SOAP?

2003-07-15 Thread Jeffrey J Gaynor/jqhome
We are using AXIS as part of a file uploading service (it will eventually 
run under the Globus Toolkit verions 3.0.) Now, part of this involves 
having a URI such as

gsiftp://server.a.b.c:1234/file_staging_area/tempFil35.tmp

This is to be returned to the service as a string  after the upload is 
complete. Here is where it gets odd. on the client, AXIS throws an 
IllegalArgumentException and says that the URI has an authority, then 
refuses to upload the call to the server. If we prepend junque (like a 
couple of $'s) then axis serializes the string just fine, since it doesn't 
recognize this as a URI. We can also replace the protocol to something 
plain, like http and have it work too. There really isn't a whole lot more 
to say. I've looked at the tcpmon and the SOAP is barely more than the 
string. Yes, I'd be happy to post this to any level of detail you want.

The kicker is that this is happened in the built-in deserializer, therefore 
I have to conclude that, bizarrely enough, URIs are parsed in this. I.e., 
it creates the SOAP then afterwards runs it through a parser (there were 
xerces parser calls in the stack trace) and expires. Fine. What I want to 
know is why? Is this documented behavior? I spent a chunk of time today 
tracking this down.

-- j

java version 1.4.1.02
axis is version 1.1



Re: disabling xml decoding.

2003-07-15 Thread Suresh Avadhanula
Thanks for the reply.
I have attached the WSDL.
-Suresh



Dan Kamins wrote:

XML-ish characters (<, >, etc.) are *supposed* to get encoded when embedded as strings in XML.  If the .NET server is expecting something else, then it is likely that it is specifying a type other than xsd:string.

Post your WSDL so we can see how the service describes its expectations.  If it is not xsd:string, it could be anyType, or maybe mixed content.  See below.  It could be that Axis is misunderstanding the WSDL and treating something else as a String when it shouldn't.  But let's see.

-

anyType is unspecified content type.

Schema looks like:
 
- or (equivalent) -
 
See:
http://www.w3.org/TR/xmlschema-0/#anyType
-

And "Mixed Content" which includes HTML-ish marked up text.

Schema looks like:
 
  
   ...
See: 
http://www.w3.org/TR/xmlschema-0/#mixedContent

--
Dan Kamins
On Tue, 15 Jul 2003 19:33:27 -0700, Suresh Avadhanula wrote:
 

Suresh Avadhanula wrote:

   

Hi,
I am using axis to send a SOAP message to a .NET Server. It takes 2
parameters. First param is a integer, second is a XML String. A xml
is
passed as string.
When I send the message via axis, the xml gets encoded, ie <
becomes
lt , > becomes gt etc.
Can I disables encoding? .NET server expects palin xml like 
 some_valu as param in the SOAP Body.
Any help is greatly appreciated.

Thanks
Suresh
 

   





 



http://schemas.xmlsoap.org/wsdl/http/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:s="http://www.w3.org/2001/XMLSchema"; xmlns:s0="http://tempuri.org/"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"; xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; targetNamespace="http://tempuri.org/"; xmlns="http://schemas.xmlsoap.org/wsdl/";>
  
http://tempuri.org/";>
  

  


  

  
  

  

  

  
  

  
  

  
  

  
  


  
  

  
  


  
  

  
  

  
  

  
  

  
  

  
  

  
  

  
  
http://schemas.xmlsoap.org/soap/http"; style="document"  />

  http://tempuri.org/FawsSubmit"; style="document" />
  

  
  

  

  
  


  
  

  
  

  

  
  


  
  

  
  

  

  
  

  https://test.ors.firstam.com/ors/WSMISMO21.asmx"; />


  https://test.ors.firstam.com/ors/WSMISMO21.asmx"; />


  https://test.ors.firstam.com/ors/WSMISMO21.asmx"; />

  


Re: disabling xml decoding.

2003-07-15 Thread Dan Kamins
XML-ish characters (<, >, etc.) are *supposed* to get encoded when embedded as strings 
in XML.  If the .NET server is expecting something else, then it is likely that it is 
specifying a type other than xsd:string.

Post your WSDL so we can see how the service describes its expectations.  If it is not 
xsd:string, it could be anyType, or maybe mixed content.  See below.  It could be that 
Axis is misunderstanding the WSDL and treating something else as a String when it 
shouldn't.  But let's see.

-

anyType is unspecified content type.

Schema looks like:
  
 - or (equivalent) -
  

See:
 http://www.w3.org/TR/xmlschema-0/#anyType

-

And "Mixed Content" which includes HTML-ish marked up text.

Schema looks like:
  
   
...

See:
 http://www.w3.org/TR/xmlschema-0/#mixedContent

--
Dan Kamins

On Tue, 15 Jul 2003 19:33:27 -0700, Suresh Avadhanula wrote:
>Suresh Avadhanula wrote:
>
>>Hi,
>>I am using axis to send a SOAP message to a .NET Server. It takes 2
>>
>>parameters. First param is a integer, second is a XML String. A xml
>>is
>>passed as string.
>>When I send the message via axis, the xml gets encoded, ie <
>>becomes
>>lt , > becomes gt etc.
>>
>>Can I disables encoding? .NET server expects palin xml like 
>> some_valu as param in the SOAP Body.
>>
>>Any help is greatly appreciated.
>>
>>Thanks
>>Suresh
>>
>
>
>




disabling xml decoding.

2003-07-15 Thread Suresh Avadhanula
Suresh Avadhanula wrote:

Hi,
I am using axis to send a SOAP message to a .NET Server. It takes 2 
parameters. First param is a integer, second is a XML String. A xml is 
passed as string.
When I send the message via axis, the xml gets encoded, ie < becomes 
lt , > becomes gt etc.

Can I disables encoding? .NET server expects palin xml like  
 some_valu as param in the SOAP Body.

Any help is greatly appreciated.

Thanks
Suresh




Re: Keep-alive and session scoped services

2003-07-15 Thread landon clark
Sorry to follow up to my own email, but it looks like this is fixed in 
CVS.  Sorry for the noise.

landon

landon clark wrote:

Hi everyone,

Config:
Axis 1.1 client and server
Tomcat
JDK1.3.1
I am trying to use HTTP1.1 with session-scoped web services. I have got 
both working on their own but not together.  Has anyone does this? Some 
questions:

1. It appears the only way to do HTTP 1.1 is CommonsHTTPSender?  Is that 
true? BTW, CommonsHTTPSender is not included in the axis.jar for some 
reason (my guess is to not force another dependency in the code).

2. Watching the traffic on the wire (TCPMon is great) makes it seem like 
the server doesn't realize that the same connection == same client.  In 
other words one connection looks like this:

Client  Server
Initial request -->
  <--  Cookie+Reponse
Request --->
  <-- Response
Request --->
  <-- Response
Request --->
  <-- Response
Request --->
  <-- Response
So each request looks like a different client.  ANy pointers on where to 
look in the code to fix this?

3. I was wondering if changing session handling to use SOAP headers is a 
better/more correct solution?  Any pointers on how to do that?

Thanks.
Landon






Keep-alive and session scoped services

2003-07-15 Thread landon clark
Hi everyone,

Config:
Axis 1.1 client and server
Tomcat
JDK1.3.1
I am trying to use HTTP1.1 with session-scoped web services. I have got 
both working on their own but not together.  Has anyone does this? Some 
questions:

1. It appears the only way to do HTTP 1.1 is CommonsHTTPSender?  Is that 
true? BTW, CommonsHTTPSender is not included in the axis.jar for some 
reason (my guess is to not force another dependency in the code).

2. Watching the traffic on the wire (TCPMon is great) makes it seem like 
the server doesn't realize that the same connection == same client.  In 
other words one connection looks like this:

Client   Server
Initial request -->
  <--  Cookie+Reponse
Request --->
  <-- Response
Request --->
  <-- Response
Request --->
  <-- Response
Request --->
  <-- Response
So each request looks like a different client.  ANy pointers on where to 
look in the code to fix this?

3. I was wondering if changing session handling to use SOAP headers is a 
better/more correct solution?  Any pointers on how to do that?

Thanks.
Landon



Reading Header from SOAP Envelope

2003-07-15 Thread Samprathi, Subramani non Unisys



Hi 
All,
I am 
having a problem in reading the header. 
I have 
a complex data "RequestHeader" set in SOAPHeader. 
 
When I 
tried using soapHeaderElement.getObjectValue() it returns 
NULL!!..

Is 
there a way I can the handle to RequestHeader 
object?
 
 

Following is the debug info:
 
env.getHeader().toString()returns
 
http://schemas.xmlsoap.org/soap/envelope/">  
 
12 
securityKey1 
userId12  
   SOAPHeaderElement 
soapHeaderElement = 
 env.getHeaderByName("urn:BeanService","RequestHeader");
soapHeaderElement.toString() returns:    12   securityKey1   userId12
 
However  RequestHeader rh = (RequestHeader) 
soapHeaderElement.getObjectValue(); returns NULL!!..
 
Cheers,
Subbu


RE: Message Style Service and Exception Handling

2003-07-15 Thread Bhanu Pabreja



i am 
not returning but throwing the exception ...
 
I just 
coded a method and returned the exception in the main exception block and threw 
it from there. Made a method cause my document could have muliple conditions so 
did not want to write the same code everywhere ...
 
But 
yes I am throwing the exception and there is not SOAP response envelope on the 
response side of the SOAP Monitor.
 
Bhanu 
Pabreja

  -Original Message-From: remko de knikker 
  [mailto:[EMAIL PROTECTED]Sent: Tuesday, July 15, 2003 3:43 
  PMTo: [EMAIL PROTECTED]Subject: Re: Message Style 
  Service and Exception HandlingHmm, that's right, you 
  don't see any Response on the TCPMonitor (I assume that means you see a 
  Request ofcourse). I see that you writereturn new RemoteException(ex.toString()what 
  happens if you throw the exception (ie what i did in my exception handling) 
  instead of returning it?throw ex;I am almost exhausted as far 
  as suggestions...PSI am using Java, and call the invoke() method 
  to call the web service, this method throws an AxisFault/RemoteException, see 
  API.There's an architecture manual on Axis on the apache.org site to see 
  the concept in abstraction.rBhanu Pabreja wrote:
  

but I dont see the response in the SOAPMonitor itself. I mean if 
there was something like a exception alteast some response should have taken 
place and should have shown in the monitor. I did not even see the response 
envelope.
 
Expalin the AxisFault scenario a littel bit more ... cause the 
invoke() method is invoked at the cleint.
 
and your client is on .NET so u dont even have the invoke() 
call.
 
How is it working ...
 
Bhanu Pabreja

  -Original Message-From: remko de knikker [mailto:[EMAIL PROTECTED]]Sent: 
  Tuesday, July 15, 2003 3:02 PMTo: [EMAIL PROTECTED]Subject: 
  Re: Message Style Service and Exception 
  HandlingActually, it was on IIS/.NET I believe, where 
  you can set priority to exception handling either by the server or the 
  application, so forget about what I said about it, I don't know if 
  Tomcat/Java can do the same. I checked on my Client, where I was 
  just catching the Exception instead of trying to get to the 
  MessageContext's SOAPBody etc...and I guess you're right: you cannot 
  access the MessageContext from the client.I assume what happens is 
  that Axis 'serializes' the fault automatically and throws an AxisFault 
  instead, which is what the invoke method does according to the API (Axis 
  1.1). On the other hand all information is accessible through the 
  AxisFault. I agree that it would be nicer to be able to get the SOAPFault, 
  while it's easier to just catch the AxisFault.PS: for copying in 
  the TCPMonitor I just use +CBhanu Pabreja 
  wrote:
  

what do you mean my server is configured to override and handle 
the exception. I mean if the response is with flow and no exception is 
thrown then the SOAP response is perfectly norman but it is only on the 
event of an exception that the SOAPMonitor shows the status as ACTIVE 
and nothing shows up on the response text area.
 
Well could you access the SOAPBody on the client end ...?? If you 
see this response in your monitor there seems to be no problem to access 
the SOAPBody and then eventually the SOAPFault element but then I dont 
see anything in SOAPMonitor and eventually my SOAPBody also does not 
show up on the client.
 
Can you post your client also and which version of axis are you 
using ...
 
If you want I can send you the screen shot of my SOAPMonitor but 
this is really buggy ... and I am stuck and writing my own exception and 
sending it as a Document object.
 
Thanx for the input ...
 
dumdum420
 

  -Original Message[Bhanu 
  Pabreja]  -From: remko de knikker 
  [mailto:[EMAIL PROTECTED]]Sent: 
  Tuesday, July 15, 2003 12:16 PMTo: [EMAIL PROTECTED]Subject: 
  Re: Message Style Service and Exception HandlingI 
  don't seem to have a problem with it. here's my example which 
  creates a SOAPResponse on the SOAPMonitor. Could it be that your 
  server is configured to override and handle the exception, I remember 
  that I once had that issue, although I am no expert on 
  this.import javax.xml.soap.SOAPBody;import 
  javax.xml.soap.SOAPFault;public Document method2(Document 
  request) throws Exception{try {ohno} catch (Exception e1) 
  {            
  logGetUMLS.info(e1.getMessage());    
          String errormsg = 
  e1.getMessage();        
      logGetUMLS.info( "Error: " + errormsg

Re: Message Style Service and Exception Handling

2003-07-15 Thread remko de knikker




Hmm, that's right, you don't see any Response on the TCPMonitor (I assume
that means you see a Request ofcourse). 
I see that you write
return new RemoteException(ex.toString()
what happens if you throw the exception (ie what i did in my exception handling)
instead of returning it?
throw ex;


I am almost exhausted as far as suggestions...

PS
I am using Java, and call the invoke() method to call the web service, this
method throws an AxisFault/RemoteException, see API.
There's an architecture manual on Axis on the apache.org site to see the
concept in abstraction.

r


Bhanu Pabreja wrote:

  
  
  
 
  
 
  but I  dont see the response in the SOAPMonitor
itself. I mean if there was something  like a exception alteast some response
should have taken place and should have  shown in the monitor. I did not
even see the response  envelope.
 
   
 
  Expalin the AxisFault scenario a littel bit more
... cause the invoke()  method is invoked at the cleint.
 
   
 
  and  your client is on .NET so u dont even have
the invoke()  call.
 
   
 
  How is  it working ...
 
   
 
  Bhanu  Pabreja
 
 
-Original Message-
From: remko de knikker[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 15, 2003 3:02PM
To: [EMAIL PROTECTED]
Subject: Re: Message StyleService and Exception Handling


Actually, it was onIIS/.NET I believe, where you can set priority to
exception handling either bythe server or the application, so forget
about what I said about it, I don'tknow if Tomcat/Java can do the same.


I checked on my Client, where Iwas just catching the Exception instead
of trying to get to theMessageContext's SOAPBody etc...
and I guess you're right: you cannotaccess the MessageContext from the
client.
I assume what happens is thatAxis 'serializes' the fault automatically
and throws an AxisFault instead,which is what the invoke method does
according to the API (Axis 1.1).

On the other hand all information is accessible through the AxisFault.  
 I agree that it would be nicer to be able to get the SOAPFault, while it's
   easier to just catch the AxisFault.

PS: for copying in the TCPMonitor Ijust use +C


Bhanu Pabreja wrote:
   
 
  
 
  what do you mean my server is configured to override
and handle the  exception. I mean if the response is with flow and no
exception is thrown  then the SOAP response is perfectly norman but it
is only on the event of an  exception that the SOAPMonitor shows the
status as ACTIVE and nothing shows  up on the response text area.
 
   
 
  Well could you access the SOAPBody on the client
end ...?? If you see  this response in your monitor there seems to be
no problem to access the  SOAPBody and then eventually the SOAPFault
element but then I dont see  anything in SOAPMonitor and eventually my
SOAPBody also does not show up on  the client.
 
   
 
  Can you post your client also and which version
of axis are you using  ...
 
   
 
  If  you want I can send you the screen shot
of my SOAPMonitor but this is really  buggy ... and I am stuck and writing
my own exception and sending it as a  Document object.
 
   
 
  Thanx for the input ...
 
   
 
  dumdum420
 
   
 
 
-Original Message[Bhanu   
Pabreja]  -
From: remko de knikker [mailto:[EMAIL PROTECTED]]
Sent:Tuesday, July 15, 2003 12:16 PM
To: [EMAIL PROTECTED]
Subject:Re: Message Style Service and Exception Handling


Idon't seem to have a problem with it. 

here's my example whichcreates a SOAPResponse on the SOAPMonitor.
Could it be that your server isconfigured to override and handle
the exception, I remember that I oncehad that issue, although I am
no expert on this.

importjavax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPFault;

publicDocument method2(Document request) throws Exception{
try {
ohno
}catch (Exception e1) {
           logGetUMLS.info(e1.getMessage());
           String errormsg =e1.getMessage();
           logGetUMLS.info( "Error: " + errormsg);
            sb1 =MessageContext.getCurrentContext().getResponseMessage().getSOAPPart().getEnvelope().getBody();
           SOAPFault fault =sb1.addFault();
           fault.setFaultString("Exception: " +errormsg);
           fault.setFaultCode("Server");
           throw e1;         
        } 
returndoc;
}

HTTP/1.1 500 Internal Server Error?
Content-Type:text/xml; charset=utf-8?
Date: Tue, 15 Jul 2003 16:10:48GMT?
Server: Apache Coyote HTTP/1.1 Connector [1.0]?
Connection:  

RE: Message Style Service and Exception Handling

2003-07-15 Thread Bhanu Pabreja



but I 
dont see the response in the SOAPMonitor itself. I mean if there was something 
like a exception alteast some response should have taken place and should have 
shown in the monitor. I did not even see the response 
envelope.
 
Expalin the AxisFault scenario a littel bit more ... cause the invoke() 
method is invoked at the cleint.
 
and 
your client is on .NET so u dont even have the invoke() 
call.
 
How is 
it working ...
 
Bhanu 
Pabreja

  -Original Message-From: remko de knikker 
  [mailto:[EMAIL PROTECTED]Sent: Tuesday, July 15, 2003 3:02 
  PMTo: [EMAIL PROTECTED]Subject: Re: Message Style 
  Service and Exception HandlingActually, it was on 
  IIS/.NET I believe, where you can set priority to exception handling either by 
  the server or the application, so forget about what I said about it, I don't 
  know if Tomcat/Java can do the same. I checked on my Client, where I 
  was just catching the Exception instead of trying to get to the 
  MessageContext's SOAPBody etc...and I guess you're right: you cannot 
  access the MessageContext from the client.I assume what happens is that 
  Axis 'serializes' the fault automatically and throws an AxisFault instead, 
  which is what the invoke method does according to the API (Axis 1.1). 
  On the other hand all information is accessible through the AxisFault. 
  I agree that it would be nicer to be able to get the SOAPFault, while it's 
  easier to just catch the AxisFault.PS: for copying in the TCPMonitor I 
  just use +CBhanu Pabreja wrote:
  

what do you mean my server is configured to override and handle the 
exception. I mean if the response is with flow and no exception is thrown 
then the SOAP response is perfectly norman but it is only on the event of an 
exception that the SOAPMonitor shows the status as ACTIVE and nothing shows 
up on the response text area.
 
Well could you access the SOAPBody on the client end ...?? If you see 
this response in your monitor there seems to be no problem to access the 
SOAPBody and then eventually the SOAPFault element but then I dont see 
anything in SOAPMonitor and eventually my SOAPBody also does not show up on 
the client.
 
Can you post your client also and which version of axis are you using 
...
 
If 
you want I can send you the screen shot of my SOAPMonitor but this is really 
buggy ... and I am stuck and writing my own exception and sending it as a 
Document object.
 
Thanx for the input ...
 
dumdum420
 

  -Original Message[Bhanu 
  Pabreja]  -From: remko de knikker [mailto:[EMAIL PROTECTED]]Sent: 
  Tuesday, July 15, 2003 12:16 PMTo: [EMAIL PROTECTED]Subject: 
  Re: Message Style Service and Exception HandlingI 
  don't seem to have a problem with it. here's my example which 
  creates a SOAPResponse on the SOAPMonitor. Could it be that your server is 
  configured to override and handle the exception, I remember that I once 
  had that issue, although I am no expert on this.import 
  javax.xml.soap.SOAPBody;import javax.xml.soap.SOAPFault;public 
  Document method2(Document request) throws Exception{try {ohno} 
  catch (Exception e1) {        
      logGetUMLS.info(e1.getMessage());    
          String errormsg = 
  e1.getMessage();        
      logGetUMLS.info( "Error: " + errormsg); 
              sb1 = 
  MessageContext.getCurrentContext().getResponseMessage().getSOAPPart().getEnvelope().getBody();    
          SOAPFault fault = 
  sb1.addFault();        
      fault.setFaultString("Exception: " + 
  errormsg);            
  fault.setFaultCode("Server");        
      throw e1;          
          } return 
  doc;}HTTP/1.1 500 Internal Server Error?Content-Type: 
  text/xml; charset=utf-8?Date: Tue, 15 Jul 2003 16:10:48 
  GMT?Server: Apache Coyote HTTP/1.1 Connector [1.0]?Connection: 
  close??   "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   
      
  java.lang.Exception: Test 
  Exception   
      
     
     
     
  Bhanu Pabreja wrote:
  Posted:
http://nagoya.apache.org/bugzilla/long_list.cgi?buglist=21578

Bhanu

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 14, 2003 12:23 PM
To: Bhanu Pabreja; [EMAIL PROTECTED]
Subject: RE: Message Style Service and Exception Handling


Please open a bug report - http://ws.apache.org/axis/bugs.html

-- dims

--- Bhanu Pabreja <[EMAIL PROTECTED]> wrote:
  
Thanx for the input but this also does not work. Infact no SOAPResponse is
generated on the SOAPMonitor. Looks like in case of message sty

Re: Message Style Service and Exception Handling

2003-07-15 Thread remko de knikker




Actually, it was on IIS/.NET I believe, where you can set priority to exception
handling either by the server or the application, so forget about what I
said about it, I don't know if Tomcat/Java can do the same. 

I checked on my Client, where I was just catching the Exception instead of
trying to get to the MessageContext's SOAPBody etc...
and I guess you're right: you cannot access the MessageContext from the client.
I assume what happens is that Axis 'serializes' the fault automatically and
throws an AxisFault instead, which is what the invoke method does according
to the API (Axis 1.1). 

On the other hand all information is accessible through the AxisFault. I
agree that it would be nicer to be able to get the SOAPFault, while it's
easier to just catch the AxisFault.

PS: for copying in the TCPMonitor I just use +C


Bhanu Pabreja wrote:

  
  
  
 
  
 
  what  do you mean my server is configured to override
and handle the exception. I mean  if the response is with flow and no exception
is thrown then the SOAP response  is perfectly norman but it is only on the
event of an exception that the  SOAPMonitor shows the status as ACTIVE and
nothing shows up on the response text  area.
 
   
 
  Well  could you access the SOAPBody on the client
end ...?? If you see this response  in your monitor there seems to be no
problem to access the SOAPBody and then  eventually the SOAPFault element
but then I dont see anything in SOAPMonitor and  eventually my SOAPBody also
does not show up on the client.
 
   
 
  Can  you post your client also and which version
of axis are you using  ...
 
   
 
  If you  want I can send you the screen shot of
my SOAPMonitor but this is really buggy  ... and I am stuck and writing my
own exception and sending it as a Document  object.
 
   
 
  Thanx  for the input ...
 
   
 
  dumdum420
 
   
 
 
-Original Message[Bhanu   
Pabreja]  -
From: remko de knikker[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 15, 2003 12:16PM
To: [EMAIL PROTECTED]
Subject: Re: Message StyleService and Exception Handling


I don't seem to have aproblem with it. 

here's my example which creates a SOAPResponse on theSOAPMonitor. Could
it be that your server is configured to override and handlethe exception,
I remember that I once had that issue, although I am no experton this.

import javax.xml.soap.SOAPBody;
importjavax.xml.soap.SOAPFault;

public Document method2(Document request)throws Exception{
try {
ohno
} catch (Exception e1){
           logGetUMLS.info(e1.getMessage());
           String errormsg = e1.getMessage();
           logGetUMLS.info( "Error: " + errormsg);
            sb1 =MessageContext.getCurrentContext().getResponseMessage().getSOAPPart().getEnvelope().getBody();
           SOAPFault fault =sb1.addFault();
           fault.setFaultString("Exception: " + errormsg);
          fault.setFaultCode("Server");
           throw e1;         
        } 
returndoc;
}

HTTP/1.1 500 Internal Server Error?
Content-Type:text/xml; charset=utf-8?
Date: Tue, 15 Jul 2003 16:10:48 GMT?
Server:Apache Coyote HTTP/1.1 Connector [1.0]?
Connection: close?
?

   "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  
   
   java.lang.Exception: TestException  
   
     
 
 
  



Bhanu Pabreja wrote:
   

  Posted:
http://nagoya.apache.org/bugzilla/long_list.cgi?buglist=21578

Bhanu

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 14, 2003 12:23 PM
To: Bhanu Pabreja; [EMAIL PROTECTED]
Subject: RE: Message Style Service and Exception Handling


Please open a bug report - http://ws.apache.org/axis/bugs.html

-- dims

--- Bhanu Pabreja <[EMAIL PROTECTED]> wrote:
  
 
  
Thanx for the input but this also does not work. Infact no SOAPResponse is
generated on the SOAPMonitor. Looks like in case of message style service
there are no capabilities to generate SOAPFault which is actually a MUST
element by w3c in case of a  exception.

These are my observations but if someone has a working example which is
MessageStyle based and which propgates exception back to the client using
the SOAPFault or AxisFault it will really help me since I am stuck with

  
  this
  
 
  
grave issue.

Thanx in advance.

dumdum420

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 14, 2003 7:42 AM
To: [EMAIL PROTECTED]
Subject: Re: Message Style Service and Exception Handling


Try this...

   AxisFault af = AxisFault.makeFault(ex);
   // Do whatever you want with AxisFault
   
   throw af;

-- dims

---

Re: Problem with custom exceptions not getting deserialized

2003-07-15 Thread Davanum Srinivas
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19682
http://marc.theaimsgroup.com/?l=axis-dev&m=105354748107569&w=2

-- dims

--- Dan Kamins <[EMAIL PROTECTED]> wrote:
> 
> How specifically has this problem been fixed?  I'm looking at the samples/faults 
> example in v1.1
> and I can see now that a RemoteException (not AxisFault) is being thrown, and that 
> it has a bean
> typeMapping in the wsdd.  But what control does a developer have over this mapping?  
> This should
> be evident in the documentation, no?
> 
> I'm glad to see the improvement, but the fact is that the v1.1 docs don't list the 
> fact that
> this has changed, let alone give much of a clue as to how it works beyond the 
> exception class
> name going into faultCode and the statement "This is an area which causes plenty of 
> confusion,
> and indeed, the author of this section is not entirely sure how everything works".
> 
> I'm concerned that I may be building on top of other hacks I've made based on 
> previous versions
> when in fact Axis has matured since its early days.  This highlights the importance 
> of a
> CHANGES.txt file or something similar with each release, as well as more coherent 
> documentation
> (written by whomever does know how things work, before they move on from the 
> project).
> 
> --
> Dan Kamins
> 
> On Tue, 15 Jul 2003 04:43:54 -0700 (PDT), Davanum Srinivas wrote:
> >Dan,
> >
> >This problem has been fixed already in 1.1
> >
> >thanks,
> >dims
> >
> >--- Dan Kamins <[EMAIL PROTECTED]> wrote:
> >>
> >>I faced the same problem (can't throw app-specific exceptions) and
> >>solved it by subclassing
> >>AxisFault for all of my exceptions.  It allows me to explicitly set
> >>text for the actor, code,
> >>details, etc. fields of the SOAP fault fairly easily in the
> >>constructors of the exceptions.
> >>
> >>That being said, I am somewhat unhappy with this, because it
> >>prevents me from doing what seems
> >>proper, which you (Peter) said in a previous post:
> >>
> >>>keep my business logic interfaces (and the exceptions
> >>>which belong to it) as independent from the underlying
> >>>RPC technology as possible
> >>
> >>A nicer solution might be some form of type-mapping serialization
> >>setup as is done with bean
> >>mapping and serialization of other classes.  AFAIK this does not
> >>exist, and if nobody responds
> >>to say it does, I second it as a nice feature request, and you
> >>should enter it in.
> >>
> >>After all, avoiding vendor lock-in is one of the reasons people
> >>choose open source to begin
> >>with.
> >>
> >>--
> >>Dan Kamins
> >>
> >>On Tue, 15 Jul 2003 10:15:28 +0200, Peter Landmann wrote:
> >>>Hi,
> >>>
> >>>Once again, as no one replied: Did really no one else face this
> >>>problem up
> >>>to now? Don't you use exceptions in your service interfaces?
> >>>
> >>>I took a look on the JAX-RPC specification 1.0 now: It defines
> >>>that
> >>>service
> >>>specific exceptions must extend java.lang.Exception - and not
> >>>something
> >>>like RemoteException or AxisFault. This means that Axis 1.1
> >>>doesn't
> >>>comply
> >>>with the specification in this point, unfortunately. Should I
> >>>write
> >>>a bug
> >>>report?
> >>>
> >>>Regards,
> >>>Peter
> >>>
> >>>__
> >>>Peter Landmann
> >>>e-Business Services
> >>>System Engineer
> >>>Tel.: +49 89 898157-85
> >>>Fax: +49 89 898157-49
> >>>mailto:[EMAIL PROTECTED]
> >>>__
> >>>PEGAS systemhaus gmbh
> >>>Rudolf-Diesel-Str. 1
> >>>D-82166 Gräfelfing
> >>>http://www.pegas.com/
> >>>http://www.e-integrator.de/
> >>>__
> >>>
> >>>
> >>>
> >>
> >>
> >
> >
> >=
> >Davanum Srinivas - http://webservices.apache.org/~dims/
> >
> 
> 


=
Davanum Srinivas - http://webservices.apache.org/~dims/

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


RE: Remote Administration of SOAP Monitor

2003-07-15 Thread Bhanu Pabreja
thanx,

Bhanu Pabreja

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 2:13 PM
To: [EMAIL PROTECTED]
Subject: Re: Remote Administration of SOAP Monitor


Please visit the Wiki
(http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages)

--- Bhanu Pabreja <[EMAIL PROTECTED]> wrote:
> I am surely not able to find the information but I want to configure my
SOAP
> Monitor so that I can use it remotely.
>
> I had read that there is a tag which has to be included in one of the
files
> to turn remote adminstration possible.
>
> Can some body guide me to that.
>
> Thanx in advance.
>
> dumdum420
>
>


=
Davanum Srinivas - http://webservices.apache.org/~dims/

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com





IDREF/IDREFs support in AXIS 1.1

2003-07-15 Thread Tony Opatha

Does the AXIS 1.1 WSDL2WebService tool support XML Schema types IDREF and
IDREFs?
It seems that a XSD used with WSDL is results in following error when used with
WSD2WebService tool:
Error found in the WSDL document:  The XML Schema type 'IDREF' is not currently supported. 
Any ideas why this would be a problem?
Any workarounds?
 
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Re: Problem with custom exceptions not getting deserialized

2003-07-15 Thread Dan Kamins

How specifically has this problem been fixed?  I'm looking at the samples/faults 
example in v1.1 and I can see now that a RemoteException (not AxisFault) is being 
thrown, and that it has a bean typeMapping in the wsdd.  But what control does a 
developer have over this mapping?  This should be evident in the documentation, no?

I'm glad to see the improvement, but the fact is that the v1.1 docs don't list the 
fact that this has changed, let alone give much of a clue as to how it works beyond 
the exception class name going into faultCode and the statement "This is an area which 
causes plenty of confusion, and indeed, the author of this section is not entirely 
sure how everything works".

I'm concerned that I may be building on top of other hacks I've made based on previous 
versions when in fact Axis has matured since its early days.  This highlights the 
importance of a CHANGES.txt file or something similar with each release, as well as 
more coherent documentation (written by whomever does know how things work, before 
they move on from the project).

--
Dan Kamins

On Tue, 15 Jul 2003 04:43:54 -0700 (PDT), Davanum Srinivas wrote:
>Dan,
>
>This problem has been fixed already in 1.1
>
>thanks,
>dims
>
>--- Dan Kamins <[EMAIL PROTECTED]> wrote:
>>
>>I faced the same problem (can't throw app-specific exceptions) and
>>solved it by subclassing
>>AxisFault for all of my exceptions.  It allows me to explicitly set
>>text for the actor, code,
>>details, etc. fields of the SOAP fault fairly easily in the
>>constructors of the exceptions.
>>
>>That being said, I am somewhat unhappy with this, because it
>>prevents me from doing what seems
>>proper, which you (Peter) said in a previous post:
>>
>>>keep my business logic interfaces (and the exceptions
>>>which belong to it) as independent from the underlying
>>>RPC technology as possible
>>
>>A nicer solution might be some form of type-mapping serialization
>>setup as is done with bean
>>mapping and serialization of other classes.  AFAIK this does not
>>exist, and if nobody responds
>>to say it does, I second it as a nice feature request, and you
>>should enter it in.
>>
>>After all, avoiding vendor lock-in is one of the reasons people
>>choose open source to begin
>>with.
>>
>>--
>>Dan Kamins
>>
>>On Tue, 15 Jul 2003 10:15:28 +0200, Peter Landmann wrote:
>>>Hi,
>>>
>>>Once again, as no one replied: Did really no one else face this
>>>problem up
>>>to now? Don't you use exceptions in your service interfaces?
>>>
>>>I took a look on the JAX-RPC specification 1.0 now: It defines
>>>that
>>>service
>>>specific exceptions must extend java.lang.Exception - and not
>>>something
>>>like RemoteException or AxisFault. This means that Axis 1.1
>>>doesn't
>>>comply
>>>with the specification in this point, unfortunately. Should I
>>>write
>>>a bug
>>>report?
>>>
>>>Regards,
>>>Peter
>>>
>>>__
>>>Peter Landmann
>>>e-Business Services
>>>System Engineer
>>>Tel.: +49 89 898157-85
>>>Fax: +49 89 898157-49
>>>mailto:[EMAIL PROTECTED]
>>>__
>>>PEGAS systemhaus gmbh
>>>Rudolf-Diesel-Str. 1
>>>D-82166 Gräfelfing
>>>http://www.pegas.com/
>>>http://www.e-integrator.de/
>>>__
>>>
>>>
>>>
>>
>>
>
>
>=
>Davanum Srinivas - http://webservices.apache.org/~dims/
>




Re: Remote Administration of SOAP Monitor

2003-07-15 Thread Davanum Srinivas
Please visit the Wiki (http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages)

--- Bhanu Pabreja <[EMAIL PROTECTED]> wrote:
> I am surely not able to find the information but I want to configure my SOAP
> Monitor so that I can use it remotely.
> 
> I had read that there is a tag which has to be included in one of the files
> to turn remote adminstration possible.
> 
> Can some body guide me to that.
> 
> Thanx in advance.
> 
> dumdum420
> 
> 


=
Davanum Srinivas - http://webservices.apache.org/~dims/

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


Remote Administration of SOAP Monitor

2003-07-15 Thread Bhanu Pabreja
I am surely not able to find the information but I want to configure my SOAP
Monitor so that I can use it remotely.

I had read that there is a tag which has to be included in one of the files
to turn remote adminstration possible.

Can some body guide me to that.

Thanx in advance.

dumdum420




RE: Performance of Web Service Clients

2003-07-15 Thread dave . prout
Thanks,
 
I'll do as you suggest, and post the results by the end of this week.
 
Dave

-Original Message- 
From: Davanum Srinivas [mailto:[EMAIL PROTECTED] 
Sent: Tue 15/07/2003 17:50 
To: [EMAIL PROTECTED] 
Cc: 
Subject: Re: Performance of Web Service Clients



Dave, 

Can you please try latest CVS / Nightly Build. Checked in fixes for
performance a few days back. 
I'd like a comparison between latest CVS and what you have now. (I
definitely know that 1.1RC2 had 
a lot of problems, so you might want to use 1.1Final.). Please post the
results here. 

Also any code, wsdl, soap traces from tcpmon would be really useful to
diagnose and rectify 
problems. we'd really appreciate this info in the form of a bug report so
that we don't lose track 
of this important information. (http://ws.apache.org/axis/bugs.html
 ) 

Thanks, 
dims 

--- [EMAIL PROTECTED] wrote: 
> Hi, 
> 
>   I'm in the Web Services team at BT. We use Axis a lot, as it works, 
> and scores highly on interoperability. 
> 
>   For the last couple of months I've had to look at calling web 
> services secured with various kinds of Transport Security, i.e. Basic 
> Authentication with and without SSL, and Client Certificate
Authentication. 
> 
>   The clients I've been using for the tests are WebLogic Server 7.0 
> Service Pack 2, .NET (c#) and Axis 1_1 RC2. 
> 
>   According to my tests, the Axis Client is slower on all 
> measurements. This is not a criticism, maybe Axis isn't  intended for 
> performance, but I wondered if anyone could comment on this ? 
> 
>   Is there anything I should be doing to improve the performance of 
> Axis Clients ? 
> 
>   If anyone knows anything about performance, and needs more detail, I

> can supply it. 
> 
> Thanks 
> 
> Dave 
> 
> 
> 


= 
Davanum Srinivas - http://webservices.apache.org/~dims/
  

__ 
Do you Yahoo!? 
SBC Yahoo! DSL - Now only $29.95 per month! 
http://sbc.yahoo.com   

<>

RE: Message Style Service and Exception Handling

2003-07-15 Thread Bhanu Pabreja



BTW I 
wan unable to do a copy command (CTRL + C) on the SOAP monitor how did you do 
that :)
 
Bhanu 
Pabreja

  -Original Message-From: Bhanu Pabreja 
  [mailto:[EMAIL PROTECTED]Sent: Tuesday, July 15, 2003 1:39 
  PMTo: [EMAIL PROTECTED]Subject: RE: Message Style 
  Service and Exception Handling
  what 
  do you mean my server is configured to override and handle the exception. I 
  mean if the response is with flow and no exception is thrown then the SOAP 
  response is perfectly norman but it is only on the event of an exception that 
  the SOAPMonitor shows the status as ACTIVE and nothing shows up on the 
  response text area.
   
  Well 
  could you access the SOAPBody on the client end ...?? If you see this response 
  in your monitor there seems to be no problem to access the SOAPBody and then 
  eventually the SOAPFault element but then I dont see anything in SOAPMonitor 
  and eventually my SOAPBody also does not show up on the 
  client.
   
  Can 
  you post your client also and which version of axis are you using 
  ...
   
  If 
  you want I can send you the screen shot of my SOAPMonitor but this is really 
  buggy ... and I am stuck and writing my own exception and sending it as a 
  Document object.
   
  Thanx for the input ...
   
  dumdum420
   
  
-Original Message[Bhanu 
Pabreja]  -From: remko de knikker 
[mailto:[EMAIL PROTECTED]Sent: Tuesday, July 15, 2003 
12:16 PMTo: [EMAIL PROTECTED]Subject: Re: 
Message Style Service and Exception HandlingI don't 
seem to have a problem with it. here's my example which creates a 
SOAPResponse on the SOAPMonitor. Could it be that your server is configured 
to override and handle the exception, I remember that I once had that issue, 
although I am no expert on this.import 
javax.xml.soap.SOAPBody;import javax.xml.soap.SOAPFault;public 
Document method2(Document request) throws Exception{try {ohno} 
catch (Exception e1) {        
    logGetUMLS.info(e1.getMessage());    
        String errormsg = 
e1.getMessage();            
logGetUMLS.info( "Error: " + errormsg);     
        sb1 = 
MessageContext.getCurrentContext().getResponseMessage().getSOAPPart().getEnvelope().getBody();    
        SOAPFault fault = 
sb1.addFault();            
fault.setFaultString("Exception: " + errormsg);    
        
fault.setFaultCode("Server");        
    throw e1;          
        } return 
doc;}HTTP/1.1 500 Internal Server Error?Content-Type: 
text/xml; charset=utf-8?Date: Tue, 15 Jul 2003 16:10:48 GMT?Server: 
Apache Coyote HTTP/1.1 Connector [1.0]?Connection: 
close??   
"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   
    
java.lang.Exception: Test 
Exception   
    
   
   
   
Bhanu Pabreja wrote:
Posted:
http://nagoya.apache.org/bugzilla/long_list.cgi?buglist=21578

Bhanu

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 14, 2003 12:23 PM
To: Bhanu Pabreja; [EMAIL PROTECTED]
Subject: RE: Message Style Service and Exception Handling


Please open a bug report - http://ws.apache.org/axis/bugs.html

-- dims

--- Bhanu Pabreja <[EMAIL PROTECTED]> wrote:
  
  Thanx for the input but this also does not work. Infact no SOAPResponse is
generated on the SOAPMonitor. Looks like in case of message style service
there are no capabilities to generate SOAPFault which is actually a MUST
element by w3c in case of a  exception.

These are my observations but if someone has a working example which is
MessageStyle based and which propgates exception back to the client using
the SOAPFault or AxisFault it will really help me since I am stuck with
this
  
  grave issue.

Thanx in advance.

dumdum420

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 14, 2003 7:42 AM
To: [EMAIL PROTECTED]
Subject: Re: Message Style Service and Exception Handling


Try this...

   AxisFault af = AxisFault.makeFault(ex);
   // Do whatever you want with AxisFault
   
   throw af;

-- dims

--- Bhanu Pabreja <[EMAIL PROTECTED]> wrote:

Hello Everyone,

I have a MessageStyle service  which has the following signatures:

	Document sendData(Document doc) throws RemoteException{}

Everything works fine till I get an exception:

I wrote a method like this where I access the SOAPBody on the server
  side
  
  
and set the faultString and errorCode and return it to the client.

public static RemoteException setSOAPFaultElement(Exception ex) throws
RemoteException{
		try{
		javax.xml.soap.SOAPBody   sb1 =  null;
		sb1 =

  MessageContext.getCurrentContext().getResponseMessage().g

RE: Message Style Service and Exception Handling

2003-07-15 Thread Bhanu Pabreja



what 
do you mean my server is configured to override and handle the exception. I mean 
if the response is with flow and no exception is thrown then the SOAP response 
is perfectly norman but it is only on the event of an exception that the 
SOAPMonitor shows the status as ACTIVE and nothing shows up on the response text 
area.
 
Well 
could you access the SOAPBody on the client end ...?? If you see this response 
in your monitor there seems to be no problem to access the SOAPBody and then 
eventually the SOAPFault element but then I dont see anything in SOAPMonitor and 
eventually my SOAPBody also does not show up on the client.
 
Can 
you post your client also and which version of axis are you using 
...
 
If you 
want I can send you the screen shot of my SOAPMonitor but this is really buggy 
... and I am stuck and writing my own exception and sending it as a Document 
object.
 
Thanx 
for the input ...
 
dumdum420
 

  -Original Message[Bhanu 
  Pabreja]  -From: remko de knikker 
  [mailto:[EMAIL PROTECTED]Sent: Tuesday, July 15, 2003 12:16 
  PMTo: [EMAIL PROTECTED]Subject: Re: Message Style 
  Service and Exception HandlingI don't seem to have a 
  problem with it. here's my example which creates a SOAPResponse on the 
  SOAPMonitor. Could it be that your server is configured to override and handle 
  the exception, I remember that I once had that issue, although I am no expert 
  on this.import javax.xml.soap.SOAPBody;import 
  javax.xml.soap.SOAPFault;public Document method2(Document request) 
  throws Exception{try {ohno} catch (Exception e1) 
  {            
  logGetUMLS.info(e1.getMessage());        
      String errormsg = e1.getMessage();    
          logGetUMLS.info( "Error: " + errormsg); 
              sb1 = 
  MessageContext.getCurrentContext().getResponseMessage().getSOAPPart().getEnvelope().getBody();    
          SOAPFault fault = 
  sb1.addFault();            
  fault.setFaultString("Exception: " + errormsg);    
          
  fault.setFaultCode("Server");        
      throw e1;          
          } return 
  doc;}HTTP/1.1 500 Internal Server Error?Content-Type: 
  text/xml; charset=utf-8?Date: Tue, 15 Jul 2003 16:10:48 GMT?Server: 
  Apache Coyote HTTP/1.1 Connector [1.0]?Connection: close??   "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   
      
  java.lang.Exception: Test 
  Exception   
      
     
     
     
  Bhanu Pabreja wrote:
  Posted:
http://nagoya.apache.org/bugzilla/long_list.cgi?buglist=21578

Bhanu

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 14, 2003 12:23 PM
To: Bhanu Pabreja; [EMAIL PROTECTED]
Subject: RE: Message Style Service and Exception Handling


Please open a bug report - http://ws.apache.org/axis/bugs.html

-- dims

--- Bhanu Pabreja <[EMAIL PROTECTED]> wrote:
  
Thanx for the input but this also does not work. Infact no SOAPResponse is
generated on the SOAPMonitor. Looks like in case of message style service
there are no capabilities to generate SOAPFault which is actually a MUST
element by w3c in case of a  exception.

These are my observations but if someone has a working example which is
MessageStyle based and which propgates exception back to the client using
the SOAPFault or AxisFault it will really help me since I am stuck with
this
  
grave issue.

Thanx in advance.

dumdum420

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 14, 2003 7:42 AM
To: [EMAIL PROTECTED]
Subject: Re: Message Style Service and Exception Handling


Try this...

   AxisFault af = AxisFault.makeFault(ex);
   // Do whatever you want with AxisFault
   
   throw af;

-- dims

--- Bhanu Pabreja <[EMAIL PROTECTED]> wrote:

  Hello Everyone,

I have a MessageStyle service  which has the following signatures:

	Document sendData(Document doc) throws RemoteException{}

Everything works fine till I get an exception:

I wrote a method like this where I access the SOAPBody on the server
  side
  

  and set the faultString and errorCode and return it to the client.

public static RemoteException setSOAPFaultElement(Exception ex) throws
RemoteException{
		try{
		javax.xml.soap.SOAPBody   sb1 =  null;
		sb1 =

  MessageContext.getCurrentContext().getResponseMessage().getSOAPPart().getEnv
  

  elope().getBody();
		System.out.println(sb1.getClass());
javax.xml.soap.SOAPFault fault = sb1.addFault();
fault.setFaultString("Exception " + ex.toString());
System.out.println(fault.getFaultString());
fault.setFaultCode("Server");
System.out.println("Exception is being set in the fault
  body");

  return new RemoteException(ex.toString());
		}catch(SOAPE

RE: SSL on Apache Axis

2003-07-15 Thread Sriram . V
Hi ,
I was looking through the Axis System Integration guide on the
 section of pluggable components.
I wanted to set up my own SocketFactory implementation and found
 that the preferred way is by creating a service definition file rather than
setting the System.properties which is perfectly correct.
Can anyone please let me know on how to create this service
definition
 file..
 
 Thanks and Regards
 Sriram
 

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]
Sent: Dienstag, 15. Juli 2003 18:54
To: [EMAIL PROTECTED]
Subject: RE: SSL on Apache Axis


It's javax.net.ssl.trustStorePassword. (See
http://www.cs.ttu.edu/~cs5331/ns/modules/SSLTLS/SSLTLS.html on how to set
this in the command
line)

-- dims

--- "Shah, Soniya M." <[EMAIL PROTECTED]> wrote:
> Sriram,
> 
> I am trying to do the same but running into errors. Can you tell me how
did
> you set the attributes 'trustStore' and trustStorePassword' and got it
> working? 
> 
> Thanks,
> Soniya
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 14, 2003 1:25 PM
> To: [EMAIL PROTECTED]
> Subject: SSL on Apache Axis
> 
> 
> Hi,
>   I am trying out a SOAP sample over Https on Sun ONE with Apache
> Axis. When doing this process, to get the service call working through SSL
i
> had to set the JVMattributes 'trustStore' and trustStorePassword' 
> 
>   Setting System properties is not a cool way of doing it. since it
> could affect other applications running on the same instance on Sun ONE 
> 
>   Does Apache Axis provide me any other way to do this?
> 
>   If anyone could provide any help on this sould be very useful..
> 
>   Thanks for your help. 
> 
> 
>   GE Frankona Re
>   
> 
>   V,Sriram
>   Patni Consultant
> 
> 
>   Phone +49-89-9228 - 1533
>   Fax +49-89-9228 - 7665
>   mailto: [EMAIL PROTECTED]
> 


=
Davanum Srinivas - http://webservices.apache.org/~dims/

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


RE: Axis attachment file created in the Temp directory

2003-07-15 Thread jaccoud

I noted that my Axis client does not dump the attachments to a file unless
I use some data handler function that forces it. For example, if I use
dh.getName() Axis will dump the contents to a temp file and return its
name. If you just use dh.writeTo() to specify where to put the data, Axis
will not created the temp file (if it breates the file, I cannot percieve
it). If you ask for the file, Axis will grant ownership to you, and it is
your responsability to get rid of it (or move it, rename it, whatever).
When I just do
  DataHandler dh = part.getDataHandler();
  dh.writeTo(new java.io.FileOutputStream(myDestinationFileName));
no temp is created.
Cheers.
=
Marcelo Jaccoud Amaral
mailto:jaccoud [at] petrobras.com.br
voice: +55 21 2534-3485
fax: +55 21 2534-1809
=
There are only 10 kinds of people in the world: those who understand binary
and those who don't.





RE: SSL on Apache Axis

2003-07-15 Thread Davanum Srinivas
It's javax.net.ssl.trustStorePassword. (See
http://www.cs.ttu.edu/~cs5331/ns/modules/SSLTLS/SSLTLS.html on how to set this in the 
command
line)

-- dims

--- "Shah, Soniya M." <[EMAIL PROTECTED]> wrote:
> Sriram,
> 
> I am trying to do the same but running into errors. Can you tell me how did
> you set the attributes 'trustStore' and trustStorePassword' and got it
> working? 
> 
> Thanks,
> Soniya
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 14, 2003 1:25 PM
> To: [EMAIL PROTECTED]
> Subject: SSL on Apache Axis
> 
> 
> Hi,
>   I am trying out a SOAP sample over Https on Sun ONE with Apache
> Axis. When doing this process, to get the service call working through SSL i
> had to set the JVMattributes 'trustStore' and trustStorePassword' 
> 
>   Setting System properties is not a cool way of doing it. since it
> could affect other applications running on the same instance on Sun ONE 
> 
>   Does Apache Axis provide me any other way to do this?
> 
>   If anyone could provide any help on this sould be very useful..
> 
>   Thanks for your help. 
> 
> 
>   GE Frankona Re
>   
> 
>   V,Sriram
>   Patni Consultant
> 
> 
>   Phone +49-89-9228 - 1533
>   Fax +49-89-9228 - 7665
>   mailto: [EMAIL PROTECTED]
> 


=
Davanum Srinivas - http://webservices.apache.org/~dims/

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


Re: Performance of Web Service Clients

2003-07-15 Thread Davanum Srinivas
Dave,

Can you please try latest CVS / Nightly Build. Checked in fixes for performance a few 
days back.
I'd like a comparison between latest CVS and what you have now. (I definitely know 
that 1.1RC2 had
a lot of problems, so you might want to use 1.1Final.). Please post the results here. 

Also any code, wsdl, soap traces from tcpmon would be really useful to diagnose and 
rectify
problems. we'd really appreciate this info in the form of a bug report so that we 
don't lose track
of this important information. (http://ws.apache.org/axis/bugs.html)

Thanks,
dims

--- [EMAIL PROTECTED] wrote:
> Hi,
> 
>   I'm in the Web Services team at BT. We use Axis a lot, as it works,
> and scores highly on interoperability.
> 
>   For the last couple of months I've had to look at calling web
> services secured with various kinds of Transport Security, i.e. Basic
> Authentication with and without SSL, and Client Certificate Authentication.
> 
>   The clients I've been using for the tests are WebLogic Server 7.0
> Service Pack 2, .NET (c#) and Axis 1_1 RC2.
> 
>   According to my tests, the Axis Client is slower on all
> measurements. This is not a criticism, maybe Axis isn't  intended for
> performance, but I wondered if anyone could comment on this ?
> 
>   Is there anything I should be doing to improve the performance of
> Axis Clients ?
> 
>   If anyone knows anything about performance, and needs more detail, I
> can supply it.
> 
> Thanks
> 
> Dave
> 
> 
> 


=
Davanum Srinivas - http://webservices.apache.org/~dims/

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


RE: SSL on Apache Axis

2003-07-15 Thread Shah, Soniya M.
Sriram,

I am trying to do the same but running into errors. Can you tell me how did
you set the attributes 'trustStore' and trustStorePassword' and got it
working? 

Thanks,
Soniya

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 14, 2003 1:25 PM
To: [EMAIL PROTECTED]
Subject: SSL on Apache Axis


Hi,
I am trying out a SOAP sample over Https on Sun ONE with Apache
Axis. When doing this process, to get the service call working through SSL i
had to set the JVM  attributes 'trustStore' and trustStorePassword' 

Setting System properties is not a cool way of doing it. since it
could affect other applications running on the same instance on Sun ONE 

Does Apache Axis provide me any other way to do this?

If anyone could provide any help on this sould be very useful..

Thanks for your help. 


GE Frankona Re


V,Sriram
Patni Consultant


Phone +49-89-9228 - 1533
Fax +49-89-9228 - 7665
mailto: [EMAIL PROTECTED]



Re: Message Style Service and Exception Handling

2003-07-15 Thread remko de knikker




I don't seem to have a problem with it. 

here's my example which creates a SOAPResponse on the SOAPMonitor. Could
it be that your server is configured to override and handle the exception,
I remember that I once had that issue, although I am no expert on this.

import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPFault;

public Document method2(Document request) throws Exception{
try {
ohno
} catch (Exception e1) {
            logGetUMLS.info(e1.getMessage());
            String errormsg = e1.getMessage();
            logGetUMLS.info( "Error: " + errormsg); 
            sb1 = MessageContext.getCurrentContext().getResponseMessage().getSOAPPart().getEnvelope().getBody();
            SOAPFault fault = sb1.addFault();
            fault.setFaultString("Exception: " + errormsg);
            fault.setFaultCode("Server");
            throw e1;          
        } 
return doc;
}

HTTP/1.1 500 Internal Server Error?
Content-Type: text/xml; charset=utf-8?
Date: Tue, 15 Jul 2003 16:10:48 GMT?
Server: Apache Coyote HTTP/1.1 Connector [1.0]?
Connection: close?
?

   "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  

    java.lang.Exception: Test Exception  

      
  
  
   



Bhanu Pabreja wrote:

  Posted:
http://nagoya.apache.org/bugzilla/long_list.cgi?buglist=21578

Bhanu

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 14, 2003 12:23 PM
To: Bhanu Pabreja; [EMAIL PROTECTED]
Subject: RE: Message Style Service and Exception Handling


Please open a bug report - http://ws.apache.org/axis/bugs.html

-- dims

--- Bhanu Pabreja <[EMAIL PROTECTED]> wrote:
  
  
Thanx for the input but this also does not work. Infact no SOAPResponse is
generated on the SOAPMonitor. Looks like in case of message style service
there are no capabilities to generate SOAPFault which is actually a MUST
element by w3c in case of a  exception.

These are my observations but if someone has a working example which is
MessageStyle based and which propgates exception back to the client using
the SOAPFault or AxisFault it will really help me since I am stuck with

  
  this
  
  
grave issue.

Thanx in advance.

dumdum420

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 14, 2003 7:42 AM
To: [EMAIL PROTECTED]
Subject: Re: Message Style Service and Exception Handling


Try this...

   AxisFault af = AxisFault.makeFault(ex);
   // Do whatever you want with AxisFault
   
   throw af;

-- dims

--- Bhanu Pabreja <[EMAIL PROTECTED]> wrote:


  Hello Everyone,

I have a MessageStyle service  which has the following signatures:

	Document sendData(Document doc) throws RemoteException{}

Everything works fine till I get an exception:

I wrote a method like this where I access the SOAPBody on the server
  

  
  side
  
  

  and set the faultString and errorCode and return it to the client.

public static RemoteException setSOAPFaultElement(Exception ex) throws
RemoteException{
		try{
		javax.xml.soap.SOAPBody   sb1 =  null;
		sb1 =

  

  
  MessageContext.getCurrentContext().getResponseMessage().getSOAPPart().getEnv
  
  

  elope().getBody();
		System.out.println(sb1.getClass());
javax.xml.soap.SOAPFault fault = sb1.addFault();
fault.setFaultString("Exception " + ex.toString());
System.out.println(fault.getFaultString());
fault.setFaultCode("Server");
System.out.println("Exception is being set in the fault
  

body");


  return new RemoteException(ex.toString());
		}catch(SOAPException e){
throw new RemoteException(ex.toString());
		}
	}


But on the client side when I get an exception and in the Exception
  

  
  block
  
  
I


  try to access the exception from the SOAPBody object I get a
NullPointerExcption and the SOAPBody is empty.

Then probing further I turned on the SOAPMonitor and discovered that the
there was no response message in cases where there is exception.

Thus what I cannnot figure out it is how are exception handled in
  

  
  context
  
  
of


  MessageStyle webservices.

Any pointers will really help.

Bhanu Pabreja.


  


=
Davanum Srinivas - http://webservices.apache.org/~dims/

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



  
  

=
Davanum Srinivas - http://webservices.apache.org/~dims/

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com




  






To override SocketFactory.

2003-07-15 Thread Sriram . V
Hi,
I would like to set the components properties by creating a service
definition file. Can anyone help me on how to create this file.

Thanks and Regards
Sriram

GE Frankona Re


V,Sriram
Patni Consultant


Phone +49-89-9228 - 1533
Fax +49-89-9228 - 7665
mailto: [EMAIL PROTECTED]




Re: WSDL2Java

2003-07-15 Thread James Black
Godfrey, Gary wrote:

How do we tie the Axis generated code to our implementation code? The 
only way we see of doing it is to write adapter classes to map our 
data transfer classes to the Axis versions. This is incredibly complex 
due to the data hierachy and requires business logic to handle null data.

 What I do is to just have the javabeans be found by wsdl2axis, and it 
won't recreate them (it doesn't write over my classes).

 What you can do is to write your beans that will be passed around, so 
that all it has is the attribute getters and setters. Then, on the 
server side, extend this class, and put the business logic in there. 
That way, when you pass data around to the clients or internally, they 
are using similar beans.

 I hope this makes sense.

--
"We do not lose our identity in our relations with others; in part, at least, we achieve 
our identity by those relations." Tony Blair, 1993



WSDL2Java

2003-07-15 Thread Godfrey, Gary
Title: WSDL2Java





The web service we are writing uses complex objects. We have created our main interface, implementation and complex data object structure.

We have run Java2WSDL and this has created the WSDL as expected. We have run WSDL2Java and asked for the generated classes to go into their own package. This has generated versions of our complex data structure.

How do we tie the Axis generated code to our implementation code? The only way we see of doing it is to write adapter classes to map our data transfer classes to the Axis versions. This is incredibly complex due to the data hierachy and requires business logic to handle null data.

Any help will be appreciated.


Regards,
Gary Godfrey
    **  The information transmitted herewith is sensitive information intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.




Performance of Web Service Clients

2003-07-15 Thread dave . prout
Hi,

I'm in the Web Services team at BT. We use Axis a lot, as it works,
and scores highly on interoperability.

For the last couple of months I've had to look at calling web
services secured with various kinds of Transport Security, i.e. Basic
Authentication with and without SSL, and Client Certificate Authentication.

The clients I've been using for the tests are WebLogic Server 7.0
Service Pack 2, .NET (c#) and Axis 1_1 RC2.

According to my tests, the Axis Client is slower on all
measurements. This is not a criticism, maybe Axis isn't  intended for
performance, but I wondered if anyone could comment on this ?

Is there anything I should be doing to improve the performance of
Axis Clients ?

If anyone knows anything about performance, and needs more detail, I
can supply it.

Thanks

Dave





complex return type question

2003-07-15 Thread Sameer Bombatkar
Hi all
I have a method which returns a user-defined compelx object  ..But this 
object in turns contains a map.I want to call this method in .NET front end. 
I guess there is no direct support  for Maps in .NET and one has to convert 
that Map into an array of JavaBean.
How do I deal with this object here? Do I have to convert this internal Map 
into an array of javabean...
or just writing a serializer for the main user-defined object would work ?

Thanks
Sameer.
_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail



RE: Axis attachment file created in the Temp directory

2003-07-15 Thread jzhang

Ideally Axis can clean it up once the request is serviced.

How about using cron job to clean up temprary files that are older than say
30 minutes.



   

  "Subhendu Kumar  

  mohanty" To:  <[EMAIL PROTECTED]>
  
  <[EMAIL PROTECTED] cc:   
  
  sys.com> Subject: RE: Axis attachment file 
created in the Temp directory 
   

  07/14/2003 05:38 

  PM   

  Please respond   

  to axis-user 

   

   





NO.

ManagedMemoryDataSource class of Axis creates temporary files in the file
system when we receive the image as attachment and is not deleted .


Thanks,
Subhendu

-Original Message-
From: BLIS Webmaster (Patrick Houbaux)
[mailto:[EMAIL PROTECTED]
Sent: Monday, July 14, 2003 5:27 PM
To: [EMAIL PROTECTED]
Subject: Re: Axis attachment file created in the Temp directory



In the following the SOAPTest service exposes a method testAttachement
that send a SOAP message with attachement.
The following client call that method, takes the part and delete the
file. I don't know if it is what you want but it works fine.



public static void main(String [] args) {
try {
String endpoint =
"http://localhost:8080/axis/services/SOAPTest?wsdl";;

Service  service = new Service();
Call call= (Call) service.createCall();

java.net.URL url = new java.net.URL(endpoint);
call.setTargetEndpointAddress(url);

call.setOperationName("testAttachement");
call.setMaintainSession(true);

String ret = (String)call.invoke(new Object[]{});

org.apache.axis.Message rspMsg= call.getResponseMessage();
java.util.Iterator iter = rspMsg.getAttachments();
while (iter.hasNext()){
org.apache.axis.attachments.AttachmentPart part =
(org.apache.axis.attachments.AttachmentPart)iter.next();
java.io.File file = new
java.io.File(part.getDataHandler().getName());

//
// Do something with the file
//

file.delete();
}
} catch (Exception e) {
System.err.println(e.toString());
e.printStackTrace();
}
}


Cheers,
Patrick.


Subhendu Kumar mohanty wrote:

>Even if I can not change the directory .
>
>What will happen if the job is deleting when somebody is requesting for
the image.
>
>Is this a limitation of using data handler for attachment in the client
side ?
>
>Thanks,
>Subhendu
>
>-Original Message-
>From: BLIS Webmaster (Patrick Houbaux)
>[mailto:[EMAIL PROTECTED]
>Sent: Monday, July 14, 2003 2:32 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Axis attachment file created in the Temp directory
>
>
>I guess you have to clean it or move it somewhere else in your client
code.
>
>Patrick.
>
>Subhendu Kumar mohanty wrote:
>
>
>
>>Hi all,
>>
>>I am developing a webservice client which uses Axis. My client app calls
an external webservice to get the image.I found that Axis creates temporary
files in the system default temporary directory and does not clean up.
>>
>>If anybody has solved this problem please let me know.
>>
>>Thanks,
>>Subhendu
>>
>>
>>
>>
>
>
>









Re: Problem with custom exceptions not getting deserialized

2003-07-15 Thread Davanum Srinivas
We are NOT going to change the way wsdl2java generates code...In 1.1, you can register 
your own
exceptions and throw/catch them. Look at samples\faults

-- dims

--- Peter Landmann <[EMAIL PROTECTED]> wrote:
> 
> Dear Dvanum,
> 
> Davanum Srinivas <[EMAIL PROTECTED]> wrote:
> > Dan,
> >
> > This problem has been fixed already in 1.1
> 
> I am using the 1.1 release version (I never tried it with 1.0). Last week I
> even tried one of the nightly builds, but the problem is still the same,
> and wsdl2java generates the same exception classes which are wrongly
> derivated from AxisFault.
> 
> Regards,
> Peter Landmann
> 
> 
> 


=
Davanum Srinivas - http://webservices.apache.org/~dims/

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


ANN: SOAPscope 2.0 beta available

2003-07-15 Thread Jim Murphy
SOAPscope 2.0 beta - FREE to a good home.

SOAPscope 2.0 is a major new release of SOAPscope adding significant 
WSDL-related features.   The beta is available now by registering at 
http://www.mindreef.com/beta/

New in SOAPscope 2.0 Beta 2
---
- Improved User Interface

- WSDL Invoke: Try out Web Services by filling out an HTML form.  The 
invoke feature allows you to send a SOAP request without writing a line 
of code.  Edit and tweak the request message to experiment with wire 
format variations.

- Enhanced Viewing: View both WSDL and SOAP in Pseudocode, Tree, XML or 
Raw views.  Tree is new in 2.0 and provides a concise way of viewing and 
navigating dense WSDL files.

- Compare WSDL and SOAP: Powerful ‘XML Infoset Diff’ on WSDL and SOAP to 
aid in debugging.  Handy for locating the essential differences between 
a message that works and one that didn't.

- Analyze WSDL: Detect errors and potential interoperability problems in 
your WSDL document.  Analysis is based on W3C standards and WS-I basic 
profile as well as Mindreef ‘best practices.’

- Enhanced ‘resend’: Resend now allows editing destination, headers and 
XML attributes in any display mode.

- SOAP 1.2 support!

We look forward to your feedback on SOAPscope 2.0.  Let us know what you 
think.

Kind regards,

- The Mindreef Team




Re: Problem with custom exceptions not getting deserialized

2003-07-15 Thread Peter Landmann

Dear Dvanum,

Davanum Srinivas <[EMAIL PROTECTED]> wrote:
> Dan,
>
> This problem has been fixed already in 1.1

I am using the 1.1 release version (I never tried it with 1.0). Last week I
even tried one of the nightly builds, but the problem is still the same,
and wsdl2java generates the same exception classes which are wrongly
derivated from AxisFault.

Regards,
Peter Landmann





Re: Problem with custom exceptions not getting deserialized

2003-07-15 Thread Davanum Srinivas
Dan,

This problem has been fixed already in 1.1

thanks,
dims

--- Dan Kamins <[EMAIL PROTECTED]> wrote:
> 
> I faced the same problem (can't throw app-specific exceptions) and solved it by 
> subclassing
> AxisFault for all of my exceptions.  It allows me to explicitly set text for the 
> actor, code,
> details, etc. fields of the SOAP fault fairly easily in the constructors of the 
> exceptions.
> 
> That being said, I am somewhat unhappy with this, because it prevents me from doing 
> what seems
> proper, which you (Peter) said in a previous post:
> 
> > keep my business logic interfaces (and the exceptions
> > which belong to it) as independent from the underlying
> > RPC technology as possible
> 
> A nicer solution might be some form of type-mapping serialization setup as is done 
> with bean
> mapping and serialization of other classes.  AFAIK this does not exist, and if 
> nobody responds
> to say it does, I second it as a nice feature request, and you should enter it in.
> 
> After all, avoiding vendor lock-in is one of the reasons people choose open source 
> to begin
> with.
> 
> --
> Dan Kamins
> 
> On Tue, 15 Jul 2003 10:15:28 +0200, Peter Landmann wrote:
> >Hi,
> >
> >Once again, as no one replied: Did really no one else face this
> >problem up
> >to now? Don't you use exceptions in your service interfaces?
> >
> >I took a look on the JAX-RPC specification 1.0 now: It defines that
> >service
> >specific exceptions must extend java.lang.Exception - and not
> >something
> >like RemoteException or AxisFault. This means that Axis 1.1 doesn't
> >comply
> >with the specification in this point, unfortunately. Should I write
> >a bug
> >report?
> >
> >Regards,
> >Peter
> >
> >__
> >Peter Landmann
> >e-Business Services
> >System Engineer
> >Tel.: +49 89 898157-85
> >Fax: +49 89 898157-49
> >mailto:[EMAIL PROTECTED]
> >__
> >PEGAS systemhaus gmbh
> >Rudolf-Diesel-Str. 1
> >D-82166 Gräfelfing
> >http://www.pegas.com/
> >http://www.e-integrator.de/
> >__
> >
> >
> >
> 
> 


=
Davanum Srinivas - http://webservices.apache.org/~dims/

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


One way service in AXIS

2003-07-15 Thread Duraiswamy, RajaManickam (Cognizant)
Hi All,
   How do configure a web service with one-way operation in axis??.

thanks in advance,

raj
This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

Visit us at http://www.cognizant.com


Re: Problem with custom exceptions not getting deserialized

2003-07-15 Thread Dan Kamins

I faced the same problem (can't throw app-specific exceptions) and solved it by 
subclassing AxisFault for all of my exceptions.  It allows me to explicitly set text 
for the actor, code, details, etc. fields of the SOAP fault fairly easily in the 
constructors of the exceptions.

That being said, I am somewhat unhappy with this, because it prevents me from doing 
what seems proper, which you (Peter) said in a previous post:

> keep my business logic interfaces (and the exceptions
> which belong to it) as independent from the underlying
> RPC technology as possible

A nicer solution might be some form of type-mapping serialization setup as is done 
with bean mapping and serialization of other classes.  AFAIK this does not exist, and 
if nobody responds to say it does, I second it as a nice feature request, and you 
should enter it in.

After all, avoiding vendor lock-in is one of the reasons people choose open source to 
begin with.

--
Dan Kamins

On Tue, 15 Jul 2003 10:15:28 +0200, Peter Landmann wrote:
>Hi,
>
>Once again, as no one replied: Did really no one else face this
>problem up
>to now? Don't you use exceptions in your service interfaces?
>
>I took a look on the JAX-RPC specification 1.0 now: It defines that
>service
>specific exceptions must extend java.lang.Exception - and not
>something
>like RemoteException or AxisFault. This means that Axis 1.1 doesn't
>comply
>with the specification in this point, unfortunately. Should I write
>a bug
>report?
>
>Regards,
>Peter
>
>__
>Peter Landmann
>e-Business Services
>System Engineer
>Tel.: +49 89 898157-85
>Fax: +49 89 898157-49
>mailto:[EMAIL PROTECTED]
>__
>PEGAS systemhaus gmbh
>Rudolf-Diesel-Str. 1
>D-82166 Gräfelfing
>http://www.pegas.com/
>http://www.e-integrator.de/
>__
>
>
>




Re: Problem with custom exceptions not getting deserialized

2003-07-15 Thread Dan Kamins

I faced the same problem (can't throw app-specific exceptions) and solved it by 
subclassing AxisFault for all of my exceptions.  It allows me to explicitly set text 
for the actor, code, details, etc. fields of the SOAP fault fairly easily in the 
constructors of the exceptions.

That being said, I am somewhat unhappy with this, because it prevents me from doing 
what seems proper, which you (Peter) said in a previous post:

> keep my business logic interfaces (and the exceptions
> which belong to it) as independent from the underlying
> RPC technology as possible

A nicer solution might be some form of type-mapping serialization setup as is done 
with bean mapping and serialization of other classes.  AFAIK this does not exist, and 
if nobody responds to say it does, I second it as a nice feature request, and you 
should enter it in.

After all, avoiding vendor lock-in is one of the reasons people choose open source to 
begin with.

--
Dan Kamins

On Tue, 15 Jul 2003 10:15:28 +0200, Peter Landmann wrote:
>Hi,
>
>Once again, as no one replied: Did really no one else face this
>problem up
>to now? Don't you use exceptions in your service interfaces?
>
>I took a look on the JAX-RPC specification 1.0 now: It defines that
>service
>specific exceptions must extend java.lang.Exception - and not
>something
>like RemoteException or AxisFault. This means that Axis 1.1 doesn't
>comply
>with the specification in this point, unfortunately. Should I write
>a bug
>report?
>
>Regards,
>Peter
>
>__
>Peter Landmann
>e-Business Services
>System Engineer
>Tel.: +49 89 898157-85
>Fax: +49 89 898157-49
>mailto:[EMAIL PROTECTED]
>__
>PEGAS systemhaus gmbh
>Rudolf-Diesel-Str. 1
>D-82166 Gräfelfing
>http://www.pegas.com/
>http://www.e-integrator.de/
>__
>
>
>




Re: Problem with custom exceptions not getting deserialized

2003-07-15 Thread Dan Kamins

I faced the same problem (can't throw app-specific exceptions) and solved it by 
subclassing AxisFault for all of my exceptions.  It allows me to explicitly set text 
for the actor, code, details, etc. fields of the SOAP fault fairly easily in the 
constructors of the exceptions.

That being said, I am somewhat unhappy with this, because it prevents me from doing 
what seems proper, which you (Peter) said in a previous post:

> keep my business logic interfaces (and the exceptions
> which belong to it) as independent from the underlying
> RPC technology as possible

A nicer solution might be some form of type-mapping serialization setup as is done 
with bean mapping and serialization of other classes.  AFAIK this does not exist, and 
if nobody responds to say it does, I second it as a nice feature request, and you 
should enter it in.

After all, avoiding vendor lock-in is one of the reasons people choose open source to 
begin with.

--
Dan Kamins

On Tue, 15 Jul 2003 10:15:28 +0200, Peter Landmann wrote:
>Hi,
>
>Once again, as no one replied: Did really no one else face this
>problem up
>to now? Don't you use exceptions in your service interfaces?
>
>I took a look on the JAX-RPC specification 1.0 now: It defines that
>service
>specific exceptions must extend java.lang.Exception - and not
>something
>like RemoteException or AxisFault. This means that Axis 1.1 doesn't
>comply
>with the specification in this point, unfortunately. Should I write
>a bug
>report?
>
>Regards,
>Peter
>
>__
>Peter Landmann
>e-Business Services
>System Engineer
>Tel.: +49 89 898157-85
>Fax: +49 89 898157-49
>mailto:[EMAIL PROTECTED]
>__
>PEGAS systemhaus gmbh
>Rudolf-Diesel-Str. 1
>D-82166 Gräfelfing
>http://www.pegas.com/
>http://www.e-integrator.de/
>__
>
>
>




Re: Problem with custom exceptions not getting deserialized

2003-07-15 Thread Dan Kamins

I faced the same problem (can't throw app-specific exceptions) and solved it by 
subclassing AxisFault for all of my exceptions.  It allows me to explicitly set text 
for the actor, code, details, etc. fields of the SOAP fault fairly easily in the 
constructors of the exceptions.

That being said, I am somewhat unhappy with this, because it prevents me from doing 
what seems proper, which you (Peter) said in a previous post:

> keep my business logic interfaces (and the exceptions
> which belong to it) as independent from the underlying
> RPC technology as possible

A nicer solution might be some form of type-mapping serialization setup as is done 
with bean mapping and serialization of other classes.  AFAIK this does not exist, and 
if nobody responds to say it does, I second it as a nice feature request, and you 
should enter it in.

After all, avoiding vendor lock-in is one of the reasons people choose open source to 
begin with.

--
Dan Kamins

On Tue, 15 Jul 2003 10:15:28 +0200, Peter Landmann wrote:
>Hi,
>
>Once again, as no one replied: Did really no one else face this
>problem up
>to now? Don't you use exceptions in your service interfaces?
>
>I took a look on the JAX-RPC specification 1.0 now: It defines that
>service
>specific exceptions must extend java.lang.Exception - and not
>something
>like RemoteException or AxisFault. This means that Axis 1.1 doesn't
>comply
>with the specification in this point, unfortunately. Should I write
>a bug
>report?
>
>Regards,
>Peter
>
>__
>Peter Landmann
>e-Business Services
>System Engineer
>Tel.: +49 89 898157-85
>Fax: +49 89 898157-49
>mailto:[EMAIL PROTECTED]
>__
>PEGAS systemhaus gmbh
>Rudolf-Diesel-Str. 1
>D-82166 Gräfelfing
>http://www.pegas.com/
>http://www.e-integrator.de/
>__
>
>
>




Different implementation in and out

2003-07-15 Thread Mattias J
Hi there!
I wonder how I would go about mapping different implementations of an
interface depending on wether it is used as incoming parameter or return
value.

Here's the story:
I have a class, Partner, containing a lot of attributes. I want to be able
to return a subset of the attributes from a SOAP call. So my idea was to
create an interface, say WebPartner, containing getters for the attributes I
want to expose and let Partner implement that interface. Then I would have a
SOAP enabled method:
  WebPartner getPartner(String id) {
// Find partner
return partner;
  }

and a mapping 

  

Now, I also want the SOAP client to be able to update the attributes of my
Partner, but only the attributes exposed (the subset).
I want a method 
  void updatePartner(WebPartner webPartner {
// Find partner
// Update values
  }

The idea here was to create another class, say WebPartnerImpl, that has only
the exposed subset of attributes. But how would I map WebPartner to become
WebPartnerImpl then?

(An alternative is of course to map WebPartnerImpl and then copy all the
relevant values from Partner to a WebPartnerImpl before returning the
infomation, but I would like to avoid that)

  Mattias Jiderhamn
  Expert Systems

  [EMAIL PROTECTED]
  www.expertsystem.se



Has anybody worked with WASP C++?

2003-07-15 Thread Gavriloaie_andrei












Hi,
I have a little problem(I hope) using multidimensional arrays of objects in C++.
Here is the description:
 
Using:
-- Apache Tomcat/4.1.18
-- JVM Version: 1.4.1_01-b01
-- JVM Vendor: Sun Microsystems Inc.
-- OS Name: Windows 2000
-- OS Version: 5.0
-- Axis 1.1
-- Systinet WASP Server for C++ (only to generate the C++ classes from an existing wsdl)
 
Problem:
Supose we have an array like this:
 
//   [0] - "Some value"
//   [1] - [0] - "Value-1"
// [1] - "Value-2"
// [2] - "kjhjkhsdkjfhs"
// [3] - "Value-3"
// [4] - [0] - "Value 4"
// [1] - "Value 5"
 
This structure is defined in java, deployed on axis and then retreived with WSDLC compiler in a C++ format.
When using this structure to "post" some data to the service the structure "hit" the java function with first subarray NULL:
 

//   [0] - "Some value"
//   [1] - NULL
 
I've tryed to get the structure initialized from the service and then "post" it back. SAME RESULT!!!
 
Any hint on this problem is very very very appreciated!!!
 
Best Regards















  IncrediMail - Email has finally evolved - Click Here

Re: Problem with custom exceptions not getting deserialized

2003-07-15 Thread Peter Landmann
Hi,

Once again, as no one replied: Did really no one else face this problem up
to now? Don't you use exceptions in your service interfaces?

I took a look on the JAX-RPC specification 1.0 now: It defines that service
specific exceptions must extend java.lang.Exception - and not something
like RemoteException or AxisFault. This means that Axis 1.1 doesn't comply
with the specification in this point, unfortunately. Should I write a bug
report?

Regards,
Peter

__
Peter Landmann
e-Business Services
System Engineer
Tel.: +49 89 898157-85
Fax: +49 89 898157-49
mailto:[EMAIL PROTECTED]
__
PEGAS systemhaus gmbh
Rudolf-Diesel-Str. 1
D-82166 Gräfelfing
http://www.pegas.com/
http://www.e-integrator.de/
__




Re: java2wsdl2java deletes code in beans

2003-07-15 Thread Peter Landmann
Hi Jörg,

I use to generate the Java classes into a seperate directory and with the
option helpergen="true", which generates seperate helper classes with the
SOAP specific stuff. After that I move the *Helper, *Service,
*ServiceLocator and *SoapBindungStub files into a separate package of my
source directory and modify the import statements accordingly. The
generated bean classes get deleted. My hand-coded bean classes with
comments, toString etc. don't get touched and stay independent of SOAP
specific things. That's all quite easy to do if you use an Ant build file
for it.

Regards,
Peter Landmann

> -Original Message-
> From: Joerg Buchberger [mailto:[EMAIL PROTECTED]
> Sent: Friday, 11 July 2003 5:37 PM
> To: [EMAIL PROTECTED]
> Subject: java2wsdl2java deletes code in beans
>
>
> Hi.
>
> When I define a web service by creating an interface, which
> includes some bean
> classes, and then use java2wsdl2java the stubs and
> serializable bean classes
> get generated.
>
> For some reason, the axis generated serializable bean
> classes' methods are
> stripped of original code (validity checks etc.) and any
> additional methods,
> such as toString get deleted as well. This is a little
> inconvenient since that
> means copying that code back into the bean classes after
> using axis tools.
>
> Is there any way to avoid this?
>
> Thanks for any hints.
>
> Cheers,
> Joerg