Adding a dummy type didn't work for me

        <complexType name="DummyGenericType">
        <sequence>
            <element name="genType" type="tns:GenericType" minOccurs="1"
maxOccurs="1" />
        </sequence>
        </complexType>

        <simpleType name="GenericActionType">
                <restriction base="xsd:string">
                    <enumeration value="OPEN_SESSION" />
                    <enumeration value="CLOSE_SESSION" />
                    <enumeration value="COMMIT" />
                    <enumeration value="CANCEL" />
                </restriction>
            </simpleType>

This enumeration is already referenced in a complex type, do you think this
might be a problem?

            <complexType name="GenericTypeList">
                <complexContent>
                    <extension base="tns:ActionType">
                        <sequence>
                            <element name="genericTypes"
type="tns:GenericActionType" minOccurs="0" maxOccurs="unbounded" />
                        </sequence>
                    </extension>
                </complexContent>
            </complexType>

All the jaxb classes are in one package... any other thoughts?

On 9/28/07, Rao, Sameer V <[EMAIL PROTECTED]> wrote:
>
>  I mean is
>
> <simpletype name="GenericType" ....>
>         .....
>         <enumeration "OPEN" />
>         <enumeration "CLOSE" />
>         <enumeration "UNKNOW" />
> </simpleType
>
>
> If this is the enumeration and include it as a element member in another
> complexType
>
> <compleType name="DummyGenericType">
>     <sequence...>
>         <element name="genType" type="GenericType" minOccurs=1 maxOccurs=1
> />
>     </sequence...>
> <complexType>
>
> you need not refer/use this dummy complexType anywhere in ur WSDL etc...
>
>
> Also, are all the JAXB classes generate in one package? If not then try
> setting the SEARCH_PACKAGE properties to include the package name that has
> the enum class...
>
>
>  -----Original Message-----
>
> *From:* James [mailto:[EMAIL PROTECTED]
> *Sent:* Friday, September 28, 2007 1:45 PM
> *To:* [email protected]
> *Subject:* Re: [xfire-user] Xfire Client with Jaxb: XFireFault: Could not
> marshall type.
>
> Thanks for the responses,
>
> Sameer, the GenericType is a simpletype contained with in a complex List
> type.  To create a dummy complex type - do you mean to add a GenericType
> (complex type) in the wsdl and regenerate everything?  What would this type
> look like?
>
>
>
> On 9/28/07, Rao, Sameer V <[EMAIL PROTECTED]> wrote:
> >
> >  Using Enumerations with JAXB-Xfire, we have seen some odd behaviour.
> > James, the enum that u are using -GenericType is that being used (as a
> > element) in other complexType ? If not create a dummy complextype (dummy
> > meaning not used in anywhere in ur service).
> >
> > Doing this, somehow allows JAXB to know and intepret XML data to the
> > right enum class.
> >
> >  -----Original Message-----
> > *From:* Mayank Thakore [mailto:[EMAIL PROTECTED]
> > *Sent:* Friday, September 28, 2007 1:32 PM
> > *To:* [email protected]
> > *Subject:* RE: [xfire-user] Xfire Client with Jaxb: XFireFault: Could
> > not marshall type.
> >
> >  We have seen this same issue. We suspect it has something to do with
> > class loaders. Though not sure how this can happen.
> >
> >
> >
> > We run an osgi bundle which has the xfire server. If we run the client
> > from another bundle then we get this exception, but if we run the client
> > from a standalone application then it connects smoothly. The difference we
> > noted is that when the client runs as another bundle then there are two
> > class loaders (one for each bundle). One class loader runs the server and
> > loads the xfire packages. The other runs the client and imports the packages
> > from the first bundle. We suspect the imports are not correct or it is
> > getting different packages/classes from different classloaders.
> >
> >
> >
> > Maybe the issues are related but, as I said, I'm not sure. I am working
> > on resolving the issue. Appreciate any help. If I find a solution I will
> > post it.
> >
> >
> >
> > Regards
> >
> > Mayank Thakore
> >
> > Huawei Technologies
> >
> > Mobile: +91-988-665-9544
> >
> >
> >
> >
> > ********************************************************************************************************
> >  This e-mail and attachments contain confidential information from
> > HUAWEI, which is intended only for the person or entity whose address is
> > listed above. Any use of the information contained herein in any way
> > (including, but not limited to, total or partial disclosure, reproduction,
> > or dissemination) by persons other than the intended recipient's) is
> > prohibited. If you receive this e-mail in error, please notify the sender by
> > phone or email immediately and delete it!
> >  ------------------------------
> >
> > *From:* James [mailto:[EMAIL PROTECTED]
> > *Sent:* Friday, September 28, 2007 23-53
> > *To:* [email protected]
> > *Subject:* [xfire-user] Xfire Client with Jaxb: XFireFault: Could not
> > marshall type.
> >
> >
> >
> > Xfire 1.2.6
> >
> > Okay, I sent a previous email outlining my previous issues with xfire
> > client generation with xmlbeans.  I've decided to go the other route and try
> > xfire client generation with jaxb.  The wsdl generation was fine but I'm
> > running into a different problem now.
> >
> > org.codehaus.xfire.XFireRuntimeException: Could not invoke service..
> > Nested exception is org.codehaus.xfire.fault.XFireFault: Could not
> > marshall type.
> >
> > javax.xml.bind.MarshalException
> >  - with linked exception:
> > [javax.xml.bind.JAXBException: [Lcom.test.GenericType; nor any of its
> > super class is known to this context]
> >
> > GenericType is a enumeration class.
> >
> > I've found this thread, that is very similar
> >
> > org.codehaus.xfire.XFireRuntimeException : Could not invoke service..
> > Nested exception is org.codehaus.xfire.fault.XFireFault: Could not
> > marshall type.
> >
> > But I don't invoke my client in the same way, so I can't set any
> > properties
> >
> > Can anyone help?
> >
>
>

Reply via email to