XMLBeans deserialisation classpath issues with inherited types

2009-01-14 Thread Martin Scholl

Hi,

currently I am confronted with some wired XMLBeans classpath issue  
during deserialisation of inherited types.


First of all the setup:

- Axis2-141, Tomcat 6, XMLBeans 2.3.0
- the web service is deployed as an aar containing a lib folder where  
all service related libraries are situated (especially the generated  
xbeans)

- the axis2/WEB-INF/lib folder contains just the default jars
- all the xbeans were generated separately by scomp and are located in  
a single jar
- the service was generated using the -Ewdc switch and the dummy  
schemas are not included in the generated service jar (the jar  
actually only contains the Stub, the MessageReceivers, the Skeleton  
and several Faults (declared in the WSDL file))


So far so good. No problem at all, everything runs fine, except:

In our type xsds we have some inheritance (snippet):

[...]
element name=UsernameIdentity  
type=ia_types:UsernameIdentityType  
substitutionGroup=ia_types:AttributedIdentity/

complexType name=UsernameIdentityType
complexContent
extension base=ia_types:AttributedIdentityType
sequence
element name=username type=string/
/sequence
/extension
/complexContent
/complexType
complexType name=UsernameIdentityPropertyType
sequence minOccurs=0
element ref=ia_types:UsernameIdentity/
/sequence
/complexType

element name=GroupIdentity type=ia_types:GroupIdentityType  
substitutionGroup=ia_types:AttributedIdentity/

complexType name=GroupIdentityType
complexContent
extension base=ia_types:AttributedIdentityType
sequence
element name=groupname type=string/
/sequence
/extension
/complexContent
/complexType
complexType name=GroupIdentityPropertyType
sequence minOccurs=0
element ref=ia_types:GroupIdentity/
/sequence
/complexType

element name=AttributedIdentity  
type=ia_types:AttributedIdentityType  
substitutionGroup=ia_types:Identity/

complexType name=AttributedIdentityType
complexContent
extension base=ia_types:IdentityType
sequence
element name=attributes  
type=ia_types:IdentityAttributesType/

element name=identities
complexType
sequence
element  
ref=ia_types:AttributedIdentity minOccurs=0 maxOccurs=unbounded/

/sequence
/complexType
/element
/sequence
/extension
/complexContent
/complexType

element name=Identity type=ia_types:IdentityType/
complexType name=IdentityType
sequence
element name=id type=integer/
element name=origin type=string/
element name=refProfile  
type=pms_types:ProfilePropertyType minOccurs=0/

element name=active type=boolean/
/sequence
/complexType
complexType name=IdentityPropertyType
sequence minOccurs=0
element ref=ia_types:Identity/
/sequence
/complexType
[...]

Now the service offers a request to create a new identity:

element name=createIdentityRequest  
type=ia_requests:createIdentityRequest/

complexType name=createIdentityRequest
sequence
element name=identity type=ia_types:IdentityType/
/sequence
/complexType

If I send the following request:

ns:createIdentityRequest xmlns:ns=http://www.enviromatics.net/WS/IdentityManagementAndAuthenticationService/requests/2.0 


  
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
  ns1:identity xmlns:ns1=http://www.enviromatics.net/WS/IdentityManagementAndAuthenticationService/requests/2.0 

  xmlns:ns=http://www.enviromatics.net/WS/IdentityManagementAndAuthenticationService/types/2.0 



xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns=http://www.enviromatics.net/WS/IdentityManagementAndAuthenticationService/requests/2.0 


xsi:type=ns:GroupIdentityType
ns:id xsi:nil=true/
ns:originhttp://127.0.0.1:8091/axis214/services/IdentityManagementAndAuthenticationService 
/ns:origin

ns:refProfile/
ns:activefalse/ns:active
ns:attributes xsi:type=ns:KeyVectorIdentityAttributesType/
ns:identities/
ns:groupnametestGroup/ns:groupname
  /ns1:identity
/ns:createIdentityRequest

which actually represents an instance of GroupIdentityType (see  
xsi:type=ns:GroupIdentityType) but XMLBeans parameter does not  
create an instance of GroupIdentityType(Impl) but of  
IdentityType(Impl) which cannot be cast (obviously). The funny thing  
about this is that if I place the xbeans jar in the axis2/WEB-INF/lib  
folder 

Re: SOAP Envelope not serializable for robust-in-only operations

2008-09-18 Thread Martin Scholl

Hi,

I updated Axis2 to v1.4.1 (uses XMLBeans 2.3.0) but unfortunately the  
issue did not vanish :(  Btw generated code still states that is has  
been generated with Axis2 1.3 (class doc)  and deprecated API is  
still used (AbstractRobustInMessageReceiver,  
AbstractInOutSyncMessageReceiver).


Any ideas are very much appreciated.

Regards,

Martin


Am 17.09.2008 um 14:09 schrieb Martin Scholl:

I simple use MessageContext.getCurrentMessageContext().getEnvelope 
() which works for in-out operations. For in-only operations I know  
that the envelope is non-null and seems to contain valid content  
since the XMLBeans operation parameter content is all right.


Regards,

Martin


Am 17.09.2008 um 14:02 schrieb keith chapman:

What is the mechanism you used to access the SOAPEnvelop from the  
service implementation class?


Thanks,
Keith.

On Wed, Sep 17, 2008 at 4:58 PM, Martin Scholl  
[EMAIL PROTECTED] wrote:

Hi,

I got some trouble with the SOAP Envelope contained in the  
MessageContext of in-only operations, which I access in the  
ServiceSkeleton implementation class. When calling toString  
operation on any element of the envelope (body, header, etc.) or  
on the envelope itself I receive an OMException, caused by a  
NoSuchElementException. When calling toString operation on the  
envelope which was converted in a org.w3c.dom.Element before I  
receive a RuntimeException with message 'Can not serialize OM  
Element Envelope'. This exception is caused by a XMLStreamException.


We use XMLBeans databinding which does not complain about anything  
and works well. Additionally in-out operations' SOAP Envelope is  
valid. I could not manage to find any clue yet. We use Axis2 1.3  
on top of Tomcat6 and generate the service client and server  
classes from WSDL 1.1 using WSDL2Java and XMLBeans 2.2.0.


Any ideas?

Thanks in advance.

Regards,

Martin

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




--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org






Re: Netbeans and Axis

2008-09-18 Thread Martin Scholl
Actually there is an Axis2 plugin for Netbeans available through the  
regular Plugin/Updatecenter if you use NetBeans 6.x. Just read  
through the list of Plugins, select and download it. Then you may  
choose settings where you can set up the location of your axis  
installation. A library is also included which contains all the jars  
Axis2 1.4 uses.
The main advantage of this plugin is the extension of standard Java  
projects with the possibility to create an Axis2 Webservice in a  
Bottom-Up approach. For more information have a look at this  
tutorial: http://www.netbeans.org/kb/61/websvc/gs-axis.html


We use NetBeans and this plugin develop and deploy our Web Services  
in a Top-Down approach but with large customisation of the build  
script because standard settings are just sufficient to get a first  
impression of how Axis2 Web Services can be developed and deployed  
with NetBeans IMHO.
In fact there is no really good NetBeans plugin for Axis2 support,  
at least I have never heard about any other plugin than the mentioned  
one. But this one is in early stages and may be extended in future  
version.


Regards,

Martin


Am 18.09.2008 um 19:46 schrieb Horninger, Joe (Contr Mission Systems):

Not quite,  I already use ant to build and deploy my axis  
webservices.  I am looking for something a little different, some  
way to help with all of the extras when it comes to my WS,  
inclusive of keeping the wsdd files up do date and such...


I do most of the work through ant and by manually editing the  
deployment descriptors myself right now.


The black and white of the situation is that I am trying to  
increase my productivity a bit when it comes to the supporting  
files for axis web services.  Right now we are mandated to use axis  
1.4 (not our choice), old technology with less help with code  
generation.



-Original Message-
From: Mark Nüßler [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2008 10.38
To: axis-user@ws.apache.org
Subject: Re: Netbeans and Axis

Hello Joe,

what exactly do you mean :

1) build axis2 from sources ?
-- use the netbeans-maven plugin

2) build and deploy your axis2-service ?
-- use ant


best regards derMark


Horninger, Joe (Contr Mission Systems) schrieb:
Does anyone know of a nice plugin to make NetBeans play with axis  
1.4?




Thanks!



-Joe




- 
---



No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.169 / Virus Database: 270.6.21/1678 - Release Date:  
18.09.2008 09:01




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


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




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



SOAP Envelope not serializable for robust-in-only operations

2008-09-17 Thread Martin Scholl

Hi,

I got some trouble with the SOAP Envelope contained in the  
MessageContext of in-only operations, which I access in the  
ServiceSkeleton implementation class. When calling toString operation  
on any element of the envelope (body, header, etc.) or on the  
envelope itself I receive an OMException, caused by a  
NoSuchElementException. When calling toString operation on the  
envelope which was converted in a org.w3c.dom.Element before I  
receive a RuntimeException with message 'Can not serialize OM Element  
Envelope'. This exception is caused by a XMLStreamException.


We use XMLBeans databinding which does not complain about anything  
and works well. Additionally in-out operations' SOAP Envelope is  
valid. I could not manage to find any clue yet. We use Axis2 1.3 on  
top of Tomcat6 and generate the service client and server classes  
from WSDL 1.1 using WSDL2Java and XMLBeans 2.2.0.


Any ideas?

Thanks in advance.

Regards,

Martin

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



Re: SOAP Envelope not serializable for robust-in-only operations

2008-09-17 Thread Martin Scholl
I simple use MessageContext.getCurrentMessageContext().getEnvelope()  
which works for in-out operations. For in-only operations I know that  
the envelope is non-null and seems to contain valid content since the  
XMLBeans operation parameter content is all right.


Regards,

Martin


Am 17.09.2008 um 14:02 schrieb keith chapman:

What is the mechanism you used to access the SOAPEnvelop from the  
service implementation class?


Thanks,
Keith.

On Wed, Sep 17, 2008 at 4:58 PM, Martin Scholl  
[EMAIL PROTECTED] wrote:

Hi,

I got some trouble with the SOAP Envelope contained in the  
MessageContext of in-only operations, which I access in the  
ServiceSkeleton implementation class. When calling toString  
operation on any element of the envelope (body, header, etc.) or on  
the envelope itself I receive an OMException, caused by a  
NoSuchElementException. When calling toString operation on the  
envelope which was converted in a org.w3c.dom.Element before I  
receive a RuntimeException with message 'Can not serialize OM  
Element Envelope'. This exception is caused by a XMLStreamException.


We use XMLBeans databinding which does not complain about anything  
and works well. Additionally in-out operations' SOAP Envelope is  
valid. I could not manage to find any clue yet. We use Axis2 1.3 on  
top of Tomcat6 and generate the service client and server classes  
from WSDL 1.1 using WSDL2Java and XMLBeans 2.2.0.


Any ideas?

Thanks in advance.

Regards,

Martin

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




--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org