Parameterized constructors through Axis?
Hi all! Simple question: Can I expose an object through an Axis Webservice with a paramerized constructor? I.e. something like this: public class MyObject { MyObject(String test) { // Constructor code goes here } } Thanks, ~Morten :-)
No serializer found
I'm in the process of writing a web service and have ran into the problem of sending custom objects. I have an object that contains nothing more then a few String[] and Datahandler[]. When calling invoke I get the error No serializer found... understandable.. in my client code I added the following... QName qname = new QName(urn:Service, MyClassName); call.registerTypeMapping(object.getClass(), qname, BeanSerializerFactory.class, BeanDeserializerFactory.class); But then I get.. No serializer found for class javax.activation.DataHandler error... Can anybody help me out or point me toward some examples for serializers? Thanks
Re: Minimal production environment for Axis application
you could look at Jetty--little more lightweight than Tomcat. -pc On Wed, 16 Feb 2005 10:21:28 +0300, Eugene Prokopiev [EMAIL PROTECTED] wrote: Hi, I need minimal production environment for Axis application. For org.apache.axis.transport.http.SimpleAxisServer I read in javadoc: This is not intended for production use. Its intended uses are for demos, debugging, and performance profiling. Tomcat is complex environment with many built-in features which is not suitable for me. What can I use?
RE: java.rmi.Remote Web Services and getInitParameter
Robert, I think your second option is the best route. I have used MessageContext to get a hold of my servlet's context and it works dandy. -Original Message- From: Robert Bateman [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 3:01 PM To: axis-user Subject: Re: java.rmi.Remote Web Services and getInitParameter Elaine, You are correct - a properties file would be easier to use. Unfortunately, I'm the contractor on the project and the employees are using the web.xml file with different configurations to process the same code thru their Testing, QA, Staging and Production environments. They have *lots* of code already written that reads info via the getInitParameter() call - so mine needs to match. THANKS for the thought though :) Bob On Tue, 2005-02-15 at 15:55, Elaine Nance wrote: It is easy to use a Whatever.properties file. Import java.util.Enumeration, java.util.Properties and java.util.ResourceBundle and use the methods from those. If your db is Oracle, otn has exact code samples in the Java samples. Works great. HTH, Elaine Robert Bateman wrote: I have a doc/lit based web service created by WSDL2Java that implements java.rmi.Remote. In my code, I have been asked to remove my hard coding of how I access our Data Bases services and to load init parameters to look that information up. I did a search of the list and found 1 thread from July of 2003 that talked about the getInitParameter() call. In that thread, the author appeared to implement ServiceLifecycle and get access to his context in the init() method. 2 questions: 1) Can I replace the reference to java.rmi.Remote in my code with javax.xml.rpc.server.ServiceLifecycle and use the init() method? I suspect not as my code is doc/lit, but I am no expert. 2) If I can't do the replacement, is the following code correct for accessing the init parameters? HttpServlet servletContext = (HttpServlet)MessageContext.getCurrentContext().getProperty(HTTPCons tants.MC_HTTP_SERVLET); String strStaging = servletContaxt.getInitParameter( MySQL_Staged_ACI ); I know that the MySQL_Staged_ACI parameter is defined correctly in my web.xml as I can load it's value from a JSP page and from a servlet I'm using as a reference template. Thanks for your time! Bob
RE: Parameterized constructors through Axis?
Yes, provided you implement a custom serializer for that object. Jai -Original Message- From: Morten Egelund Rasmussen [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 6:32 AM To: [EMAIL PROTECTED] Subject: Parameterized constructors through Axis? Hi all! Simple question: Can I expose an object through an Axis Webservice with a paramerized constructor? I.e. something like this: public class MyObject { MyObject(String test) { // Constructor code goes here } } Thanks, ~Morten :-)
RE: RE : problems invoking axis soap from an applet
The problem is that the Applet is trying to read (not write) the log level. We have to find a way to give it that knowledge. Doing a quick google. I found this page. http://www.geocities.com/dcblaha/articles/Soap/SoapSetup.htm It gives a recommendation on how to get Axis working in an applet. In particular If you want to use the client classes from an applet or bean on the client, then it is best to package it into a jar like the following. jar jarfile=${build.lib}/RackService.jar fileset dir=${build.classes} includes=server/netdbsoap/* / /jar Then also remember to add it to the object codebase=... in the jsp or html page. Also add all of the required axis client jars to the object tag, and to a place accessible to the client in the Tomcat directories. So your object tag should look something like this object classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93 height=300 width=450 param name=code value=com.yourCompany.YourApplet / param name=archive value=Sample.jar, axis.jar, jakarta-commons.jar, etc / !--[if !IE] -- object classid=java:com.yourCompany.YourApplet.class archive=Sample.jar, axis.jar, jakarta-commons.jar, etc height=300 width=450 /object !-- ![endif]-- /object This should solve your problem... -Original Message- From: Philip Baruc [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 7:39 PM To: [EMAIL PROTECTED] Subject: Re: RE : problems invoking axis soap from an applet Is there no alternative to signing the applet? Have there been any bugs posted on axis to take care of this problem? p --- Faucher, Christian [EMAIL PROTECTED] wrote: I am guessing you see this in applet log file. Axis (client) tries to write its log file. Since you are running in an applet, it tries to write on the client station. Since it is not possible to write to the local disk from an applet sandbox, then you get this exception. One way to prevent this is (maybe) to sign your applet. The user will then grant the right to the applet to write to the local disk. Unless there is a way to configure axis to NOT write to the local disk for logging? Christian Faucher -Message d'origine- De : Philip Baruc [mailto:[EMAIL PROTECTED] Envoyé : mardi, février 15, 2005 10:37 À : [EMAIL PROTECTED] Objet : problems invoking axis soap from an applet I've seen acouple of post similiar to this one. I'm trying to invoke axis soap from an applet and i keep getting this error. Caused by: java.security.AccessControlException: access denied \ (java.util.PropertyPermission org.apache.commons.discovery.log.level read) I've seen acouple of people posting the same problem. has there been a solution to this? pbaruc = --- Philip G. Baruc [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _ Ce message est confidentiel, à l'usage exclusif du destinataire ci-dessus et son contenu ne représente en aucun cas un engagement de la part de AXA, sauf en cas de stipulation expresse et par écrit de la part de AXA. Toute publication, utilisation ou diffusion, même partielle, doit être autorisée préalablement. Si vous n'êtes pas destinataire de ce message, merci d'en avertir immédiatement l'expéditeur. This e-mail message is confidential, for the exclusive use of the addressee and its contents shall not constitute a commitment by AXA, except as otherwise specifically provided in writing by AXA. Any unauthorized disclosure, use or dissemination, either whole or partial, is prohibited. If you are not the intended recipient of the message, please notify the sender immediately. = --- Philip G. Baruc [EMAIL PROTECTED] __ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com
Re: array of recursive beans (doc/literal style)
Thanks for the response Dino. I am using Axis rc1.2 nightly build from Feb 8th. I think you are right regarding desinging the interfaces.Its better to work on WSDL and schema before working on java code but I have all the java classes built. These are not new services. I have all these services for long time and everything was working great until I moved to doc/literal style. I was using rpc/encoded style before. I looked at the WSDL generated by Axis and it looked fine to me. May be somone can look at my WSDL and see where it is wrong. Two elements that need to look at are: complexType name="ArrayOf_tns1_ContainerBean" sequence element maxOccurs="unbounded" minOccurs="0" name="item" type="tns1:ContainerBean" / /sequence /complexType AND element name="getRootContainersResponse" complexType sequence element maxOccurs="unbounded" name="item" type="tns1:ContainerBean" / /sequence /complexType /element Both have the right definitions for array of beans. Looks like getRootContainerResponse defines namespace properly but not the ArrayOf_tns1_ContainerBean (look at the soap response file). Also, I am attaching the soap response. It looks like the problem is due to the namespace of each array element.Namespaces are defined properly for the top level elements arraybut for the recursive elements, namespace is empty. Any help is appreciated. Thanks Praveen - Original Message - From: Dino Chiesa To: [EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 11:59 AM Subject: RE: array of recursive beans (doc/literal style) Is this a v1.2 RC thing, or are you using AXIS v1.1? And, how are you designing the interface? There is a line of thinking that says, if you want interop, then start by designing the interface in a platform-independent manner. In other words, WSDL and W3C XML Schema. This applies whether you are using AXIS, .NET, or something else. Some people call this "contract first" or "schema-first design". Schema-first design is a hassle you don't need if you are doing like-to-like communications. So don't do it. AXIS-to-AXIS is easy. .NET-to-.NET is easy. Just define yourInterface in actual code (write your Java interface), specify some magic in the WSDD, and boom, you can connect. It's when you want to mix and match clients and servers thatthis approach falls down. Simple cases are ok, but nested arrays and structs don't work. In other words,starting with a .net server-side class and expecting the dynamically-generated WSDL to give good interop with an AXIS client, is wishful thinking. Likewise for the converse. or any other combination of unlike webservices stacks. It sounds like you started with a Java class, and you are using Java2WSDL on it. I would suggest that you start with the schema and WSDL, then generate the server-side Java interfaces and support classes with WSDL2Java. Then provide the server-side implementations. You may need adapters between the classes generated from the schema, and the existing application on the server side. Likewise, generate the .NET (client-side) proxies from the WSDL. -Dino MS From: Praveen Peddi [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 9:52 PMTo: [EMAIL PROTECTED]Subject: array of recursive beans (doc/literal style) I have a method getRootContainers that returns array of ContainerBean[]. Each ContainerBean has reference to an array of child ContainerBean[]. With Eugene's help I could make the array stuff work. the method sucessfully returns the array of COntainerBean[] and .NET reads it fine. But .NET client doesn't read them recursively. It only build the top level array fine but each ContainerBean has array of other ContainerBean. My service in wsdd looks as follows: service name="CMISOAPContainerService" provider="java:RPC" style="wrapped" use="literal" parameter name="allowedMethods" value="copyContainer createContainer deleteContainer getContainer getContainerIcon getContainerProperties getRootContainers getContainerObjects getContentObjectsForContainer getRootContainers moveContainer updateContainer createQueryContainer updateQueryContainer createTaxonomy"/ parameter name="scope" value="session"/ parameter name="className" value="com.contextmedia.ip.session.soap.CMISOAPContainerService"/ operation name="getRootContainers" qname="ns:getRootContainers" xmlns:ns="http://soap.session.ip.contextmedia.com" returnQName="ns:item" returnType="ns:ContainerBean[]" parameter name="depth" qname="ns:depth" type="xsd:int" mode="IN" / /operation typemapping languageSpecificType="java:com.contextmedia.ip.session.soap.ContainerBean[]" qname="soapenc:Array" deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
Security Issue
Hello, I'm looking for some guidance in the realm of security. I am in charge of creating some web services to be used by a PowerBuilder front end(changing this is not an option). What I've discovered is that PowerBuilder does not allow you to modify/add headers in any shape or form. So, adding in WS-Security compliant headers or some other form of authentication headers would require a lot more time than than desired(ie writing a custom soap lib). It does support HTTP-Basic authentication, but because of the way the user information is being stored it is not a feasible option, user info is being stored in client specific databases. I've come up with my own ideas, which include sending the authentication piece as part of the message. If anyone has any alternative ideas please let me know. Thanks, Joe Plautz
Re: Validating a document using WSDL?
Carsten, Do you want to share it? Please open a JIRA request for enchancement :) thanks, dims On Wed, 16 Feb 2005 14:18:25 +0100, Carsten Ziegeler [EMAIL PROTECTED] wrote: Carsten Ziegeler wrote: I'm searching for an easy way of validating an XML document against a WSDL file. This is in order to test if the document is a valid request for the service. Does Axis provide some classes/functionalitity I could use? Or is there something else I can do? I read somewhere that Axis currently doesn't valid ws against the wsdl if document style is used. Is this true? If someone is interested: I followed the suggestion from Dims and now use WSDL4J to create schema out of the wsdl file. This is then feed together with the incomming message into the XML parser and voila we have a validation. I noticed that Axis is not using the schema from the WSDL to validate. Is this planned? Carsten -- Carsten Ziegeler - Open Source Group, SN AG http://www.s-und-n.de http://www.osoco.org/weblogs/rael/ -- Davanum Srinivas - http://webservices.apache.org/~dims/
Re: array of recursive beans (doc/literal style)
Try changing your WSDL so there is no additional ArrayOd_tns1_ContainerBean type. Basically, the definition ofContainerBean: complexType name="ContainerBean" sequence . . . element maxOccurs="unbounded" name="item" type="tns1:ContainerBean"/ /sequence /complexType Not sure if this is valid though, it's just my guess. Eugene - Original Message - From: Praveen Peddi To: [EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 12:39p Subject: Re: array of recursive beans (doc/literal style) Thanks for the response Dino. I am using Axis rc1.2 nightly build from Feb 8th. I think you are right regarding desinging the interfaces.Its better to work on WSDL and schema before working on java code but I have all the java classes built. These are not new services. I have all these services for long time and everything was working great until I moved to doc/literal style. I was using rpc/encoded style before. I looked at the WSDL generated by Axis and it looked fine to me. May be somone can look at my WSDL and see where it is wrong. Two elements that need to look at are: complexType name="ArrayOf_tns1_ContainerBean" sequence element maxOccurs="unbounded" minOccurs="0" name="item" type="tns1:ContainerBean" / /sequence /complexType AND element name="getRootContainersResponse" complexType sequence element maxOccurs="unbounded" name="item" type="tns1:ContainerBean" / /sequence /complexType /element Both have the right definitions for array of beans. Looks like getRootContainerResponse defines namespace properly but not the ArrayOf_tns1_ContainerBean (look at the soap response file). Also, I am attaching the soap response. It looks like the problem is due to the namespace of each array element.Namespaces are defined properly for the top level elements arraybut for the recursive elements, namespace is empty. Any help is appreciated. Thanks Praveen - Original Message - From: Dino Chiesa To: [EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 11:59 AM Subject: RE: array of recursive beans (doc/literal style) Is this a v1.2 RC thing, or are you using AXIS v1.1? And, how are you designing the interface? There is a line of thinking that says, if you want interop, then start by designing the interface in a platform-independent manner. In other words, WSDL and W3C XML Schema. This applies whether you are using AXIS, .NET, or something else. Some people call this "contract first" or "schema-first design". Schema-first design is a hassle you don't need if you are doing like-to-like communications. So don't do it. AXIS-to-AXIS is easy. .NET-to-.NET is easy. Just define yourInterface in actual code (write your Java interface), specify some magic in the WSDD, and boom, you can connect. It's when you want to mix and match clients and servers thatthis approach falls down. Simple cases are ok, but nested arrays and structs don't work. In other words,starting with a .net server-side class and expecting the dynamically-generated WSDL to give good interop with an AXIS client, is wishful thinking. Likewise for the converse. or any other combination of unlike webservices stacks. It sounds like you started with a Java class, and you are using Java2WSDL on it. I would suggest that you start with the schema and WSDL, then generate the server-side Java interfaces and support classes with WSDL2Java. Then provide the server-side implementations. You may need adapters between the classes generated from the schema, and the existing application on the server side. Likewise, generate the .NET (client-side) proxies from the WSDL. -Dino MS From: Praveen Peddi [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 9:52 PMTo: [EMAIL PROTECTED]Subject: array of recursive beans (doc/literal style) I have a method getRootContainers that returns array of ContainerBean[]. Each ContainerBean has reference to an array of child ContainerBean[]. With Eugene's help I could make the array stuff work. the method sucessfully returns the array of COntainerBean[] and .NET reads it fine. But .NET client doesn't read them recursively. It only build the top level array fine but each ContainerBean has array of other ContainerBean. My service in wsdd looks as follows: service name="CMISOAPContainerService" provider="java:RPC" style="wrapped" use="literal" parameter name="allowedMethods" value="copyContainer createContainer deleteContainer getContainer getContainerIcon getContainerProperties getRootContainers
Re: Validating a document using WSDL?
Davanum Srinivas wrote: Carsten, Do you want to share it? Please open a JIRA request for enchancement :) Hmm, sure, I' not against sharing - but my solution currently runs outside of Axis and alters for example the incomming message in order to append the schema information etc. But I could open an enhancement request and outline the basic idea if that helps? Carsten -- Carsten Ziegeler - Open Source Group, SN AG http://www.s-und-n.de http://www.osoco.org/weblogs/rael/
Where are WSS4J Binaries?
Hi, I am looking forward to using WSS4J in my project but I don't knowwhere to find the binaries from http://ws.apache.org/ws-fx/wss4j/. Cansomeone please point me in the right direction! I know this is not the ideal mailing list but I hope someone can still help me out, pleeease! Many Thanks,Ryan. Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'
Re: array of recursive beans (doc/literal style)
I changed the wsdl. ContainerBean is now defined as (my changes are in blue): complexType name="ContainerBean"sequenceelement name="ID" nillable="true" type="xsd:string"/element name="accessPermissions" type="xsd:int"/element name="accountID" nillable="true" type="xsd:string"/element name="childContainers"complexTypesequenceelement maxOccurs="unbounded" name="item" type="tns1:ContainerBean"//sequence/complexType/elementelement name="creationDate" nillable="true" type="xsd:dateTime"/element name="deliveryPermissions" type="xsd:int"/element name="description" nillable="true" type="xsd:string"/element name="lastModifiedDate" nillable="true" type="xsd:dateTime"/element name="name" nillable="true" type="xsd:string"/element name="parentID" nillable="true" type="xsd:string"/element name="type" type="xsd:int"/element name="userID" nillable="true" type="xsd:string"//sequence/complexType I made my .NET client point to the modified WSDL. I still get the same error. My .NET client cant serialize the beans after top level. I didn't change the java code on server side though. All I did was changed WSDL manually and added this webreference on .NET side. Thx Praveen - Original Message - From: Eugene Shershnev To: [EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 1:08 PM Subject: Re: array of recursive beans (doc/literal style) Try changing your WSDL so there is no additional ArrayOd_tns1_ContainerBean type. Basically, the definition ofContainerBean: complexType name="ContainerBean" sequence . . . element maxOccurs="unbounded" name="item" type="tns1:ContainerBean"/ /sequence /complexType Not sure if this is valid though, it's just my guess. Eugene - Original Message - From: Praveen Peddi To: [EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 12:39p Subject: Re: array of recursive beans (doc/literal style) Thanks for the response Dino. I am using Axis rc1.2 nightly build from Feb 8th. I think you are right regarding desinging the interfaces.Its better to work on WSDL and schema before working on java code but I have all the java classes built. These are not new services. I have all these services for long time and everything was working great until I moved to doc/literal style. I was using rpc/encoded style before. I looked at the WSDL generated by Axis and it looked fine to me. May be somone can look at my WSDL and see where it is wrong. Two elements that need to look at are: complexType name="ArrayOf_tns1_ContainerBean" sequence element maxOccurs="unbounded" minOccurs="0" name="item" type="tns1:ContainerBean" / /sequence /complexType AND element name="getRootContainersResponse" complexType sequence element maxOccurs="unbounded" name="item" type="tns1:ContainerBean" / /sequence /complexType /element Both have the right definitions for array of beans. Looks like getRootContainerResponse defines namespace properly but not the ArrayOf_tns1_ContainerBean (look at the soap response file). Also, I am attaching the soap response. It looks like the problem is due to the namespace of each array element.Namespaces are defined properly for the top level elements arraybut for the recursive elements, namespace is empty. Any help is appreciated. Thanks Praveen - Original Message - From: Dino Chiesa To: [EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 11:59 AM Subject: RE: array of recursive beans (doc/literal style) Is this a v1.2 RC thing, or are you using AXIS v1.1? And, how are you designing the interface? There is a line of thinking that says, if you want interop, then start by designing the interface in a platform-independent manner. In other words, WSDL and W3C XML Schema. This applies whether you are using AXIS, .NET, or something else. Some people call this "contract first" or "schema-first design". Schema-first design is a hassle you don't need if you are doing like-to-like communications. So don't do it. AXIS-to-AXIS is easy. .NET-to-.NET is easy. Just define yourInterface in actual code (write your Java interface), specify some magic in the WSDD, and boom, you can connect. It's when you want to mix and match clients and servers thatthis approach falls down. Simple cases are ok, but nested arrays and structs don't work. In other words,starting with a .net server-side class and expecting the dynamically-generated
Re: forcing registration of serializer/deserializer for beans that do not appear directly as args
Do you know all the object types of 'Object o' at run-time ? If you do maybe you can use Java2WSDL with that more option : --extraClasses ? --- Sebastien On Wed, 16 Feb 2005 11:20:24 -0800, Tim K. (Gmane) [EMAIL PROTECTED] wrote: Hello, Using java2wsdl to generate the WSDL from java server side classes, how can I force the registration of a serializer/deserializer for a bean that does not appear directly in the method arguments, e.g.: public A foo(A a) where A is a bean which can contain another bean B and also a bean array B[] but it's not typed (e.g. it's defined as an Object): A { ... Object o; // At run-time this can be B, B[] or other things. ... } The problem is that at run-time the server complains that there is no deserializer for B which makes sense because java2wsdl has never seen B anywhere in the method signatures. The work-around so far has been to add a dummy method that has both B and B[] as arguments, but there's gotta be a nicer way to do it. Thank you for your help. -- Tim
Error generating WSDL with xsd:string attribute in AXIS 1.2RC2
Hi There! I have seen a couple of people with the same problem but there seems to be no answer so far: The problem relates to WSDL generation of deployed services in Axis 1.2RC2 . The error is: BEGIN AXIS error Sorry, something seems to have gone wrong... here are the details: Fault - Bean attribute ISIN is of type java.lang.String, which is not a simple type AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException faultSubcode: faultString: Bean attribute ISIN is of type java.lang.String, which is not a simple type faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:willo END -- The steps involved to reproduce the problem (I've done it around 132 times): 1.) run wsdl2java -s -t file.wsdl (wsdl file below) 2.) Compile and deploy service with adminclient deploy.wsdd 3.) List services (deployed service appears) 4.) Try to get wsdl of deployed service I changed the type ISIN above to xsd:int int he schema and no complains about ISIN anymore. It complained about CountryCode though, which is the next xsd:string attribute in the complexType. PLEASE HELP! Cheers Thomas Here is my WSDL file BEGIN ?xml version=1.0 encoding=UTF-8? wsdl:definitions name=Untitled targetNamespace=http://soap.xml.company.com/; xmlns:bhub=http://data.xml.company.com; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tns=http://soap.xml.company.com/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; wsdl:types xsd:schema attributeFormDefault=unqualified elementFormDefault=qualified targetNamespace=http://data.xml.company.com; xmlns=http://data.xml.company.com; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xsd:simpleType name=time xsd:restriction base=xsd:string xsd:pattern value=[a-zA-Z]{3}[ ][a-zA-Z]{3}[ ][0-9]{2}[ ][0-9]{2}[:][0-9]{2}[:][0-9]{2} [ ][a-zA-Z]{3}[ ][0-9]{4}/ /xsd:restriction /xsd:simpleType xsd:simpleType name=hour xsd:restriction base=xsd:string xsd:pattern value=[0-9]?[0-9][:][0-9]{2}[:][0-9]{2}/ /xsd:restriction /xsd:simpleType xsd:simpleType name=date xsd:restriction base=xsd:string xsd:pattern value=[0-3]?[0-9][\-][a-zA-Z]{3}[\-][0-9]{2}/ /xsd:restriction /xsd:simpleType xsd:simpleType name=boolean xsd:restriction base=xsd:string xsd:enumeration value=TRUE/ xsd:enumeration value=FALSE/ /xsd:restriction /xsd:simpleType xsd:simpleType name=clientType xsd:restriction base=xsd:string xsd:enumeration value=BROKERAGE/ xsd:enumeration value=TRADING/ /xsd:restriction /xsd:simpleType xsd:simpleType name=userType xsd:restriction base=xsd:string xsd:enumeration value=BROKER/ xsd:enumeration value=TRADER/ /xsd:restriction /xsd:simpleType xsd:simpleType name=productType xsd:restriction base=xsd:string xsd:enumeration value=FUTURE/ xsd:enumeration value=INDEX/ xsd:enumeration value=EQUITY/ /xsd:restriction /xsd:simpleType xsd:simpleType name=productTypeInt xsd:restriction base=xsd:int xsd:enumeration value=0/ xsd:enumeration value=1/ xsd:enumeration value=2/ /xsd:restriction /xsd:simpleType xsd:simpleType name=uuid xsd:restriction base=xsd:string xsd:pattern value=[_][a-zA-Z0-9\-_]{22}/ /xsd:restriction /xsd:simpleType !-- Elements -- xsd:element name=OTCxml type=OTCxml/ xsd:complexType name=OTCxml xsd:sequence xsd:sequence xsd:element minOccurs=0 name=Profile type=Profile/ xsd:sequence maxOccurs=unbounded minOccurs=0 xsd:element maxOccurs=unbounded minOccurs=0 name=Interest type=Interest/ xsd:element maxOccurs=unbounded minOccurs=0 name=Trade type=Trade/
Re: array of recursive beans (doc/literal style)
I don't really like the option 1. And I don't know how to go for option 2 :). I am trying to apply Eric's patch and see if it fixes my problem (assuming that this patch will be applied to Axis's cvs :) ). Praveen - Original Message - From: Dino Chiesa To: [EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 5:06 PM Subject: RE: array of recursive beans (doc/literal style) yes, our most recent messages crossed in the ether. From: Praveen Peddi [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 2:34 PMTo: [EMAIL PROTECTED]Subject: Re: array of recursive beans (doc/literal style) The main problem seems to be in the axis response anyway. So I am not sure if changing the WSDL would fix the problem on .NET side.Axis response has a blank namespace for the second level elements (see the green text and red text. I think they both should have similar attributes and namespaces). thats what I have to fix I think. But how do I fix is the question. soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"soapenv:BodygetRootContainersResponse xmlns="http://soap.session.ip.contextmedia.com"item xsi:type="ns1:ContainerBean" xmlns:ns1="http://soap.session.ip.contextmedia.com"ID9C5B3C608B5D151B6F87E368CC8AF182/IDaccessPermissions7/accessPermissionsaccountID7F1CB4C5C87072FA8D6C21133A642EAB/accountIDchildContainersitem xmlns=""ID163C42F9BC87CB1CEBC14C0A45820DED/IDaccessPermissions7/accessPermissionsaccountID7F1CB4C5C87072FA8D6C21133A642EAB/accountIDchildContainers xsi:nil="true"/creationDate2005-02-09T17:21:44.000Z/creationDatedeliveryPermissions0/deliveryPermissionsdescription/lastModifiedDate2005-02-09T17:21:44.000Z/lastModifiedDatenametest/nameparentID9C5B3C608B5D151B6F87E368CC8AF182/parentIDtype4/typeuserID8E89C8D2583DCB99812FC94FDE15AFE1/userID/item/childContainerscreationDate2005-01-27T21:21:33.000Z/creationDatedeliveryPermissions0/deliveryPermissionsdescription/lastModifiedDate2005-02-08T22:18:03.000Z/lastModifiedDatenameMy Content/nameparentID xsi:nil="true"/type1/typeuserID8E89C8D2583DCB99812FC94FDE15AFE1/userID/itemitem xsi:type="ns3:ContainerBean" xmlns:ns3="http://soap.session.ip.contextmedia.com"ID829E600249C07064F73569782FF801EC/IDaccessPermissions7/accessPermissionsaccountID7F1CB4C5C87072FA8D6C21133A642EAB/accountIDchildContainersitem xmlns=""IDF142D17B950A2A70E0DF6E777B8D39D4/IDaccessPermissions7/accessPermissionsaccountID7F1CB4C5C87072FA8D6C21133A642EAB/accountIDchildContainers/creationDate2005-01-27T21:24:18.000Z/creationDatedeliveryPermissions0/deliveryPermissionsdescription/lastModifiedDate2005-01-27T21:24:18.000Z/lastModifiedDatename2/nameparentID829E600249C07064F73569782FF801EC/parentIDtype4/typeuserID xsi:nil="true"//item/childContainerscreationDate2005-01-27T21:21:29.000Z/creationDatedeliveryPermissions0/deliveryPermissionsdescription/lastModifiedDate2005-01-27T21:38:41.000Z/lastModifiedDatenameEnterprise Library/nameparentID xsi:nil="true"/type1/typeuserID xsi:nil="true"//item/getRootContainersResponse/soapenv:Body/soapenv:Envelope - Original Message - From: Praveen Peddi To: [EMAIL PROTECTED] ; Eugene Shershnev Sent: Wednesday, February 16, 2005 2:20 PM Subject: Re: array of recursive beans (doc/literal style) I changed the wsdl. ContainerBean is now defined as (my changes are in blue): complexType name="ContainerBean"sequenceelement name="ID" nillable="true" type="xsd:string"/element name="accessPermissions" type="xsd:int"/element name="accountID" nillable="true" type="xsd:string"/element name="childContainers"complexTypesequenceelement maxOccurs="unbounded" name="item" type="tns1:ContainerBean"//sequence/complexType/elementelement name="creationDate" nillable="true" type="xsd:dateTime"/element name="deliveryPermissions" type="xsd:int"/element name="description" nillable="true" type="xsd:string"/element name="lastModifiedDate" nillable="true" type="xsd:dateTime"/element name="name" nillable="true" type="xsd:string"/element name="parentID" nillable="true" type="xsd:string"/element name="type" type="xsd:int"/element name="userID" nillable="true" type="xsd:string"//sequence/complexType I made my .NET client point to the modified WSDL. I still get the same error. My .NET client cant serialize the beans after top level. I didn't change the java code on server side though. All I did was changed WSDL manually and added this webreference on .NET side. Thx Praveen - Original Message - From: Eugene Shershnev To: [EMAIL PROTECTED] Sent: Wednesday, February 16,
apache AXIS session timeout
Hey there, I'm looking for a solution to the following problem. I'm trying to develop a rather simple Webservice with Axis 1_1 and want to use axis's built-in session-support. When a user logs in (e.g calls login method) user will be marked as online, so that user of the same webservice may see that that user logged in. problem iss, if the session exceeds (eg times out) the system has to realize that this user is gone. simply: i need a way to recogniz that an Axis session has timed out, any hints, or docs??? Thanks, moritz
Re: Memory Leak on server side
By the way, thanks for this advice about upgrading xerces. My performance increased dramatically. (An operation that was previously talking 5 or 10 minutes now only takes 12 seconds.) Suprisingly, I had to replace xerces not only in my on web application, but also in the tomcat/common/endorsed directory. I guess the class loader looks in the endorsed directory before looking at your own web application's jar files? Have to study up on that. Bill Peter Molettiere wrote: Try these, in this order: 0) Use the latest axis distro 1) Use xerces 2.6.2 2) Up your heap size: -Xmx768M -Xms128M -XX:+UseConcMarkSweepGC Then go look at the axis mailing list and read the last few days of discussion about memory leaks versus severe memory use. --Peter On Jan 18, 2005, at 6:01 AM, Suzy Fynes wrote: Only the one application running on tomcat but deploying would happen every week. I was restarting axis from tomcat manager a bit last week that was causing axis to run out memory. But the application and WS stuff was running fine for the last few days then the out of memory error occurred today. -Original Message- From: Paul Callahan [mailto:[EMAIL PROTECTED] Sent: 18 January 2005 13:12 To: [EMAIL PROTECTED] Subject: Re: Memory Leap on server side Do you have multiple applications running on that instance of Tomcat, and if so, are you deploying the WAR files frequently? Like I mentioned last week, there is a mem leak in Tomcat when deploying over and over that will cause OutOfMemoryError's... Otherwise, is it happening after the application is running successfully for a while? -pc On Tue, 18 Jan 2005 10:53:56 -, Suzy Fynes [EMAIL PROTECTED] wrote: Hi, It seems that the axis running on my server is causing a memory leak which causes the whole application to slow and some of it to show internal errors. Tomcat logs indicated java.lang.OutOfMemoryError java.lang.OutOfMemoryError java.lang.OutOfMemoryError java.lang.OutOfMemoryError java.lang.OutOfMemoryError Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. ___ _ ___ I've seen some posts here that help solve the problem on the client side In client-side stub code, look for the call object and try: Call.getMessageContext().getRequestMessage().getSOAPEnvelope().getRecor d er().clear(); If I'm not running the client is there anyway to stop the leak? Thanks Suzy -- Peter Molettiere Senior Engineer Truereq, Inc. http://www.truereq.com/
Re: Doubt on AXIS Handlers
Wow, mail transport... the world's slowest RPC? :-) And if that is still too fast, try: org.apache.axis.transport.postalmail Bill [EMAIL PROTECTED] wrote: Hi Kumar, Other than the HTTP Transport, Axis also provides a JMS Transport and a Mail Transport. See the following packages for details: org.apache.axis.transport.mail org.apache.axis.transport.jms So instead of communicating SOAP over HTTP, you would communicate SOAP over JMS or SMTP/POP3. Al --- |wsabi4axis: http://demo.wsabi.org| --- Quoting babloosony [EMAIL PROTECTED]: Hi, What exactly is a transport handler in AXIS and can anyone please give one real world example of when shall we go for implementing our own transport handlers in AXIS ? Thanks Regards, Kumar.
Re: serializer for Laszlo
xsd:sequence dictates the order of the elements whereas xsd:all child elements can be any order. But I think everyone uses xsd:sequence, although the receiver of messages may be forgiving if the elements are illegally out of order. http://www.w3schools.com/schema/schema_elements_ref.asp Tom Klaasen wrote: Hi all, We're looking at using openlaszlo (http://www.openlaszlo.org) in combination with an Axis SOAP server. One of the problems we encounter, is that Laszlo doesn't seem to understand xsd:sequence tags. In this context, a lot of questions come to my mind: (1) what's the difference between xsd:all and xsd:sequence? Are they interchangeable? (2) can we configure axis to generate xsd:all instead of xsd:sequence tags? (3) if not, can we write our own serializer that would do that? I've been through the archives, and all that I could find about this problem was http://article.gmane.org/gmane.comp.apache.webservices.axis.user/25464 (I'm pretty new to Axis and SOAP, and I'm having trouble seeing the trees through the forest. Any pointers that can help me, would be appreciated.) Thanks, tomK
Deploy problems - any thoughts please
I get a SOAP fault when trying to deploy wsdd with AdminClient. No clue why this is happening. I have the classes on my CLASSPATH. Appriciate any help. Details below. Thanks, Samisa... Processing file ca/deploy.wsdd Exception: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.reflect.InvocationTargetException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.reflect.InvocationTargetException faultActor: faultNode: faultDetail: java.lang.reflect.InvocationTargetException at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:223) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:130) at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1053) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:218) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:568) at org.apache.axis.Message.getSOAPEnvelope(Message.java:427) at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:701) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:93) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:144) at org.apache.axis.client.Call.invokeEngine(Call.java:2688) at org.apache.axis.client.Call.invoke(Call.java:2671) __ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250
RE: array of recursive beans (doc/literal style)
Hm I don't really know what the problem is, then. I started with the WSDL you sent me, and removed the weird, redundant ArrayOf_tns1_ContainerBean type, and introduced a new named complexType in its place. Like so: element name="getRootContainersResponse" type="tns1:ArrayOfContainerBean" / complexType name="ArrayOfContainerBean" sequence element maxOccurs="unbounded" name="item" type="tns1:ContainerBean"/ /sequence /complexType and then of course the ContainerBean itself specified the type of the childContainers elementto be the ArrayOfContainerBean complexType. ya follow me? Then I did the wsdl2Java --server-side dance, not using --noWrapped, and provided an implementation of the service that generates random data, which is important because you are sending xsd:date and .NET doesn't like nil Dates. Whoops ! no ArrayOfContainerBean.java is generated. Using --noWrapped, it is? So in the end I ran wsdl2Java twice, first with noWrapped, then without, and got the required classes to be generated. After taking that brief detour, I deployed the service to Jetty, using the generated deploy.wsdd. I also built a simple .NET client that calls the getRootContainers() method. I get back an array of ContainerBeans and each ContainerBean has a child array of ContainerBeans. It works for me. I am using your wsdl and schema, modified as above. I can send you any of these files or a zip of all of them. I tried it with AXIS v1.1 first, which I have had good success with. It worked. Then I tried it with AXIS 1.2RC2. I expected this to not work because you all are saying that arrays are broken in v1.2RC2. It necessitated lots of changes to my makefile due to changes in the names of generated classes.?? also the weirdness withfailing to generate the ArrayOfContainerBean. But in the end it worked. In both cases the client was .NET v1.1. I double-checked the axis jars in the jetty webapp, they are from Nov 16 2004, whiich I guess is the release date of v1.2RC2.so it really is working. I did not apply Eric's patch. I don't even know what Eric's patch is. Just for grins I generated a .NET server-side implementation, too. The same client works with both the AXIS server and the .NET server. Just change the URL. There's no difference. Except the .NET version is faster and better looking. ;) "WSDL first,a good idea. (tm)" From: Praveen Peddi [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 5:43 PMTo: [EMAIL PROTECTED]Subject: Re: array of recursive beans (doc/literal style) I don't really like the option 1. And I don't know how to go for option 2 :). I am trying to apply Eric's patch and see if it fixes my problem (assuming that this patch will be applied to Axis's cvs :) ). Praveen - Original Message - From: Dino Chiesa To: [EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 5:06 PM Subject: RE: array of recursive beans (doc/literal style) yes, our most recent messages crossed in the ether. From: Praveen Peddi [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 2:34 PMTo: [EMAIL PROTECTED]Subject: Re: array of recursive beans (doc/literal style) The main problem seems to be in the axis response anyway. So I am not sure if changing the WSDL would fix the problem on .NET side.Axis response has a blank namespace for the second level elements (see the green text and red text. I think they both should have similar attributes and namespaces). thats what I have to fix I think. But how do I fix is the question. soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"soapenv:BodygetRootContainersResponse xmlns="http://soap.session.ip.contextmedia.com"item xsi:type="ns1:ContainerBean" xmlns:ns1="http://soap.session.ip.contextmedia.com"ID9C5B3C608B5D151B6F87E368CC8AF182/IDaccessPermissions7/accessPermissionsaccountID7F1CB4C5C87072FA8D6C21133A642EAB/accountIDchildContainersitem xmlns=""ID163C42F9BC87CB1CEBC14C0A45820DED/IDaccessPermissions7/accessPermissionsaccountID7F1CB4C5C87072FA8D6C21133A642EAB/accountIDchildContainers xsi:nil="true"/creationDate2005-02-09T17:21:44.000Z/creationDatedeliveryPermissions0/deliveryPermissionsdescription/lastModifiedDate2005-02-09T17:21:44.000Z/lastModifiedDatenametest/nameparentID9C5B3C608B5D151B6F87E368CC8AF182/parentIDtype4/typeuserID8E89C8D2583DCB99812FC94FDE15AFE1/userID/item/childContainerscreationDate2005-01-27T21:21:33.000Z/creationDatedeliveryPermissions0/deliveryPermissionsdescription/lastModifiedDate2005-02-08T22:18:03.000Z/lastModifiedDatenameMy Content/nameparentID xsi:nil="true"/type1/typeuserID8E89C8D2583DCB99812FC94FDE15AFE1/userID/itemitem xsi:type="ns3:ContainerBean"
Re: Where are WSS4J Binaries?
--- Ry. [EMAIL PROTECTED] wrote: Hi, I am looking forward to using WSS4J in my project but I don't know where to find the binaries from http://ws.apache.org/ws-fx/wss4j/. Can someone please point me in the right direction! I know this is not the ideal mailing list but I hope someone can still help me out, pleeease! Many Thanks, Ryan. - Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term' = KIBAYA ERISANIA Msc. Computer Science Hunan University, Yuelushan, Changsha, Hunan 410082 P.R China Tel:0086 731 8649349 Mob: 0086 13975103460 E-Mial: [EMAIL PROTECTED] http://www.ekibs.psend.com Sites of interest http://groups.yahoo.com/group/usac/ http://www.ugandaobserver.com __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail
RE: Where are WSS4J Binaries?
No binaries exist. Checkout from CVS and build. -Jon From: Ry. [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 2:07 PMTo: [EMAIL PROTECTED]Subject: Where are WSS4J Binaries? Hi, I am looking forward to using WSS4J in my project but I don't knowwhere to find the binaries from http://ws.apache.org/ws-fx/wss4j/. Cansomeone please point me in the right direction! I know this is not the ideal mailing list but I hope someone can still help me out, pleeease! Many Thanks,Ryan. Do you Yahoo!?Yahoo! Search presents - Jib Jab's 'Second Term' smime.p7s Description: S/MIME cryptographic signature
RE: rpc/literal vs document/literal, and returning a list of objects
I am not clear. Seems there are two issues, 1. SOAP encoding (blch!) vs Literal 2. wrapped or bare arrays Let's stay away from SOAPENC:arrayType since we all listen to WS-I. So, on issue #2, are you asking, does .NET expect arrays embedded in types to be serialized as[Example 1]: Container param1 foo/param1 wrapper param2bar/param2 param2blah/param2 ... /wrapper /Container or as [Example 2] Container param1 foo/param1 param2bar/param2 param2blah/param2 ... /Container ? The answer is, .NET can go either way. It takes its cue from the WSDL. If the WSDL uses a complexType to wrap an array, such as this: s:complexType name="Container" s:sequence s:element minOccurs="1" maxOccurs="1" name="param1" nillable="true" type="s:string" / s:element minOccurs="1" maxOccurs="1" name="wrapper" nillable="true" type="tns:ArrayOfString" / /s:sequence /s:complexType s:complexType name="ArrayOfString" s:sequence s:element minOccurs="0" maxOccurs="unbounded" name="param2" type="s:string" / /s:sequence /s:complexType ... then .NET will expect theXML on the wire to be "wrapped", as in [Example 1] above. If the WSDL does not use a complexType to wrap the array, but instead uses an element with maxOccurs != 1, like so: s:complexType name="Container" s:sequence s:element minOccurs="1" maxOccurs="1" name="param1" nillable="true" type="s:string" / s:element minOccurs="0" maxOccurs="unbounded" name="param2" type="s:string" / /s:sequence/s:complexType ...then .NET will expect XML on the wire that does not wrap the array in an element, such as in [Example 2] above. So you can do whatever. what format do people usually use? I guess it's a matter of style and taste. From the app programmer's perspective, the generated type on the .NET side behaves the same. It looks like this: public class Container { public string param1; public string[] param2; } The metadata attached to the type (in the form of inline code attributes)tells the .NET XML serializer whether to use a wrapper element or not. So the differences in on-the-wire serialization don't bubble up to the .NET programmer. Personally I find the use of "ArrayOfX" to be clunky in the WSDL and XSD. But it reads more nicely in the serialized XML, and so I generallyprefer it in complex schema. In simple schema, I don't care. -D From: Bill Keese [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 9:18 PMCc: [EMAIL PROTECTED]Subject: Re: rpc/literal vs document/literal, and returning a list of objects Dino - question for you. The checkin comment for ArraySerializer v1.5 is listed below. It implies that .NET *doesn't* want arrays serialized using the item tag. And yet, all the examples I've seen of .NET services indicate the opposite. Can you shed some light on this? And if your answer is ".NET clients support either case as long as the XML response obeys the WSDL file", then, what format do people usually use?ArraySerializer v1.5 checkin comment:Support serializing Arrays in "literal" fashion (a .NET-ism). We introduce an "isEncoded" flag on the MessageContext for now - this really wants to get set to the encoding state we're in at present, but I couldn't figure out how to coax that out of the serialization code yet. Let's say we have: class Bean { public String field1; public String [] field2; } if isEncoded is true (the default), we get XML that looks like: bean field1hi there/field1 field2 SOAPENC:arrayType="xsd:string[2]" item1/item item2/item /field2 /bean whereas if isEncoded is false, we now get: bean field1hi there/field1 field21/field2 field22/field2 /bean TODOs: 1) Figure out how to get encodingStyle for real 2) Implement deserializing from arrays encoded like this BillBill Keese wrote: Hi Dino,Nice to hear input from someone on the MS side. Anyway, yes, I think the array issue is specific to Axis v1.2, and it's documented in http://issues.apache.org/jira/browse/AXIS-1547The patch specified in the bug report seems to fix most people's array related problems. (It's not in CVS so you have to check out the Axis code and modify it yourself.)BillDino Chiesa wrote: Returning arrays from AXIS to .NET? Using AXIS v1.1 server, and .NET v1.1 - it works for me. Here's a working sample with code. http://dinoch.dyndns.org:7070/axis/AboutBasics.jsp I know this must be a repeat, but I looked in the archive and did not see it. . . Is the arrays issue specific to AXIS v1.2? -Original Message- From: Praveen Peddi [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 15, 2005 3:32 PM To: [EMAIL PROTECTED]; Anne Thomas Manes Subject: Re: rpc/literal vs document/literal, and returning a list of objects But what about the doc/literal issues related to returning array of beans. Wouldn't Dan hit the wall at some point. Atleast I hit the wall when I tried to move towards doc/literal. We were using
Re: Where are WSS4J Binaries?
You can get the snapshot at http://cvs.apache.org/snapshots/ws-fx/ On Wed, 16 Feb 2005 11:06:58 -0800 (PST), Ry. [EMAIL PROTECTED] wrote: Hi, I am looking forward to using WSS4J in my project but I don't know where to find the binaries from http://ws.apache.org/ws-fx/wss4j/. Can someone please point me in the right direction! I know this is not the ideal mailing list but I hope someone can still help me out, pleeease! Many Thanks, Ryan. Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'
Re: array of recursive beans (doc/literal style)
Hmm, it's mysterious. Praveen's problem was the item xmlns="" namespace bug, documented (with patch) here: http://marc.theaimsgroup.com/?l=axis-userm=109646648222389w=2 I don't know why it's working for Dino (but not Praveen) without that patch. Bill Dino Chiesa wrote: Hm I don't really know what the problem is, then. I started with the WSDL you sent me, and removed the weird, redundant ArrayOf_tns1_ContainerBean type, and introduced a new named complexType in its place. Like so: element name="getRootContainersResponse" type="tns1:ArrayOfContainerBean" / complexType name="ArrayOfContainerBean" sequence element maxOccurs="unbounded" name="item" type="tns1:ContainerBean"/ /sequence /complexType and then of course the ContainerBean itself specified the type of the childContainers elementto be the ArrayOfContainerBean complexType. ya follow me? Then I did the wsdl2Java --server-side dance, not using --noWrapped, and provided an implementation of the service that generates random data, which is important because you are sending xsd:date and .NET doesn't like nil Dates. Whoops ! no ArrayOfContainerBean.java is generated. Using --noWrapped, it is? So in the end I ran wsdl2Java twice, first with noWrapped, then without, and got the required classes to be generated. After taking that brief detour, I deployed the service to Jetty, using the generated deploy.wsdd. I also built a simple .NET client that calls the getRootContainers() method. I get back an array of ContainerBeans and each ContainerBean has a child array of ContainerBeans. It works for me. I am using your wsdl and schema, modified as above. I can send you any of these files or a zip of all of them. I tried it with AXIS v1.1 first, which I have had good success with. It worked. Then I tried it with AXIS 1.2RC2. I expected this to not work because you all are saying that arrays are broken in v1.2RC2. It necessitated lots of changes to my makefile due to changes in the names of generated classes.?? also the weirdness withfailing to generate the ArrayOfContainerBean. But in the end it worked. In both cases the client was .NET v1.1. I double-checked the axis jars in the jetty webapp, they are from Nov 16 2004, whiich I guess is the release date of v1.2RC2.so it really is working. I did not apply Eric's patch. I don't even know what Eric's patch is. Just for grins I generated a .NET server-side implementation, too. The same client works with both the AXIS server and the .NET server. Just change the URL. There's no difference. Except the .NET version is faster and better looking. ;) "WSDL first,a good idea. (tm)" From: Praveen Peddi [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 16, 2005 5:43 PM To: [EMAIL PROTECTED] Subject: Re: array of recursive beans (doc/literal style) I don't really like the option 1. And I don't know how to go for option 2 :). I am trying to apply Eric's patch and see if it fixes my problem (assuming that this patch will be applied to Axis's cvs :) ). Praveen - Original Message - From: Dino Chiesa To: [EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 5:06 PM Subject: RE: array of recursive beans (doc/literal style) yes, our most recent messages crossed in the ether. From: Praveen Peddi [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 16, 2005 2:34 PM To: [EMAIL PROTECTED] Subject: Re: array of recursive beans (doc/literal style) The main problem seems to be in the axis response anyway. So I am not sure if changing the WSDL would fix the problem on .NET side.Axis response has a blank namespace for the second level elements (see the green text and red text. I think they both should have similar attributes and namespaces). thats what I have to fix I think. But how do I fix is the question. soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" soapenv:Body getRootContainersResponse xmlns="http://soap.session.ip.contextmedia.com" item xsi:type="ns1:ContainerBean" xmlns:ns1="http://soap.session.ip.contextmedia.com" ID9C5B3C608B5D151B6F87E368CC8AF182/ID accessPermissions7/accessPermissions accountID7F1CB4C5C87072FA8D6C21133A642EAB/accountID childContainers item xmlns="" ID163C42F9BC87CB1CEBC14C0A45820DED/ID accessPermissions7/accessPermissions accountID7F1CB4C5C87072FA8D6C21133A642EAB/accountID childContainers xsi:nil="true"/ creationDate2005-02-09T17:21:44.000Z/creationDate deliveryPermissions0/deliveryPermissions description/ lastModifiedDate2005-02-09T17:21:44.000Z/lastModifiedDate nametest/name parentID9C5B3C608B5D151B6F87E368CC8AF182/parentID type4/type userID8E89C8D2583DCB99812FC94FDE15AFE1/userID /item /childContainers
Re: rpc/literal vs document/literal, and returning a list of objects
Wow, great answer. Thanks! I was actually just asking about issue #2, wrapped or bare arrays. I looked over the Axis code again and realized that in ArraySerializer.java version 1.31, the code I mentioned in my previous mail was corrected to output wrapped or bare arrays in concordance with the WSDL file. The problem is that there is still a bug when an operation returns an array directly, rather than a structure containing an array (ie, an operation like "Employee[] getEmployees()"). Bill Dino Chiesa wrote: I am not clear. Seems there are two issues, 1. SOAP encoding (blch!) vs Literal 2. wrapped or bare arrays Let's stay away from SOAPENC:arrayType since we all listen to WS-I. So, on issue #2, are you asking, does .NET expect arrays embedded in types to be serialized as[Example 1]: Container param1 foo/param1 wrapper param2bar/param2 param2blah/param2 ... /wrapper /Container or as [Example 2] Container param1 foo/param1 param2bar/param2 param2blah/param2 ... /Container ? The answer is, .NET can go either way. It takes its cue from the WSDL. If the WSDL uses a complexType to wrap an array, such as this: s:complexType name="Container" s:sequence s:element minOccurs="1" maxOccurs="1" name="param1" nillable="true" type="s:string" / s:element minOccurs="1" maxOccurs="1" name="wrapper" nillable="true" type="tns:ArrayOfString" / /s:sequence /s:complexType s:complexType name="ArrayOfString" s:sequence s:element minOccurs="0" maxOccurs="unbounded" name="param2" type="s:string" / /s:sequence /s:complexType ... then .NET will expect theXML on the wire to be "wrapped", as in [Example 1] above. If the WSDL does not use a complexType to wrap the array, but instead uses an element with maxOccurs != 1, like so: s:complexType name="Container" s:sequence s:element minOccurs="1" maxOccurs="1" name="param1" nillable="true" type="s:string" / s:element minOccurs="0" maxOccurs="unbounded" name="param2" type="s:string" / /s:sequence /s:complexType ...then .NET will expect XML on the wire that does not wrap the array in an element, such as in [Example 2] above. So you can do whatever. what format do people usually use? I guess it's a matter of style and taste. From the app programmer's perspective, the generated type on the .NET side behaves the same. It looks like this: public class Container { public string param1; public string[] param2; } The metadata attached to the type (in the form of inline code attributes)tells the .NET XML serializer whether to use a wrapper element or not. So the differences in on-the-wire serialization don't bubble up to the .NET programmer. Personally I find the use of "ArrayOfX" to be clunky in the WSDL and XSD. But it reads more nicely in the serialized XML, and so I generallyprefer it in complex schema. In simple schema, I don't care. -D From: Bill Keese [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 16, 2005 9:18 PM Cc: [EMAIL PROTECTED] Subject: Re: rpc/literal vs document/literal, and returning a list of objects Dino - question for you. The checkin comment for ArraySerializer v1.5 is listed below. It implies that .NET *doesn't* want arrays serialized using the item tag. And yet, all the examples I've seen of .NET services indicate the opposite. Can you shed some light on this? And if your answer is ".NET clients support either case as long as the XML response obeys the WSDL file", then, what format do people usually use? ArraySerializer v1.5 checkin comment: Support serializing Arrays in "literal" fashion (a .NET-ism). We introduce an "isEncoded" flag on the MessageContext for now - this really wants to get set to the encoding state we're in at present, but I couldn't figure out how to coax that out of the serialization code yet. Let's say we have: class Bean { public String field1; public String [] field2; } if isEncoded is true (the default), we get XML that looks like: bean field1hi there/field1 field2 SOAPENC:arrayType="xsd:string[2]" item1/item item2/item /field2 /bean whereas if isEncoded is false, we now get: bean field1hi there/field1 field21/field2 field22/field2 /bean TODOs: 1) Figure out how to get encodingStyle for real 2) Implement deserializing from arrays encoded like this Bill Bill Keese wrote: Hi Dino, Nice to hear input from someone on the MS side. Anyway, yes, I think the array issue is specific to Axis v1.2, and it's documented in http://issues.apache.org/jira/browse/AXIS-1547 The patch specified in the bug report seems to fix most people's array related problems. (It's not in CVS so you have to check out the Axis code and modify it yourself.) Bill Dino Chiesa wrote: Returning arrays from AXIS to .NET? Using AXIS v1.1 server, and .NET v1.1 - it
Re: serializer for Laszlo
On the client side, we're using only Laszlo elements. We specify the URL, and Laszlo is supposed to fetch the WSDL and handle all communication. This is described at http://www.laszlosystems.com/lps-2.2/docs/guide/rpc-soap.html However, if I'm not mistaken, Laszlo uses Axis internally to handle SOAP-requests. So the answer to your question is: no and yes ;-) tomK Paul Callahan wrote: are you accessing the service via an Axis-generated stub? just asking since im interested in your laszlo setup On Wed, 16 Feb 2005 15:31:42 +0100, Tom Klaasen [EMAIL PROTECTED] wrote: Hi all, We're looking at using openlaszlo (http://www.openlaszlo.org) in combination with an Axis SOAP server. One of the problems we encounter, is that Laszlo doesn't seem to understand xsd:sequence tags. In this context, a lot of questions come to my mind: (1) what's the difference between xsd:all and xsd:sequence? Are they interchangeable? (2) can we configure axis to generate xsd:all instead of xsd:sequence tags? (3) if not, can we write our own serializer that would do that? I've been through the archives, and all that I could find about this problem was http://article.gmane.org/gmane.comp.apache.webservices.axis.user/25464 (I'm pretty new to Axis and SOAP, and I'm having trouble seeing the trees through the forest. Any pointers that can help me, would be appreciated.) Thanks, tomK