Hey Bob,

Can you come up with a test case for the simple service I have below?

If you can fit it in to the test/wsdl structure, that would ensure this stuff doesn't 
break for you again.

--
Tom Jordahl
Macromedia Server Development



-----Original Message-----
From: Bob Cotton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 9:06 PM
To: [EMAIL PROTECTED]
Subject: Re: anyType support fixed


>>>>> "Glen" == Glen Daniels <[EMAIL PROTECTED]> writes:

    Glen> Wow.  I apparently missed that change.

    Glen> How could that possibly make any sense?  If you have a type
    Glen> which you are never going to be able to receive, what good
    Glen> does it do to put an "anyType" placeholder there?

We've registered a custom serializer for Locale. Although we don't
pass it as a parameter, we do have it inside other classes.

We just register the de/serializer in the wsdd. seems to work.

- Bob

    Glen> --Glen

    >> -----Original Message----- From: R J Scheuerle Jr
    >> [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002
    >> 6:18 PM To: [EMAIL PROTECTED] Subject: RE: anyType
    >> support fixed
    >>
    >>
    >>
    >> Yeah, you are missing something..
    >>
    >> If WSDL2Java (or ?WSDL) cannot convert a java class into a wsdl
    >> type, then a message is issued and an anyType is used instead
    >> in the wsdl document (need to use something).  This support has
    >> been there for a long time and was accidentally changed by my
    >> 12347 change today.  The WSDL2Java processing now works the
    >> same as it did before.
    >>
    >> Any change to this behavior should be addressed post 1.0.
    >>
    >> Rich Scheuerle IBM WebSphere & Axis Web Services Development
    >> 512-838-5115 (IBM TL 678-5115)
    >>
    >>
    >>
    >>
    >> Glen Daniels
    >>
    >> <gdaniels@macrome To: "'[EMAIL PROTECTED]'"
    >> <[EMAIL PROTECTED]>
    dia.com> cc:
    >>
    >> Subject: RE: anyType support fixed 09/26/2002 05:09
    >>
    >> PM
    >>
    >> Please respond to
    >>
    >> axis-dev
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >> WHOA!
    >>
    >> Why do we WANT anyType appearing anywhere for this?  IMO, we
    >> don't.
    >>
    >> If you have myop(Object obj), THAT should generate anyType,
    >> because we have a mapping for Object<->anyType in the registry.
    >> Then at runtime, we're free to do something like:
    >>
    >> if (obj instanceof SomeClassIHaveAMappingFor)...
    >>
    >> Just saying that any class we don't have a mapping for
    >> generates anyTypes if it appears in signatures will cause all
    >> kinds of headaches.  They should fail if there is no explicit
    >> mapping for the class in question, since as you say there's no
    >> way we could expect to serialize/deserialize them!!
    >>
    >> If I'm understanding what you're proposing here, I'm -1 to it.
    >> (am I missing something?)
    >>
    >> --Glen
    >>
    >> > -----Original Message----- From: Tom Jordahl
    >> > [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26,
    >> > 2002 5:59 PM To: '[EMAIL PROTECTED]' Subject: RE:
    >> > anyType support fixed
    >> >
    >> >
    >> >
    >> > Thanks Rich!  Verified that anyType comes out in the right
    >> > places for
    >> this service:
    >> >
    >> > public class MyService {
    >> >     public String myop(MyStruct in, java.util.Locale locin) {
    >> >         return "out";
    >> >     }
    >> > } public class MyStruct {
    >> >     public java.util.Locale loc; public String name;
    >> > }
    >> >
    >> >
    >> > I don't know how to make a test for this, which isn't so
    >> > important since this service will never work.
    >> >
    >> > Anyone have any thoughts on how we might get a service like
    >> this work?
    >> > -- Tom Jordahl Macromedia Server Development
    >> >
    >> >
    >> >
    >> > -----Original Message----- From: [EMAIL PROTECTED]
    >> > [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002
    >> > 5:52 PM To: [EMAIL PROTECTED] Subject: cvs commit:
    >> > xml-axis/java/src/org/apache/axis/wsdl/fromJava Emitter.java
    >> > Types.java
    >> >
    >> >
    >> > scheu 2002/09/26 14:52:13
    >> >
    >> >   Modified: java/src/org/apache/axis/wsdl/fromJava
    >> >   Emitter.java
    >> >                         Types.java
    >> >   Log: More changes per review of code by Tom and I.  this is
    >> >   all related to the 12347 bug fix.
    >> >
    >> >   Revision Changes Path
    >> > 1.65 +1 -1
    >> > xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java
    >> >
    >> >   Index: Emitter.java
    >> >
    >> ===================================================================
    >> >   RCS file:
    >> > /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emit
    >> > ter.java,v
    >> >   retrieving revision 1.64 retrieving revision 1.65 diff -u
    >> >   -r1.64 -r1.65
    >> > --- Emitter.java 26 Sep 2002 21:13:25 -0000
    >> 1.64
    >> > +++ Emitter.java 26 Sep 2002 21:52:12 -0000
    >> 1.65
    >> >   @@ -1088,7 +1088,7 @@
    >> >                QName typeQName =
    >> >                    types.writeTypeForPart(javaType,
    >> >                                           param.getTypeQName());
    >> > - types.writeElementForPart(javaType,
    >> > + QName elemQName = types.writeElementForPart(javaType,
    >> >                                          param.getTypeQName());
    >> >                if (typeQName != null) {
    >> >                    part.setName(param.getName());
    >> >
    >> >
    >> >
    >> > 1.63 +13 -7
    >> > xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java
    >> >
    >> >   Index: Types.java
    >> >
    >> ===================================================================
    >> >   RCS file:
    >> >
    >> /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java,v
    >> >   retrieving revision 1.62 retrieving revision 1.63 diff -u
    >> >   -r1.62 -r1.63
    >> > --- Types.java 26 Sep 2002 21:13:25 -0000
    >> 1.62
    >> > +++ Types.java 26 Sep 2002 21:52:13 -0000
    >> 1.63
    >> >   @@ -231,7 +231,9 @@
    >> > * @param type <code>Class</code> to generate the XML
    >> > Schema info for
    >> > * @param qname <code>QName</code> of the type.  If
    >> > null, qname is
    >> > * defaulted from the class.
    >> > - * @return the QName of the generated Schema type,
    >> null if void
    >> > + * @return the QName of the generated Schema type,
    >> > null if void,
    >> > + * if the Class type cannot be converted to a
    >> > schema type
    >> > + * then xsd:anytype is returned.
    >> >         */
    >> >        public QName writeTypeForPart(Class type, QName qname)
    >> > throws AxisFault {
    >> >            //patch by costin to fix an NPE; commented out
    >> > till we find out what the problem is
    >> >   @@ -265,8 +267,10 @@
    >> >                writeWsdlTypesElement();
    >> >            }
    >> >
    >> > - // write the type
    >> > - writeType(type, qname);
    >> > + // Write the type, if problems occur use ANYTYPE
    >> > + if (writeType(type, qname) == null) {
    >> > + qname = Constants.XSD_ANYTYPE;
    >> >   +        }
    >> >            return qname;
    >> >        }
    >> >
    >> >   @@ -318,8 +322,10 @@
    >> >                writeWsdlTypesElement();
    >> >            }
    >> >
    >> > - // Write Element
    >> > - writeTypeAsElement(type, qname);
    >> > + // Write Element, if problems occur return null.
    >> > + if (writeTypeAsElement(type, qname) == null) {
    >> > + qname = null;
    >> >   +        }
    >> >            return qname;
    >> >        }
    >> >
    >> >   @@ -380,7 +386,7 @@
    >> >        /**
    >> > * Create a schema element for the given type
    >> > * @param type the class type
    >> > - * @return the QName of the generated Element or null
    >> > if no element written
    >> > + * @return the QName of the generated Element or
    >> problems occur
    >> >         */
    >> >        private QName writeTypeAsElement(Class type, QName
    >> > qName) throws AxisFault {
    >> >            if (qName == null ||
    >> >   @@ -598,7 +604,7 @@
    >> >         *
    >> > * @param type Class for which to generate schema
    >> > * @param qName of the type to write
    >> > - * @return a prefixed string for the schema type
    >> > + * @return a prefixed string for the schema type or
    >> > null if problems occur
    >> >         */
    >> >        public String writeType(Class type, QName qName)
    >> > throws AxisFault {
    >> >            // Get a corresponding QName if one is not
    >> >            // provided
    >> >
    >> >
    >> >
    >> >
    >>
    >>
    >>
    >>

-- 
SynXis Corporation      | [EMAIL PROTECTED]    | no .sig today.
1610 Wynkoop, Suite 400 | Ph: (303)595-2511 | 
Denver, CO  80202       | Fax:(303)534-4257 | 

Reply via email to