Re: I give up

2005-10-28 Thread Scott Lamb

On Oct 28, 2005, at 10:36 AM, Wagle Chetan wrote:


Your point is well taken. And I agree that some of the people on the
Axis list indeed do a lot of hard work without any strings attached -
but even they cannot cover 100% of questions, so you can see some
queries unanswered. While this is probably fine for small budget
projects, however, most corporations have a need for support to  
respond

back within a specified time frame - which cannot be guaranteed with
open source support.


I have my own frustrations with SOAP, Axis, and this list, but this  
one strikes me as unreasonable. If you want paid support, it's  
available. As Dims said twice now, paid support _is_ available.


http://marc.theaimsgroup.com/?l=axis-user&m=113051047826397&w=2

--
Scott Lamb <http://www.slamb.org/>




Re: AW: Wsdl2Java and no Internet-Connection (with 1.1 ok, with 1.2.1 exception): An error occurred trying to resolve schema referenced at...

2005-08-26 Thread Scott Lamb
I've also encountered this problem. We've use wsdl2java and have a  
sometimes-flakey Internet connection. Some machines have no  
connection at all.


On 26 Aug 2005, at 01:20, Peter Koch wrote:
(quoting John Kaputin)
A possible approach might be to add something to the WSDL4J API to  
allow an
application such as Axis to configure WSDL4J to ignore specified  
URLs when

resolving schemas (e.g. to ignore the standard schema URLs like
http://schemas.xmlsoap.org/soap/encoding).


I don't know that this helps. There still are other schemas that will  
need to be resolved. It's just trying to download the .xsds for all  
these URLs, right? Isn't this the problem XML Catalog exists to solve?


<http://ant.apache.org/manual/CoreTypes/xmlcatalog.html>

Regards,
Scott

--
Scott Lamb <http://www.slamb.org/>



Re: Maven, the repository and Apache projects

2005-08-23 Thread Scott Lamb

On Aug 23, 2005, at 12:27 PM, Levitt, David, Bookspan wrote:


And the repository line in the project.properties file should specify
the repository?

maven.repo.remote=http://www.ibiblio.org,http://maven- 
plugins.sf.net/mav

en,http://www.apache.org/dist/java-repository/

I have this, and maven 1.0.2 complains:

Attempting to download apache-axis-1.2.1.jar.
Error retrieving artifact from
[http://maven-plugins.sf.net/maven/apache-axis/jars/apache- 
axis-1.2.1.ja

r]: java.io.IOExc
eption: Unknown error downloading; status code was: 302


Change http://maven-plugins.sf.net/maven to http://maven- 
plugins.sourceforge.net/maven/ and I bet it will work.


The status code 302 indicates a permanent redirect; sf.net redirects  
to sourceforge.net. Maven's not following this correctly. I believe  
this is <http://jira.codehaus.org/browse/WAGONHTTP-1>. Apparently  
this error causes it to stop trying entirely, not just stop trying to  
get it from the one repository.


Regards,
Scott

--
Scott Lamb <http://www.slamb.org/>




Re: Collections classes?

2005-07-07 Thread Scott Lamb

On 5 Jul 2005, at 01:14, Keith Hatton wrote:


Axis uses the JAX-RPC specification for mapping between Java and XSD
types.
You can get the JAX-RPC 1.1 specification from here:
http://java.sun.com/xml/downloads/jaxrpc.html


Okay. So it's a restriction imposed by a Java specification, rather  
than SOAP itself?


That's frustrating, but it makes more sense.

I'd seen that site before; guess I'll start looking at it more  
thoroughly.



Lists (and other collection types) are not supported. End of story.
You're barking up the wrong tree to try and force sophisticated
collection objects into SOAP. Really, SOAP is just a way of passing
messages between systems, not objects.
http://weblogs.cs.cornell.edu/AllThingsDistributed/archives/ 
000343.html


Hmm. That's depressing.

What I really want to do is treat SOAP like XML-RPC. We have a bunch  
of older code using XMLRPC and a bunch of newer code using SOAP. The  
older code is simple. (It's using Hashtable and Vector instead of Map  
and List, but that's easy to change.) The newer code is not so simple.



Of course, to turn an array into a list is as simple as
java.util.Arrays.asList(Object[]); to turn a list into an array is as
simple as java.util.List.toArray().


Right. This is what I'm doing now, but it's not simple. I have to  
make near-duplicates of the classes Axis generates for me with the  
collections types I want. Then I need wrapper code around the calls  
to translate between the two. That's what I'm trying to avoid.


It seems like if I'm going to be making my own stuff anyway, I'd  
rather just get SAX-style stuff rather than a DOM-style tree that  
doesn't make sense.


--
Scott Lamb <http://www.slamb.org/>



Re: Collections classes?

2005-07-04 Thread Scott Lamb

On 4 Jul 2005, at 08:38, Anne Thomas Manes wrote:

Actually, a list is a specialization of an array, not the other way
around. As James says, a list requires more information than an XSD
type array. An XSD type array has no sense of order or index. It is
simply a repeating element. There's no metadata included in each of
the repeating element to indicate indexing or ordering.


Okay, first of all, when I've been describing arrays, I'm talking  
about arrays on the Java side. I've been treating the SOAP side as a  
black box. I know that Axis is capable of producing a Java array,  
which has the same requirements as a Java List. Thus, I don't need to  
know _anything_ about SOAP or XSD to know that you are wrong. The  
ordering information is there. To give a concrete example, when I do  
a google search with their published WSDL, I get my results in order.  
I simply want that to be a with a List rather than a  
ResultElement[].


Secondly, of course the XSD does not describe ordering. It doesn't  
need to. When you serialize something as a stream of bytes, you're  
always putting them in order. It's called serialization for a reason.  
The order of the array/list/whatever is the order that the objects  
are written in.



SOAPpy can easily maps things around because Python is a loosely typed
language. Java is strongly typed and therefore much more strict about
mapping types.


If it can map it to a Java ResultElement[] in advance, why can't it  
map it to a Java List in advance? Strong typing is not  
the problem.



In any case, if you want to map the returned array to a Java
collection class, then you must write a custom deserializer that does
so. You also must define a client config file that tells Axis to use
your custom deserializer.


How would I write this custom deserializer? All the information I've  
seen on the website - and the articles James Black linked to - seem  
to be talking about registering new types: i.e., a "java.foo.Blah <->  
Blah". I want to change how XSD x[] to map to Java List rather  
than Java x[], for all x.


Once I do that, I'll look into more sophisticated collections: Maps,  
Sets. I don't know if that's possible, but I'd like to try.


Scott

--
Scott Lamb <http://www.slamb.org/>



Re: Collections classes?

2005-07-03 Thread Scott Lamb

On 3 Jul 2005, at 19:09, James Black wrote:



Scott Lamb wrote:



I still do not understand. Why can't I serialize a List with exactly
the same XML representation as an array? And deserialize it back to a
List? Why does the other side have to know anything about this?




 A list has other attributes besides an array, as it has to know
something about order and relationships between items.



This is nonsense. I don't know the intricacies of SOAP or Axis, but I  
know what arrays and lists are.


A list is an ordered collection of items.

An array is an indexed collection of items. Indexed implies ordered.  
Thus, an array is a specialization of list. (In Java, there is an  
ArrayList class. A list represented in memory by an array. It  
supports the exact same operations as LinkedList; the only difference  
is the complexity of some operations. I.e., get(int n) is O(1)  
instead of O(n).)


Their serialization is the same; you'd write an array in order of  
ascending indexes.


--
Scott Lamb <http://www.slamb.org/>




Re: Collections classes?

2005-07-03 Thread Scott Lamb

On 3 Jul 2005, at 01:30, James Black wrote:


--Since SOAP was written to work with a large number of languages, it
has to be able to work with a common denominator, what can all of  
these

languages work with.


I still do not understand. Why can't I serialize a List with exactly  
the same XML representation as an array? And deserialize it back to a  
List? Why does the other side have to know anything about this?


  C does not easily know how to deal with some of the collection  
types.


How is that relevant?


  You can look at http://docs.pushtotest.com/axisdocs/user-guide.html
for some information on writing a custom serializer/deserializer, then
you can get your server and client to send collections across,  
perhaps.


Forget the other side of the transaction. I want to make an isolated  
change.


These links you gave me seem focused on registering a new type and  
providing a way to serialize/deserialize it. I want to change how  
arrays are serialized.


--
Scott Lamb <http://www.slamb.org/>



Re: Collections classes?

2005-07-03 Thread Scott Lamb

On 2 Jul 2005, at 21:28, James Black wrote:

How can I get Axis to use the Java Collections classes? I see in
1.2.1's "What's in this release" section that it says "Automatic two-
way conversions between Java Collections and SOAP Arrays". I  
don't  see

any details, though. How do I use this?

Specifically, I'm playing with GoogleSearch.wsdl. The
GoogleSearchResult class AXIS has getResultElements() and
setResultElements() methods that deal with plain Java arrays -
ResultElement[]. I'd prefer collections objects like List or (for   
Java

1.5) List.

Is this what this snippet is describing? If not, what does it  
mean?  And

is there any way to do what I want?



  What benefits would you get by sending the extra data that a
collection would require?


I'm not proposing a change to the WSDL or to what is sent over the wire.


  If you send it as an array, and then the client can decide which way
to use the data, so if a hashmap would make sense for the client,  
it can

be stored that way, but, not all clients have collection apis. For
example, if you use gsoap and a C client, you would need to use  
arrays.


I'm asking if there's a way I can influence the Java representations  
of SOAP data - both Java types fed into axis and Java types returned  
from it.


Can I get a List (an ArrayList, perhaps) out of axis rather  
than a Foo[]? And a Map rather than a KeyValueBean[] or  
whatever?


Since you bring up other language implementations, how about SOAPpy:  
It can deal with Python dictionaries natively. Can Axis do that? If  
not, why is it possible for SOAPpy and not Axis?



  It is trivial to insert the array into a collection, and is simpler
and more interoperative to transfer arrays of items around than to try
to pass collections.


It's not as trivial when you have an entire graph of these objects to  
deal with. It's certainly possible, but I don't understand why Axis  
can't just give me what I want rather than requiring me to construct  
an entirely new object graph and then discard then one that it gave me.


--
Scott Lamb <http://www.slamb.org/>



Collections classes?

2005-07-02 Thread Scott Lamb
How can I get Axis to use the Java Collections classes? I see in  
1.2.1's "What's in this release" section that it says "Automatic two- 
way conversions between Java Collections and SOAP Arrays". I don't  
see any details, though. How do I use this?


Specifically, I'm playing with GoogleSearch.wsdl. The  
GoogleSearchResult class AXIS has getResultElements() and  
setResultElements() methods that deal with plain Java arrays -  
ResultElement[]. I'd prefer collections objects like List or (for  
Java 1.5) List.


Is this what this snippet is describing? If not, what does it mean?  
And is there any way to do what I want?


Thanks,
Scott

--
Scott Lamb <http://www.slamb.org/>