Re: [Axis 1.3] Problems using XmlBeans

2007-09-13 Thread Homerj2001

I'm running into the same problem as below - I know it's over a year later -
has anyone found a resolution to this issue?

I'm using JBoss 4.0.5 and Axis 1.3 and XmlBeans 2.2

I have my typeMappings set in my server-config.wsdd

http://myNamespace";
encodingStyle="" qname="ns1:ResponseType"

serializer="org.apache.axis.encoding.ser.xbeans.XmlBeanSerializerFactory"

deserializer="org.apache.axis.encoding.ser.xbeans.XmlBeanDeserializerFactory"
type="java:myNamespace.ResponseType" />

When I try accessing the wsdl via
http://localhost/axis/services/myService?wsdl - I get  the same Null Pointer
Exception as below.

Thanks,

-Bryan



> AxisFault
>  faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>  faultSubcode:
>  faultString: java.lang.NullPointerException
>  faultActor:
>  faultNode:
>  faultDetail:
> 
> {http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
> at
> org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer.getTypeNode(XmlBeanSerializer.java:276)
> at
> org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer.writeSchemaForDocType(XmlBeanSerializer.java:134)
> at
> org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer.writeSchema(XmlBeanSerializer.java:120)
> at
> org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1849)
> at
> org.apache.axis.wsdl.fromJava.Types.writeTypeForPart(Types.java:421)
> at
> org.apache.axis.wsdl.fromJava.Types.writeWrappedParameter(Types.java:612)
> at
> org.apache.axis.wsdl.fromJava.Emitter.writeWrapperPart(Emitter.java:1680)
> at
> org.apache.axis.wsdl.fromJava.Emitter.writeRequestMessage(Emitter.java:1467)
> at
> org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:1106)
> at
> org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:1075)
> at
> org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:484)
> at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:331)
> at
> org.apache.axis.providers.BasicProvider.generateWSDL(BasicProvider.java:242)
> at
> org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:33)
> at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
> at
> org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:104)
> at
> org.apache.axis.handlers.soap.SOAPService.generateWSDL(SOAPService.java:319)
> at
> org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:482)
> at
> org.apache.axis.transport.http.QSWSDLHandler.invoke(QSWSDLHandler.java:68)
> ...
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-Axis-1.3--Problems-using-XmlBeans-tf1562865.html#a12654266
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Axis 1.3] Problems using XmlBeans

2006-05-05 Thread Davide Romanini
Hi,

I developed a web service using Axis 1.3 final. Since I already had a
WSDL for the service interface, I decided to create the types using
XmlBeans 2.1.0. So I have a simple interface for the service:

public SearchResultDocument search( QueryDocument query );

I created a server-config.wsdd containing a definition for the service
and a  tag for each xmlbean I have (although I think I need
only a mapping for SearchResultDocument and QueryDocument, do I?). When
I deploy the service and try accessing the wsdl
(http://localhost/axis/services/myService?wsdl) I receive a
NullPointerException thrown by XmlBeanSerializer:

AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.NullPointerException
 faultActor:
 faultNode:
 faultDetail:

{http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
at
org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer.getTypeNode(XmlBeanSerializer.java:276)
at
org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer.writeSchemaForDocType(XmlBeanSerializer.java:134)
at
org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer.writeSchema(XmlBeanSerializer.java:120)
at
org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1849)
at
org.apache.axis.wsdl.fromJava.Types.writeTypeForPart(Types.java:421)
at
org.apache.axis.wsdl.fromJava.Types.writeWrappedParameter(Types.java:612)
at
org.apache.axis.wsdl.fromJava.Emitter.writeWrapperPart(Emitter.java:1680)
at
org.apache.axis.wsdl.fromJava.Emitter.writeRequestMessage(Emitter.java:1467)
at
org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:1106)
at
org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:1075)
at
org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:484)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:331)
at
org.apache.axis.providers.BasicProvider.generateWSDL(BasicProvider.java:242)
at
org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:33)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at
org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:104)
at
org.apache.axis.handlers.soap.SOAPService.generateWSDL(SOAPService.java:319)
at
org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:482)
at
org.apache.axis.transport.http.QSWSDLHandler.invoke(QSWSDLHandler.java:68)
...

Since I created the beans from WSDL, I expect Axis to generate an
equivalent WSDL using the XmlBeans themselves.

If I try to set a mapping using the concrete XmlBeans implementations
(SearchResultDocumentImpl), Axis doesn't seem to ever invoke
writeSchema() on the serializer, that is what I expect. I'm in doubt if
I really need a typemapping *also* for the concrete implementations
because I suspect that when from the service I return a SearchResultImpl
Axis can't find a serializer for that...

I tried to use the ser/deser provided at
http://issues.apache.org/jira/browse/AXIS-1764 with no luck. I found
problems integrating it with my actual installation, seems it cannot
find org.w3.x2001.xmlSchema.SchemaDocument$Schema... Since it looks like
importing a XmlBeans of the XSchema schema, I tried to create it but
then I had a ClassCastException
org.apache.xmlbeans.impl.xb.xsdschema.impl.Sc
hemaDocumentImpl$SchemaImpl at XmlBeanSerializer.java:151.

I'm a bit frustrated, so I didn't investigated the problem anymore...

Someone could help?

Bye, 
Davide Romanini