RE:pass arguments to the constructor of SOAP service

2002-01-14 Thread Rino Srivastava

Is there anyway by which you can pass arguments to the constructor of SOAP
service? If yes then where to configure these parameter values? 
Thanks.
Rino





Re: WSDL , Apache Soap question

2002-01-14 Thread greyson . smith


This is what is working for me...

types
  xsd:schema
  targetNamespace=http://www.lockerservice.com/Locker;
xmlns=http://www.w3.org/1999/XMLSchema/;
xsd:complexType
  name=Hashtable
  xsd:element name=table
  type=xsd:[Ljava.util.Hashtable$Entry;/
  xsd:element
  name=count type=xsd:int/
  xsd:element
  name=threshold type=xsd:int/
  xsd:element
  name=loadFactor type=xsd:float/
  xsd:element
  name=modCount type=xsd:int/
  xsd:element
  name=serialVersionUID type=xsd:long/
  xsd:element
  name=keySet type=xsd:java.util.Set/
  xsd:element
  name=entrySet type=xsd:java.util.Set/
  xsd:element
  name=values
  type=xsd:java.util.Collection/
  xsd:element
  name=KEYS type=xsd:int/
  xsd:element name=VALUES
  type=xsd:int/
  xsd:element name=ENTRIES
  type=xsd:int/
  xsd:element name=emptyEnumerator
  type=xsd:java.util.Hashtable$EmptyEnumerator/
  xsd:element
  name=emptyIterator
type=xsd:java.util.Hashtable$EmptyIterator/
/xsd:complexType
  /xsd:schema
/types

In the declaration of the method:
type=tns:Hashtable


In the deployment descriptor:

  isd:map encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:x= qname=x:meth5_outType javaType=java.util.Map
java2XMLClassName=org.apache.soap.encoding.soapenc.HashtableSerializer
xml2JavaClassName=org.apache.soap.encoding.soapenc.HashtableSerializer /


   
 
Raghavan  
 
Srinivasan  To: [EMAIL PROTECTED], 
[EMAIL PROTECTED] 
raghavan@iplcc:   
 
anet.comSubject: WSDL , Apache Soap question  
 
   
 
11-01-02   
 
07:04 PM   
 
Please 
 
respond to 
 
soap-user  
 
   
 
   
 




I have a Apache Web service one of whose methods  takes in
java.util.Hashtable as a parameter . I understand that the Apache
Toolkit supports Hashtable encoding . But i want to write a WSDL
interface to this service that toolkits from other languages could use
to generate stubs .

I could'nt find the right schema element to represent a structure
similar to Map / Hashtable .

I used the Idoox java2wsdl utility to see what the utility generates and
it came up with ns0:Hashtable
where ns0 = http://xml.apache.org/xml-soap .

This is obviously Apache specific and I dont know how compilers from
other languages will interpret it .

 Has anyone else faced a similar issue ?

Thanks -
Raghavan





--

NOTICE:  The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential.  If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected.





Multithreading and Blocking of Deployed Services

2002-01-14 Thread Alex Rau

Hi there,

for a student job we're developing a newsgroup system for mobile devices 
(Compaq Ipaqs).

Currently, we have some trouble with the deployed service class. On 
desktop computers everything works fine, but the slow ipaqs showed up 
some strange deadlock problem, which hasn't been detected before.

Each ipaq owns a server thread and a client thread. The server thread 
offers the deployed service interface (methods mainly for requesting 
messageids and messages) and the client thread is looking for new 
servers and downloading messages on detection. On detection of another 
ipaq in the wlan, both try to send a soap request to the other one's 
server, which should return a vector with message ids or just messages, 
which are available for download.

When a server thread receives a soap request from a client, it first has 
to call private methods in its own interface via soap for calculating 
the results. This does not work, because the first soap request (from 
the client) has not been finished and no soap response has been sent 
back, so the interface class blocks method invokation (second internal 
soap request) until the first (client) soap request has really finished. 
That's why the client soap request result blocks forever - deadlock.

So the problem seems to be, that apache soap can't handle soap requests 
in parallel. My question is now: is this assumption correct or did we 
make any errors ? Is it in general impossible in java, to call two 
(different) methods on the same object from two threads ? I don't think 
so, but u never know :S

Note:
- It's not possible to slice the service interface into several classes 
for multithreading, because data between more than one interface can't 
be shared (at least i do not know, how this should be done, because 
several deployed interfaces have no references to each other).

- There're no synchronized blocks in the service interface (neither in 
the whole implementation), which could explain the blocking behaviour.

Regards,
 Alexander Rau




RE: Multithreading and Blocking of Deployed Services

2002-01-14 Thread Jason Smith

 On
 desktop computers everything works fine, but the slow ipaqs showed up
 some strange deadlock problem, which hasn't been detected before.
This tells me you need to check your JVM on the iPaq and see how it handles
things like threads.

 When a server thread receives a soap request from a client, it first has
 to call private methods in its own interface via soap for calculating
 the results.
This doesn't make much sense to me.  If a server has received a request why
does it have to invoke methods on itself via SOAP unless it was to a
different SOAP service?  If you are in one service or Java object just
invoke the method because you're already in the object, right?


 This does not work, because the first soap request (from
 the client) has not been finished and no soap response has been sent
 back, so the interface class blocks method invokation (second internal
 soap request) until the first (client) soap request has really finished.
 That's why the client soap request result blocks forever - deadlock.
This works in my desktop environment (JDK 1.3.1, Win 2000, Apache SOAP
v2.2).  I can call out to other soap services and I can invoke the same
service from within a service via SOAP (not that I would ever want to).
Again, this tells me you need to look at the JVM you are using and see if
there are known threading issues.  Why would the interface class block
additional invocations unless you were trying to synchronize?

 So the problem seems to be, that apache soap can't handle soap requests
 in parallel. My question is now: is this assumption correct or did we
 make any errors ?
You said it worked on your desktop, and it worked on my desktop.  Bytecode
is the same right, so it does work...just apparently not on the iPaq.  I
would check for issues with your JVM and make sure you really want to
self-invoke via SOAP.

 Is it in general impossible in java, to call two
 (different) methods on the same object from two threads ? I don't think
 so, but u never know :S
Sure you can, just watch out for synchronization issues (same as in any
threaded environment).  If your service is using collections of some sort
for data storage make sure you aren't doing anything funny by going through
hidden synchronized accessors to your containers.

 Note:
 - It's not possible to slice the service interface into several classes
 for multithreading, because data between more than one interface can't
 be shared (at least i do not know, how this should be done, because
 several deployed interfaces have no references to each other).
I think this depends on your web container.  SOAP acts like a web
application, right?  So depending on how your deployment environment handles
things like scalability/failover and how many JVMs actually run it you might
be able to use some sort of Singleton/Factory patterns.  Have you considered
using session techniques for storing shared information?  This is probably
the preferred way.

Forgive me if I misinterpreted what you were trying to say, these are just
the first things that popped in my head.

-jason





Do I need a serializer ?

2002-01-14 Thread Jamie Tsao
Title: Do I need a serializer ?







I'm a beginner with SOAP, and have been reading a lot of documentation on it. I'm a bit confused about whether or not I need a serializer.

What I'm trying to build:


I want to use the RPC router servlet to provide a SOAP interface to our existing platform. Outside clients would make requests to our platform by sending XML request messages (in SOAP format). They would receive responses also in XML.

So I basically need to take the XML message, grab the data out and instantiate a bean to pass into our existing business objects. Is this what the deserializer is meant for ? It doesn't seem like it. The code that does this seems very specific to the particular format of the XML message, and seems more like DOM work to me. When I get the response back from the business object, I have to take the data out of the javabean, and construct an XML message to be sent back to the client. This once agains seems very specific, and NOT serializer work.

If I'm right in my assumptions, do I need a serializer/deserializer then ??


Thanks for any help.







Re: Subject: unsubscribe me

2002-01-14 Thread RJFitzpatrick


unsubscribe me


   
 
vikas K   
 
singh   To: [EMAIL PROTECTED]  
 
vikas_k_s@lyc   cc:   
 
os.com  Subject: Subject: unsubscribe me  
 
   
 
01/11/2002 
 
12:32 AM   
 
Please respond 
 
to soap-user   
 
   
 
   
 




unsubscribe me









RE: Do I need a serializer ?

2002-01-14 Thread Andrew Simpson


Standard apache serializers will (de)serialize most of what you need.  As
well as basic types, you can even d/s arrays of beans, or beans which
contain other beans.

Attached is a deployment descriptor for a stateless session bean which
returns arrays of beans, some sample beans, and some sample XML generated.

Andrew


 Andrew Simpson, SpeechWorks International, Inc.
 695 Atlantic Avenue, Boston, MA 02111, U.S.A.
 Voice: +1 617 428 ,  Fax: +1 617 757 2211
 [EMAIL PROTECTED]  http://www.speechworks.com


-Original Message-
From: Jamie Tsao [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 14, 2002 3:22 PM
To: [EMAIL PROTECTED]
Subject: Do I need a serializer ?

I'm a beginner with SOAP, and have been reading a lot of documentation on
it.  I'm a bit confused about whether or not I need a serializer.
What I'm trying to build:
I want to use the RPC router servlet to provide a SOAP interface to our
existing platform.  Outside clients would make requests to our platform by
sending XML request messages (in SOAP format).  They would receive responses
also in XML.
So I basically need to take the XML message, grab the data out and
instantiate a bean to pass into our existing business objects.  Is this what
the deserializer is meant for ?  It doesn't seem like it.  The code that
does this seems very specific to the particular format of the XML message,
and seems more like DOM work to me.  When I get the response back from the
business object, I have to take the data out of the javabean, and construct
an XML message to be sent back to the client.  This once agains seems very
specific, and NOT serializer work.
If I'm right in my assumptions, do I need a serializer/deserializer then ??
Thanks for any help.



serialization.zip
Description: Zip compressed data


RE: pass arguments to the constructor of SOAP service

2002-01-14 Thread Shashi Anand

I do not there is any way to do that. Only defauly constructor is used to
consruct the object.

-Original Message-
From: Rino Srivastava [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 14, 2002 7:23 PM
To: [EMAIL PROTECTED]
Subject: RE:pass arguments to the constructor of SOAP service


Is there anyway by which you can pass arguments to the constructor of SOAP
service? If yes then where to configure these parameter values? 
Thanks.
Rino




RE: Do I need a serializer ?

2002-01-14 Thread Shashi Anand
Title: Do I need a serializer ?



Apache 
comes with serializer/de-serializerfor Javabean and other datatypes so if 
you pass and receive whihc is not one of such datatypes then you do not need 
your custom one.

Shashi 
Anand

  -Original Message-From: Jamie Tsao 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, January 15, 2002 1:52 
  AMTo: [EMAIL PROTECTED]Subject: Do I need a 
  serializer ?
  I'm a beginner with SOAP, and have been reading a 
  lot of documentation on it. I'm a bit confused about whether or not I 
  need a serializer.
  What I'm trying to build: 
  I want to use the RPC router servlet to provide a 
  SOAP interface to our existing platform. Outside clients would make 
  requests to our platform by sending XML request messages (in SOAP 
  format). They would receive responses also in XML.
  So I basically need to take the XML message, grab 
  the data out and instantiate a bean to pass into our existing business 
  objects. Is this what the deserializer is meant for ? It doesn't 
  seem like it. The code that does this seems very specific to the 
  particular format of the XML message, and seems more like DOM work to 
  me. When I get the response back from the business object, I have to 
  take the data out of the javabean, and construct an XML message to be sent 
  back to the client. This once agains seems very specific, and NOT 
  serializer work.
  If I'm right in my assumptions, do I need a 
  serializer/deserializer then ?? 
  Thanks for any help. 



RE: Can we run a SOAP server without any Web Server?

2002-01-14 Thread Shashi Anand
Title: Can we run a SOAP server without any Web Server?



i 
think yes, soap is not limited to http you can use mail server or some other 
protocol too.

  -Original Message-From: Chouthri Palanisamy 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, January 15, 2002 
  8:42 AMTo: [EMAIL PROTECTED]Subject: Can we run a 
  SOAP server without any Web Server?
  Hi, Can any of 
  you help me!!!. Can we run a SOAP server 
  without any Web Server?. 
  Could you pls let me know. 
  Thanks  Regards, Chouthri Palanisamy