Re: Simple question....
Dan, Here are also simple questions, not particularly aimed at you: Why would your service be responsible for what the subscriber does to handle the responses? If the interface is fully specified by the wsdl then the client will be able to consume it. What, specifically, are you doing that you need to concern yourself with client-side handlers? I'm not being a smartie here. I see a lot of posts similar to yours and I wonder why: 1) the provider wants to be responsible for the subscriber - frankly I'd love it if our enterprise IT even *thought* about providing usable client code. I will absolutely settle for a wsdl which doesn't make me hand-code parsers for every string-wrapped xml document. 2) so many services don't seem to be designed as services - it's as if the cart is driving the horse, as in we already have the application/interfaces/classes that we'd like to expose as a web service . . . 3) SOAP is decided as the solution when the problem hasn't been analyzed Elaine Dan O'Neill wrote: I'm tired trying to get them to work. Do Client-side service-specific handlers work? If you put them in client-config.wsdd? I know that if I change them to global they work? I've got some working by using setClientHandlers() in the client code but I don't always have the luxury of changing people's java client? ~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- ~~
Re: [Axis] Questions about linux edition
I'm running Axis 1.1 (stable release) on Mandrake 9.2 with JDK 1.4.2_06. Working out of an old Gateway box on a PIII 800 Mhz w/only 384 Mb RAM. Tomcat 5.0.28. No problems with it as a test machine. Connected with our Oracle server using the Oracle JDBC thin clients and ran some pretty rigorous tests of a remote web service. (1) separates the test box from my Windows workstation (2) performance using NetBeans as IDE is only a little slower than on Windows with a P4 1.5Ghz (3) stable, stable, stable. (4) very easy to work from the command line and see everything going on (5) If something goes wrong the whole system doesn't have to be rebuilt. My Win2k workstation was recently rebuilt, took our network tech several days. It *still* is apparently no longer compatible with the latest Symantec Corp AV client (for some unknown reason), and can't use the latest NetWare client (reason also unknown). NEVER have those kind of problems with Mandrake, unless using Mandrake Move. ; HTH, Elaine Yu Jie wrote: Hi all, I'm a beginner of Apache Axis, I want to install Axis on two linux platform: mandrake and MontaVista. Is anybody try it? Does Axis can running properly on these two platform? Thanks. Yours Yu Jie [EMAIL PROTECTED] __ Do you Yahoo!? Make Yahoo! your home page http://www.yahoo.com/r/hs -- ~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- ~~
Re: Array of objects
Link reports Document has no data Dino Chiesa wrote: http://dinoch.dyndns.org:7070/axis1.2/AboutArrays2.jsp -Original Message- From: bohldan bohldan [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:37 AM To: axis-user@ws.apache.org Subject: Array of objects Hi I think ive tried everything and i searched for a while now on how i send an array of object. If someone has something that works can that someone be nice to give me an example of the client, wsdd file. This is how my code look like.. client --- String endpointURL = http://localhost:8080/axis/services/GlazeService;; Service service = new Service(); Call call = (Call) service.createCall(); QName qn = new QName( urn:GlazeService, User ); call.setOperationName(ldap_GetAllUsernames); call.setTargetEndpointAddress( new java.net.URL(endpointURL) ); call.registerTypeMapping( User.class, qn, new org.apache.axis.encoding.ser.BeanSerializerFactory(User.class, qn), new org.apache.axis.encoding.ser.BeanDeserializerFactory(User.class,qn)); User[] tomte = (User[])call.invoke(new Object [] {}); System.out.println(Size: + tomte.length); for(int i = 0; i tomte.length; i++){ System.out.println(tomte[i].getGecos()); } wsdd file --- deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; xmlns:glaze=urn:GlazeService.Service service name=GlazeService provider=java:RPC parameter name=className value=GlazeService.Service/ parameter name=allowedMethods value=*/ beanMapping languageSpecificType=java:GlazeService.Service qname=ns1:User xmlns:ns1=urn:GlazeService/ typeMapping qname=glaze:ArrayOfUser type=java:GlazeService.User[] serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; xmlns:glaze=urn:GlazeService/ /service /deployment _ Hitta rätt på nätet med MSN Sök http://search.msn.se/ -- ~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- ~~
Another basic question: faults best practices
TIA for your kind response: This is related to trying to get an improved wsdl. The situation is this: Trying to program to a service with well-formed in messages and not so swell out messages. This question probably implies other questions as well. Many of the out messages (responses) may contain an errors element. However, since ALL out messages are defined as strings, there is no type definition for the errors element which may be contained in the xml document stuffed into a string. Should errors be returned as SOAP faults? If not, why not? All input appreciated, Elaine ~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- ~~
Re: wsdl/soap question
Thanks again. I am studying the XML primer now. My first forays into SOAP-land were using the MS SOAP toolkit 3 and VB 6. Some of the stuff works and some not. MS never corrected some of the known bugs between 2 and 3. Fortunately for me I am comfortable with sockets and the Win32 API in VB, so . . . However, we are moving toward a Java environment, so this has also been my learning environment for Java. Steep, steep curves. BUT, a well-formed wsdl and WSDL2Java are so, so easy. I was testing against a decent external service and studied the code and built the tests, logged everything, no problem. This service which returns a string for EVERYTHING -- PROBLEMS everywhere. Some of the returns are simple strings, some delimited strings, but most are XML documents as String. Horrid, horrid. Especially because the WSDL is subject to change. Our best hope for positive change is to present the managing group with a correct wsdl and say, Please program to this for these reasons. Anne Thomas Manes wrote: Elaine, No need to apologize. XML Schema is a very complex subject, and lots of people get confused. In fact, someone sent me a note off list thanking me for answering your questions. When learning schema, I suggest you start with the Primer: http://www.w3.org/TR/xmlschema-0/. Also, XML Schema has been updated since the document you referenced. The two current specifications are at http://www.w3.org/TR/xmlschema-1/ and http://www.w3.org/TR/xmlschema-2/. I also suggest reading Namespaces in XML: http://www.w3.org/TR/xml-names11/. I also recommend reading some of the various vendor documentation. I particularly like Systinet's documentation. They have a really nice web services primer: http://www.systinet.com/doc/ssj-55/primerj/index.html Plus there are tons of articles available at IBM's developerWorks and various web services community pages that can help you learn your way around. And, as far as your secnd question goes, putting extraneous namespace declarations in a document isn't a bad thing, except that it makes the document just that much bigger. Most SOAP toolkits automatically stuff every WSDL document with a bunch of standard namespace declarations, even if they aren't used. Anne [snipped previous posts] ~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- ~~
wsdl/soap question
TIA for considering these questions. I am working through the note at !--http://www.w3.org/TR/2001/NOTE-wsdl-20010315--, but mapping it to my understanding of what I'm seeing gives rise to questions (and frustrations). 1) How does a wsdl indicate that headers are required? 2) Fragment of existing wsdl which appears to be incorrect: s:element name=AdminAuthHeader type=s0:AdminAuthHeader/ s:complexType name=AdminAuthHeader s:sequence s:element maxOccurs=1 minOccurs=0 name=sAdminLogin type=s:string/ s:element maxOccurs=1 minOccurs=0 name=sPassword type=s:string/ s:element maxOccurs=1 minOccurs=1 name=nExSysID type=s:int/ s:element maxOccurs=1 minOccurs=1 name=nMajorVersion type=s:int/ s:element maxOccurs=1 minOccurs=1 name=nMinorVersion type=s:int/ /s:sequence /s:complexType a) Shouldn't this have an end /s:element tag and not have the / in the leading element tag before the s:complexType tag? b) Shouldn't minOccurs=1 indicate a required parameter? 3) Fragment of existing wsdl: definitions targetNamespace=http://yyy.ourname.xxx/webservices/; xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:s=http://www.w3.org/2001/XMLSchema; xmlns:s0=http://yyy.ourname.xxx/webservices/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:tm=http://microsoft.com/wsdl/mime/textMatching/; a) Wouldn't it be better to import the additional namespaces using the import tag? b) Shouldn't the s namespace designated above be xsd and point to http://www.w3.org/2001/10/XMLSchema;? c) Shouldn't the soapenc namespace be SOAP-ENC? I've been told that wsdl is generated automatically, but if it is the tool seems inadequte. (NOT Axis!) Final question for this: 4) Am I on the right track with the wsdl? REALLY APPRECIATE the input, Elaine ~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- ~~
Re: Handmade WSDL?
Thank you so very much. I suspected something like this, especially after investigating a well-formed SOAP service (from Melissa Data) and working through the client code generated by WSDL2Java for it. I'm pretty new to all of this so I have to keep looking up everything. And it seems that everything I'm learning involves twelve other things to learn as well. ;) Gotta love it . . . Elaine Anne Thomas Manes wrote: Ah -- I see. This DataSet is coming from a .NET service (probably generated by ADO.NET), and then stuffed into the SOAP message as a string. Unfortunately, because the string starts with the ?xml declaration, you won't be able to get Axis to process it for you. You are going to have to extract the string and then process it using SAX or DOM. You need to go abuse the card processing folks. This is what's known as a worst practice. Anne ~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- ~~
Re: Handmade WSDL?
Well, I can contact the project manager and ask, but that would be effective only if I rewrite the WSDL first and include samples. The project manager is not a programmer. ITMT, which form of the changed WSDL below will be best? The responses which return xml documents (as strings) all seem to use the root element of NewDataSet /, which I think violates the WSDL specification for uniqueness. [?] I am currently reading the WSDL 1.1 W3C Note dated 15 March 2001, but the published wsdl doesn't seem to quite match with that, and this doc is definitely *not* WSDL 2.0 compliant. Really appreciate the input. :) I want to do this as well as possible. Thanks again, Elaine Dino Chiesa wrote: Not stupid... Your approach is reasonable, but... Can you not contact the card processing service people and ask them to resolve the difference between the doc and the WSDL ? -Original Message- From: Elaine Nance [mailto:[EMAIL PROTECTED] Sent: Monday, February 28, 2005 3:45 PM To: axis-user@ws.apache.org Subject: Handmade WSDL? Hope this is not stupid, but Problem: the wsdl for our (supposedly) enterprise credit card processing service shows well defined request parameters, but the SOAP responses are all designated as string, as shown below. I am thinking that the best way to generate the client stubs I need in Java is to create a wsdl with better response typing and generate the stubs using WSDL2Java and then test. Does it make sense to proceed like the above? or should I just build parsers using SAX or DOM or whatever? Thank you, Elaine - example request s:element name=GetAVSResponseCodeValue s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=sCode type=s:string / /s:sequence /s:complexType /s:element - example response as given s:element name=GetAVSResponseCodeValueResponse s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=GetAVSResponseCodeValueResult type=s:string / /s:sequence /s:complexType /s:element - WHAT THE RESPONSE SHOULD LOOK LIKE (I THINK) s:element name=GetAVSResponseCodeValueResponse s:complexType type=s:AVSRespCode s:sequence s:element minOccurs=1 maxOccurs=1 name=AVSCode type=s:string/ s:element minOccurs=1 maxOccurs=1 name=AVSMessage type=s:string/ s:element minOccurs=1 maxOccurs=1 name=ID type=s:string/ s:element minOccurs=1 maxOccurs=1 name=Status type=s:string/ /s:sequence /s:complexType /s:element - ALTERNATIVELY s:element name=GetAVSResponseCodeValueResponse s:complexType type=s:NewDataSet s:sequence type=s:AVSRespCode s:element minOccurs=1 maxOccurs=1 name=AVSCode type=s:string/ s:element minOccurs=1 maxOccurs=1 name=AVSMessage type=s:string/ s:element minOccurs=1 maxOccurs=1 name=ID type=s:string/ s:element minOccurs=1 maxOccurs=1 name=Status type=s:string/ /s:sequence /s:complexType /s:element - the web service docs indicate that the xml returned (minus SOAP envelope) will look like the following: NewDataSet AVSRespCode AVSCode1/AVSCode AVSMessageNo Address Supplied/AVSMessage ID1/ID StatusE/Status /AVSRespCode /NewDataSet ~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- ~~