[jira] Commented: (AXIS2-1129) Doubled wrapper elements around XMLBeans-generated XML

2006-10-16 Thread Radu Preotiuc-Pietro (JIRA)
[ 
http://issues.apache.org/jira/browse/AXIS2-1129?page=comments#action_12442752 ] 

Radu Preotiuc-Pietro commented on AXIS2-1129:
-

From an XmlBeans perspective, I can't see any quirkiness here :-)

Calling Full.Factory.parse() is simply not correct in the given context. 
FullDocument.Factory.parse() is the correct call. This is probably caused by 
the fact that the element and the type have the same name; if you had
xs:element name=empty type=Full/ instead

then surely you would not write
return Full.Factory.parse(
empty xmlns=\http://www.dummy-temp-address\;\n +
// SNIPPED.
/empty); 
but the correct:
return EmptyDocument.Factory.parse(
empty xmlns=\http://www.dummy-temp-address\;\n +
// SNIPPED.
/empty); 

Foo.Factory.parse() has its uses in certain more complex scenarios, but in 
general the *Document classes should be used.


 Doubled wrapper elements around XMLBeans-generated XML
 --

 Key: AXIS2-1129
 URL: http://issues.apache.org/jira/browse/AXIS2-1129
 Project: Apache Axis 2.0 (Axis2)
  Issue Type: Bug
  Components: core, om, wsdl, client-api, databinding
Affects Versions: 1.0
Reporter: Derek Foster
Priority: Blocker

 I recently noticed a big problem in how Axis2 generates XML for  XMLBeans 
 objects. It appears to be creating the wrapper element around
 an XMLBean twice, thus generating erroneous XML for a SOAP message. This 
 appears to be a big problem that would affect a lot of web services, and is 
 making it impossible for my company to use Axis2 to talk to our server.
 This error was found in the latest nightly build (September 8), but has 
 apparently been around for some time.
 I have a particular WSDL, as follows:
 ?xml version=1.0 encoding=UTF-8?
 definitions name=FDefinitions
targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:tns=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:c=http://www.c-corp.com/wsdl/2004-10-01/c;
xmlns:F=http://www.dummy-temp-address;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns=http://schemas.xmlsoap.org/wsdl/;
types
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
  xs:import namespace=http://www.dummy-temp-address; 
 schemaLocation=F.xsd/
  xs:element name=return type=xs:string/
  xs:element name=failure type=xs:string/
   /xs:schema
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/c;
  xs:element name=CPassword type=xs:string/
  xs:element name=CLogin type=xs:string/
   /xs:schema
/types
message name=FEvent
   part name=contents element=F:full/
/message
message name=FResponse
   part name=return element=tns:return/
/message
message name=CPassword
   part name=CPassword element=c:CPassword/
/message
message name=CLogin
   part name=CLogin element=c:CLogin/
/message
message name=Failure
   part name=faultDetail element=tns:failure/
/message
portType name=FPortType
   documentationF Port Type/documentation
   operation name=acceptFEvent parameterOrder=contents
  input name=acceptFEventRequest message=tns:FEvent/
  output name=acceptFEventResponse message=tns:FResponse/
  fault name=Failure message=tns:Failure/
   /operation
/portType
binding name=FSoapBinding type=tns:FPortType
   documentationF Soap Binding/documentation
   soap:binding style=document 
 transport=http://schemas.xmlsoap.org/soap/http/
   operation name=acceptFEvent
  soap:operation soapAction=acceptFEventAction/
  input
 soap:header message=tns:CLogin part=CLogin use=literal/
 soap:header message=tns:CPassword part=CPassword 
 use=literal/
 soap:body use=literal/
  /input
  output
 soap:body use=literal/
  /output
  fault name=Failure
 soap:fault name=Failure use=literal/
  /fault
   /operation
/binding
service name=FService
   documentationF Web Service/documentation
   port name=FPort binding=tns:FSoapBinding
  soap:address 
 location=http://localhost:8080/axis/services/FService/
   /port
/service
 /definitions
 My WSDL references the following XML schema:
 ?xml version=1.0 encoding=UTF-8?
 xs:schema targetNamespace=http://www.dummy-temp-address;
xmlns=http://www.dummy-temp-address;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:c=http://www.c-corp.com/schemas/c/schema_annotation;
elementFormDefault=unqualified
attributeFormDefault=unqualified
 

[jira] Commented: (AXIS2-1129) Doubled wrapper elements around XMLBeans-generated XML

2006-09-13 Thread Derek Foster (JIRA)
[ 
http://issues.apache.org/jira/browse/AXIS2-1129?page=comments#action_12434520 ] 

Derek Foster commented on AXIS2-1129:
-

Hmm. In reading the above comment, it's not clear to me whether Dims found and 
fixed an actual bug in the Axis2 or XMLBeans code, or whether he is simply 
suggesting a workaround. It looks to me like the latter is true.

In regards to the comment If you wrap it in a FullDocument and then call 
toString() you will see the same problem that we are having. , I think I 
stated that in my initial bug report...?

Anyway, I think that the proposed workaround will probably allow me to get my 
server working (once the other bugs I have filed are fixed), and so it's useful 
and possibly worth having this bug no longer be considered a blocker for Axis 
1.3, but isn't the original problem still a problem? It seems to me that if I 
execute full = Full.Factory.parse(whatever) and then call 
fullDocument.setFull(full), and then call fullDocument.toString(), that I 
should not get a doubled 'full' element in the result. That seems to me to be a 
bug, not just quirkiness.

Please clarify: Was there an actual bugfix involved here, or is this just a 
suggested workaround?

Derek


 Doubled wrapper elements around XMLBeans-generated XML
 --

 Key: AXIS2-1129
 URL: http://issues.apache.org/jira/browse/AXIS2-1129
 Project: Apache Axis 2.0 (Axis2)
  Issue Type: Bug
  Components: om, core, databinding, client-api, wsdl
Affects Versions: 1.0
Reporter: Derek Foster
Priority: Blocker

 I recently noticed a big problem in how Axis2 generates XML for  XMLBeans 
 objects. It appears to be creating the wrapper element around
 an XMLBean twice, thus generating erroneous XML for a SOAP message. This 
 appears to be a big problem that would affect a lot of web services, and is 
 making it impossible for my company to use Axis2 to talk to our server.
 This error was found in the latest nightly build (September 8), but has 
 apparently been around for some time.
 I have a particular WSDL, as follows:
 ?xml version=1.0 encoding=UTF-8?
 definitions name=FDefinitions
targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:tns=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:c=http://www.c-corp.com/wsdl/2004-10-01/c;
xmlns:F=http://www.dummy-temp-address;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns=http://schemas.xmlsoap.org/wsdl/;
types
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
  xs:import namespace=http://www.dummy-temp-address; 
 schemaLocation=F.xsd/
  xs:element name=return type=xs:string/
  xs:element name=failure type=xs:string/
   /xs:schema
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/c;
  xs:element name=CPassword type=xs:string/
  xs:element name=CLogin type=xs:string/
   /xs:schema
/types
message name=FEvent
   part name=contents element=F:full/
/message
message name=FResponse
   part name=return element=tns:return/
/message
message name=CPassword
   part name=CPassword element=c:CPassword/
/message
message name=CLogin
   part name=CLogin element=c:CLogin/
/message
message name=Failure
   part name=faultDetail element=tns:failure/
/message
portType name=FPortType
   documentationF Port Type/documentation
   operation name=acceptFEvent parameterOrder=contents
  input name=acceptFEventRequest message=tns:FEvent/
  output name=acceptFEventResponse message=tns:FResponse/
  fault name=Failure message=tns:Failure/
   /operation
/portType
binding name=FSoapBinding type=tns:FPortType
   documentationF Soap Binding/documentation
   soap:binding style=document 
 transport=http://schemas.xmlsoap.org/soap/http/
   operation name=acceptFEvent
  soap:operation soapAction=acceptFEventAction/
  input
 soap:header message=tns:CLogin part=CLogin use=literal/
 soap:header message=tns:CPassword part=CPassword 
 use=literal/
 soap:body use=literal/
  /input
  output
 soap:body use=literal/
  /output
  fault name=Failure
 soap:fault name=Failure use=literal/
  /fault
   /operation
/binding
service name=FService
   documentationF Web Service/documentation
   port name=FPort binding=tns:FSoapBinding
  soap:address 
 location=http://localhost:8080/axis/services/FService/
   /port
/service
 /definitions
 My WSDL references the following XML schema:
 ?xml version=1.0 encoding=UTF-8?
 xs:schema 

[jira] Commented: (AXIS2-1129) Doubled wrapper elements around XMLBeans-generated XML

2006-09-13 Thread Davanum Srinivas (JIRA)
[ 
http://issues.apache.org/jira/browse/AXIS2-1129?page=comments#action_12434523 ] 

Davanum Srinivas commented on AXIS2-1129:
-

No bug fix involved. Problem is in XMLBeans code. It's quirkiness as far as i 
am concerned as it is nothing to do with Axis2.

-- dims

 Doubled wrapper elements around XMLBeans-generated XML
 --

 Key: AXIS2-1129
 URL: http://issues.apache.org/jira/browse/AXIS2-1129
 Project: Apache Axis 2.0 (Axis2)
  Issue Type: Bug
  Components: om, core, databinding, client-api, wsdl
Affects Versions: 1.0
Reporter: Derek Foster
Priority: Blocker

 I recently noticed a big problem in how Axis2 generates XML for  XMLBeans 
 objects. It appears to be creating the wrapper element around
 an XMLBean twice, thus generating erroneous XML for a SOAP message. This 
 appears to be a big problem that would affect a lot of web services, and is 
 making it impossible for my company to use Axis2 to talk to our server.
 This error was found in the latest nightly build (September 8), but has 
 apparently been around for some time.
 I have a particular WSDL, as follows:
 ?xml version=1.0 encoding=UTF-8?
 definitions name=FDefinitions
targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:tns=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:c=http://www.c-corp.com/wsdl/2004-10-01/c;
xmlns:F=http://www.dummy-temp-address;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns=http://schemas.xmlsoap.org/wsdl/;
types
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
  xs:import namespace=http://www.dummy-temp-address; 
 schemaLocation=F.xsd/
  xs:element name=return type=xs:string/
  xs:element name=failure type=xs:string/
   /xs:schema
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/c;
  xs:element name=CPassword type=xs:string/
  xs:element name=CLogin type=xs:string/
   /xs:schema
/types
message name=FEvent
   part name=contents element=F:full/
/message
message name=FResponse
   part name=return element=tns:return/
/message
message name=CPassword
   part name=CPassword element=c:CPassword/
/message
message name=CLogin
   part name=CLogin element=c:CLogin/
/message
message name=Failure
   part name=faultDetail element=tns:failure/
/message
portType name=FPortType
   documentationF Port Type/documentation
   operation name=acceptFEvent parameterOrder=contents
  input name=acceptFEventRequest message=tns:FEvent/
  output name=acceptFEventResponse message=tns:FResponse/
  fault name=Failure message=tns:Failure/
   /operation
/portType
binding name=FSoapBinding type=tns:FPortType
   documentationF Soap Binding/documentation
   soap:binding style=document 
 transport=http://schemas.xmlsoap.org/soap/http/
   operation name=acceptFEvent
  soap:operation soapAction=acceptFEventAction/
  input
 soap:header message=tns:CLogin part=CLogin use=literal/
 soap:header message=tns:CPassword part=CPassword 
 use=literal/
 soap:body use=literal/
  /input
  output
 soap:body use=literal/
  /output
  fault name=Failure
 soap:fault name=Failure use=literal/
  /fault
   /operation
/binding
service name=FService
   documentationF Web Service/documentation
   port name=FPort binding=tns:FSoapBinding
  soap:address 
 location=http://localhost:8080/axis/services/FService/
   /port
/service
 /definitions
 My WSDL references the following XML schema:
 ?xml version=1.0 encoding=UTF-8?
 xs:schema targetNamespace=http://www.dummy-temp-address;
xmlns=http://www.dummy-temp-address;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:c=http://www.c-corp.com/schemas/c/schema_annotation;
elementFormDefault=unqualified
attributeFormDefault=unqualified
version=DRAFT
xs:element name=full type=Full/
xs:complexType name=Full
   xs:sequence
  xs:element name=message-header type=MessageHeader/
  xs:element name=event-reference type=EventReference/
  xs:any/
   /xs:sequence
/xs:complexType
xs:complexType name=MessageHeader
   xs:sequence
  xs:any/
   /xs:sequence
/xs:complexType
xs:complexType name=EventReference
   xs:sequence
  xs:element name=event-id type=xs:string/
  xs:element name=update type=xs:unsignedInt/
  xs:element name=response-plan-id type=xs:string minOccurs=0/
   /xs:sequence

[jira] Commented: (AXIS2-1129) Doubled wrapper elements around XMLBeans-generated XML

2006-09-13 Thread Derek Foster (JIRA)
[ 
http://issues.apache.org/jira/browse/AXIS2-1129?page=comments#action_12434542 ] 

Derek Foster commented on AXIS2-1129:
-

Hmm. I still think it's a real bug (especially considering your workaround 
seems to require changes to the XML schema in order to make it work, and that 
those changes should have no effect whatsoever on a correctly written XML 
schema parser), but I do agree with you that it's an XMLBeans bug, not an Axis2 
bug.

I have created XMLBEANS-288 to track this issue further.

Thanks for your time in finding the workaround.

 Doubled wrapper elements around XMLBeans-generated XML
 --

 Key: AXIS2-1129
 URL: http://issues.apache.org/jira/browse/AXIS2-1129
 Project: Apache Axis 2.0 (Axis2)
  Issue Type: Bug
  Components: core, om, wsdl, client-api, databinding
Affects Versions: 1.0
Reporter: Derek Foster
Priority: Blocker

 I recently noticed a big problem in how Axis2 generates XML for  XMLBeans 
 objects. It appears to be creating the wrapper element around
 an XMLBean twice, thus generating erroneous XML for a SOAP message. This 
 appears to be a big problem that would affect a lot of web services, and is 
 making it impossible for my company to use Axis2 to talk to our server.
 This error was found in the latest nightly build (September 8), but has 
 apparently been around for some time.
 I have a particular WSDL, as follows:
 ?xml version=1.0 encoding=UTF-8?
 definitions name=FDefinitions
targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:tns=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:c=http://www.c-corp.com/wsdl/2004-10-01/c;
xmlns:F=http://www.dummy-temp-address;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns=http://schemas.xmlsoap.org/wsdl/;
types
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
  xs:import namespace=http://www.dummy-temp-address; 
 schemaLocation=F.xsd/
  xs:element name=return type=xs:string/
  xs:element name=failure type=xs:string/
   /xs:schema
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/c;
  xs:element name=CPassword type=xs:string/
  xs:element name=CLogin type=xs:string/
   /xs:schema
/types
message name=FEvent
   part name=contents element=F:full/
/message
message name=FResponse
   part name=return element=tns:return/
/message
message name=CPassword
   part name=CPassword element=c:CPassword/
/message
message name=CLogin
   part name=CLogin element=c:CLogin/
/message
message name=Failure
   part name=faultDetail element=tns:failure/
/message
portType name=FPortType
   documentationF Port Type/documentation
   operation name=acceptFEvent parameterOrder=contents
  input name=acceptFEventRequest message=tns:FEvent/
  output name=acceptFEventResponse message=tns:FResponse/
  fault name=Failure message=tns:Failure/
   /operation
/portType
binding name=FSoapBinding type=tns:FPortType
   documentationF Soap Binding/documentation
   soap:binding style=document 
 transport=http://schemas.xmlsoap.org/soap/http/
   operation name=acceptFEvent
  soap:operation soapAction=acceptFEventAction/
  input
 soap:header message=tns:CLogin part=CLogin use=literal/
 soap:header message=tns:CPassword part=CPassword 
 use=literal/
 soap:body use=literal/
  /input
  output
 soap:body use=literal/
  /output
  fault name=Failure
 soap:fault name=Failure use=literal/
  /fault
   /operation
/binding
service name=FService
   documentationF Web Service/documentation
   port name=FPort binding=tns:FSoapBinding
  soap:address 
 location=http://localhost:8080/axis/services/FService/
   /port
/service
 /definitions
 My WSDL references the following XML schema:
 ?xml version=1.0 encoding=UTF-8?
 xs:schema targetNamespace=http://www.dummy-temp-address;
xmlns=http://www.dummy-temp-address;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:c=http://www.c-corp.com/schemas/c/schema_annotation;
elementFormDefault=unqualified
attributeFormDefault=unqualified
version=DRAFT
xs:element name=full type=Full/
xs:complexType name=Full
   xs:sequence
  xs:element name=message-header type=MessageHeader/
  xs:element name=event-reference type=EventReference/
  xs:any/
   /xs:sequence
/xs:complexType
xs:complexType name=MessageHeader
   xs:sequence
  xs:any/
   /xs:sequence

[jira] Commented: (AXIS2-1129) Doubled wrapper elements around XMLBeans-generated XML

2006-09-13 Thread Davanum Srinivas (JIRA)
[ 
http://issues.apache.org/jira/browse/AXIS2-1129?page=comments#action_12434548 ] 

Davanum Srinivas commented on AXIS2-1129:
-

No, my work around is for another bug that we introduced recently. You are 
absolutely right that the changes should have no effect on a correctly written 
XML Schema Parser.

Thanks,
dims

 Doubled wrapper elements around XMLBeans-generated XML
 --

 Key: AXIS2-1129
 URL: http://issues.apache.org/jira/browse/AXIS2-1129
 Project: Apache Axis 2.0 (Axis2)
  Issue Type: Bug
  Components: om, core, databinding, client-api, wsdl
Affects Versions: 1.0
Reporter: Derek Foster
Priority: Blocker

 I recently noticed a big problem in how Axis2 generates XML for  XMLBeans 
 objects. It appears to be creating the wrapper element around
 an XMLBean twice, thus generating erroneous XML for a SOAP message. This 
 appears to be a big problem that would affect a lot of web services, and is 
 making it impossible for my company to use Axis2 to talk to our server.
 This error was found in the latest nightly build (September 8), but has 
 apparently been around for some time.
 I have a particular WSDL, as follows:
 ?xml version=1.0 encoding=UTF-8?
 definitions name=FDefinitions
targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:tns=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:c=http://www.c-corp.com/wsdl/2004-10-01/c;
xmlns:F=http://www.dummy-temp-address;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns=http://schemas.xmlsoap.org/wsdl/;
types
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
  xs:import namespace=http://www.dummy-temp-address; 
 schemaLocation=F.xsd/
  xs:element name=return type=xs:string/
  xs:element name=failure type=xs:string/
   /xs:schema
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/c;
  xs:element name=CPassword type=xs:string/
  xs:element name=CLogin type=xs:string/
   /xs:schema
/types
message name=FEvent
   part name=contents element=F:full/
/message
message name=FResponse
   part name=return element=tns:return/
/message
message name=CPassword
   part name=CPassword element=c:CPassword/
/message
message name=CLogin
   part name=CLogin element=c:CLogin/
/message
message name=Failure
   part name=faultDetail element=tns:failure/
/message
portType name=FPortType
   documentationF Port Type/documentation
   operation name=acceptFEvent parameterOrder=contents
  input name=acceptFEventRequest message=tns:FEvent/
  output name=acceptFEventResponse message=tns:FResponse/
  fault name=Failure message=tns:Failure/
   /operation
/portType
binding name=FSoapBinding type=tns:FPortType
   documentationF Soap Binding/documentation
   soap:binding style=document 
 transport=http://schemas.xmlsoap.org/soap/http/
   operation name=acceptFEvent
  soap:operation soapAction=acceptFEventAction/
  input
 soap:header message=tns:CLogin part=CLogin use=literal/
 soap:header message=tns:CPassword part=CPassword 
 use=literal/
 soap:body use=literal/
  /input
  output
 soap:body use=literal/
  /output
  fault name=Failure
 soap:fault name=Failure use=literal/
  /fault
   /operation
/binding
service name=FService
   documentationF Web Service/documentation
   port name=FPort binding=tns:FSoapBinding
  soap:address 
 location=http://localhost:8080/axis/services/FService/
   /port
/service
 /definitions
 My WSDL references the following XML schema:
 ?xml version=1.0 encoding=UTF-8?
 xs:schema targetNamespace=http://www.dummy-temp-address;
xmlns=http://www.dummy-temp-address;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:c=http://www.c-corp.com/schemas/c/schema_annotation;
elementFormDefault=unqualified
attributeFormDefault=unqualified
version=DRAFT
xs:element name=full type=Full/
xs:complexType name=Full
   xs:sequence
  xs:element name=message-header type=MessageHeader/
  xs:element name=event-reference type=EventReference/
  xs:any/
   /xs:sequence
/xs:complexType
xs:complexType name=MessageHeader
   xs:sequence
  xs:any/
   /xs:sequence
/xs:complexType
xs:complexType name=EventReference
   xs:sequence
  xs:element name=event-id type=xs:string/
  xs:element name=update type=xs:unsignedInt/
  xs:element name=response-plan-id 

[jira] Commented: (AXIS2-1129) Doubled wrapper elements around XMLBeans-generated XML

2006-09-13 Thread Davanum Srinivas (JIRA)
[ 
http://issues.apache.org/jira/browse/AXIS2-1129?page=comments#action_12434588 ] 

Davanum Srinivas commented on AXIS2-1129:
-

FWIW, with this change (http://svn.apache.org/viewvc?view=revrevision=443228), 
your original wsdl/xsd will work fine.

 Doubled wrapper elements around XMLBeans-generated XML
 --

 Key: AXIS2-1129
 URL: http://issues.apache.org/jira/browse/AXIS2-1129
 Project: Apache Axis 2.0 (Axis2)
  Issue Type: Bug
  Components: om, core, databinding, client-api, wsdl
Affects Versions: 1.0
Reporter: Derek Foster
Priority: Blocker

 I recently noticed a big problem in how Axis2 generates XML for  XMLBeans 
 objects. It appears to be creating the wrapper element around
 an XMLBean twice, thus generating erroneous XML for a SOAP message. This 
 appears to be a big problem that would affect a lot of web services, and is 
 making it impossible for my company to use Axis2 to talk to our server.
 This error was found in the latest nightly build (September 8), but has 
 apparently been around for some time.
 I have a particular WSDL, as follows:
 ?xml version=1.0 encoding=UTF-8?
 definitions name=FDefinitions
targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:tns=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:c=http://www.c-corp.com/wsdl/2004-10-01/c;
xmlns:F=http://www.dummy-temp-address;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns=http://schemas.xmlsoap.org/wsdl/;
types
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
  xs:import namespace=http://www.dummy-temp-address; 
 schemaLocation=F.xsd/
  xs:element name=return type=xs:string/
  xs:element name=failure type=xs:string/
   /xs:schema
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/c;
  xs:element name=CPassword type=xs:string/
  xs:element name=CLogin type=xs:string/
   /xs:schema
/types
message name=FEvent
   part name=contents element=F:full/
/message
message name=FResponse
   part name=return element=tns:return/
/message
message name=CPassword
   part name=CPassword element=c:CPassword/
/message
message name=CLogin
   part name=CLogin element=c:CLogin/
/message
message name=Failure
   part name=faultDetail element=tns:failure/
/message
portType name=FPortType
   documentationF Port Type/documentation
   operation name=acceptFEvent parameterOrder=contents
  input name=acceptFEventRequest message=tns:FEvent/
  output name=acceptFEventResponse message=tns:FResponse/
  fault name=Failure message=tns:Failure/
   /operation
/portType
binding name=FSoapBinding type=tns:FPortType
   documentationF Soap Binding/documentation
   soap:binding style=document 
 transport=http://schemas.xmlsoap.org/soap/http/
   operation name=acceptFEvent
  soap:operation soapAction=acceptFEventAction/
  input
 soap:header message=tns:CLogin part=CLogin use=literal/
 soap:header message=tns:CPassword part=CPassword 
 use=literal/
 soap:body use=literal/
  /input
  output
 soap:body use=literal/
  /output
  fault name=Failure
 soap:fault name=Failure use=literal/
  /fault
   /operation
/binding
service name=FService
   documentationF Web Service/documentation
   port name=FPort binding=tns:FSoapBinding
  soap:address 
 location=http://localhost:8080/axis/services/FService/
   /port
/service
 /definitions
 My WSDL references the following XML schema:
 ?xml version=1.0 encoding=UTF-8?
 xs:schema targetNamespace=http://www.dummy-temp-address;
xmlns=http://www.dummy-temp-address;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:c=http://www.c-corp.com/schemas/c/schema_annotation;
elementFormDefault=unqualified
attributeFormDefault=unqualified
version=DRAFT
xs:element name=full type=Full/
xs:complexType name=Full
   xs:sequence
  xs:element name=message-header type=MessageHeader/
  xs:element name=event-reference type=EventReference/
  xs:any/
   /xs:sequence
/xs:complexType
xs:complexType name=MessageHeader
   xs:sequence
  xs:any/
   /xs:sequence
/xs:complexType
xs:complexType name=EventReference
   xs:sequence
  xs:element name=event-id type=xs:string/
  xs:element name=update type=xs:unsignedInt/
  xs:element name=response-plan-id type=xs:string minOccurs=0/
   /xs:sequence
/xs:complexType
 

[jira] Commented: (AXIS2-1129) Doubled wrapper elements around XMLBeans-generated XML

2006-09-11 Thread Derek Foster (JIRA)
[ 
http://issues.apache.org/jira/browse/AXIS2-1129?page=comments#action_12433934 ] 

Derek Foster commented on AXIS2-1129:
-

Ajith is correct in that there is a typo in the example that I posted, but he 
is wrong when he suggests that this bug report is a result of user error (at 
least, for the reason stated). The line

final FullDocument full = Full.Factory.newInstance(); 

should indeed be:

final FullDocument full = FullDocument.Factory.newInstance();

This is the way that it is and has always been in my actual code (note that the 
first version doesn't even compile). I apparently accidentally modified it when 
I posted the bug report (probably because I did some search-and-replace on the 
code and WSDL to try to avoid exposing too much proprietary information in a 
public forum like this one).

However, it is the second, correctly compiling, version of the code that 
exhibits the error that I described. And it is a real error.

As far as generating the object structure, I cannot do this in my application 
because the entire purpose of my server is to receive a chunk of (large, 
complicated) XML via SOAP from an external source, and pass on a slightly 
modified version of the raw XML via a socket connection to an external 
destination. For test purposes, I need to feed it canned XML as if received 
from the external source. Therefore, my test client builds a SOAP message 
including this canned XML, then transmits it to the server, where the server 
can parse it as it normally would and send it to the destination. Generating 
the object structure is not a realistic option here, and would require writing 
thousands of lines of code. This makes no sense, especially since the 
XML-to-Objects translation is exactly what the parse() methods are supposed to 
do, if they were working correctly.

Anyway, I think that it is a pretty major problem if the parse() methods 
generate incorrect results which are different from those which are produced by 
constructing the objects programmatically, which is what Ajith seems to be 
saying. Those two ways of constructing objects are supposed to produce 
identical results. Otherwise, what's the purpose of having parse methods at all?

Although I understand Eran's desire to get Axis 1.1 out the door, I still think 
that this is a major bug deserving of being a blocker. It is going to be a 
nasty surprise to anyone trying to parse XML with XMLBeans (which is, after 
all, what XMLBeans are for) to find out that the parse() methods don't work as 
expected, and instead end up constructing objects containing redundant 
information. Being able to correctly parse XML with XMLBeans to build a an 
object structure capable of being transmitted via SOAP does not seem to me to 
be a particularly exotic or rarely used feature. This is the sort of problem 
that I think should have been fixed prior to the Axis2 1.0 release, really.


 Doubled wrapper elements around XMLBeans-generated XML
 --

 Key: AXIS2-1129
 URL: http://issues.apache.org/jira/browse/AXIS2-1129
 Project: Apache Axis 2.0 (Axis2)
  Issue Type: Bug
  Components: core, om, wsdl, client-api, databinding
Affects Versions: 1.0
Reporter: Derek Foster

 I recently noticed a big problem in how Axis2 generates XML for  XMLBeans 
 objects. It appears to be creating the wrapper element around
 an XMLBean twice, thus generating erroneous XML for a SOAP message. This 
 appears to be a big problem that would affect a lot of web services, and is 
 making it impossible for my company to use Axis2 to talk to our server.
 This error was found in the latest nightly build (September 8), but has 
 apparently been around for some time.
 I have a particular WSDL, as follows:
 ?xml version=1.0 encoding=UTF-8?
 definitions name=FDefinitions
targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:tns=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:c=http://www.c-corp.com/wsdl/2004-10-01/c;
xmlns:F=http://www.dummy-temp-address;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns=http://schemas.xmlsoap.org/wsdl/;
types
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
  xs:import namespace=http://www.dummy-temp-address; 
 schemaLocation=F.xsd/
  xs:element name=return type=xs:string/
  xs:element name=failure type=xs:string/
   /xs:schema
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/c;
  xs:element name=CPassword type=xs:string/
  xs:element name=CLogin type=xs:string/
   /xs:schema
/types
message name=FEvent
   part name=contents element=F:full/
/message
message name=FResponse
   part name=return element=tns:return/
 

[jira] Commented: (AXIS2-1129) Doubled wrapper elements around XMLBeans-generated XML

2006-09-11 Thread Ajith Harshana Ranabahu (JIRA)
[ 
http://issues.apache.org/jira/browse/AXIS2-1129?page=comments#action_12433947 ] 

Ajith Harshana Ranabahu commented on AXIS2-1129:


Hi Derek,
Now I get what you are trying to do and I also agree that the scenario you are 
trying to implement is perfectly valid and should work.  I'll see further what 
the error could be. Anyway was this detected in the earlier versions ?

 Doubled wrapper elements around XMLBeans-generated XML
 --

 Key: AXIS2-1129
 URL: http://issues.apache.org/jira/browse/AXIS2-1129
 Project: Apache Axis 2.0 (Axis2)
  Issue Type: Bug
  Components: core, om, wsdl, client-api, databinding
Affects Versions: 1.0
Reporter: Derek Foster

 I recently noticed a big problem in how Axis2 generates XML for  XMLBeans 
 objects. It appears to be creating the wrapper element around
 an XMLBean twice, thus generating erroneous XML for a SOAP message. This 
 appears to be a big problem that would affect a lot of web services, and is 
 making it impossible for my company to use Axis2 to talk to our server.
 This error was found in the latest nightly build (September 8), but has 
 apparently been around for some time.
 I have a particular WSDL, as follows:
 ?xml version=1.0 encoding=UTF-8?
 definitions name=FDefinitions
targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:tns=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:c=http://www.c-corp.com/wsdl/2004-10-01/c;
xmlns:F=http://www.dummy-temp-address;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns=http://schemas.xmlsoap.org/wsdl/;
types
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
  xs:import namespace=http://www.dummy-temp-address; 
 schemaLocation=F.xsd/
  xs:element name=return type=xs:string/
  xs:element name=failure type=xs:string/
   /xs:schema
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/c;
  xs:element name=CPassword type=xs:string/
  xs:element name=CLogin type=xs:string/
   /xs:schema
/types
message name=FEvent
   part name=contents element=F:full/
/message
message name=FResponse
   part name=return element=tns:return/
/message
message name=CPassword
   part name=CPassword element=c:CPassword/
/message
message name=CLogin
   part name=CLogin element=c:CLogin/
/message
message name=Failure
   part name=faultDetail element=tns:failure/
/message
portType name=FPortType
   documentationF Port Type/documentation
   operation name=acceptFEvent parameterOrder=contents
  input name=acceptFEventRequest message=tns:FEvent/
  output name=acceptFEventResponse message=tns:FResponse/
  fault name=Failure message=tns:Failure/
   /operation
/portType
binding name=FSoapBinding type=tns:FPortType
   documentationF Soap Binding/documentation
   soap:binding style=document 
 transport=http://schemas.xmlsoap.org/soap/http/
   operation name=acceptFEvent
  soap:operation soapAction=acceptFEventAction/
  input
 soap:header message=tns:CLogin part=CLogin use=literal/
 soap:header message=tns:CPassword part=CPassword 
 use=literal/
 soap:body use=literal/
  /input
  output
 soap:body use=literal/
  /output
  fault name=Failure
 soap:fault name=Failure use=literal/
  /fault
   /operation
/binding
service name=FService
   documentationF Web Service/documentation
   port name=FPort binding=tns:FSoapBinding
  soap:address 
 location=http://localhost:8080/axis/services/FService/
   /port
/service
 /definitions
 My WSDL references the following XML schema:
 ?xml version=1.0 encoding=UTF-8?
 xs:schema targetNamespace=http://www.dummy-temp-address;
xmlns=http://www.dummy-temp-address;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:c=http://www.c-corp.com/schemas/c/schema_annotation;
elementFormDefault=unqualified
attributeFormDefault=unqualified
version=DRAFT
xs:element name=full type=Full/
xs:complexType name=Full
   xs:sequence
  xs:element name=message-header type=MessageHeader/
  xs:element name=event-reference type=EventReference/
  xs:any/
   /xs:sequence
/xs:complexType
xs:complexType name=MessageHeader
   xs:sequence
  xs:any/
   /xs:sequence
/xs:complexType
xs:complexType name=EventReference
   xs:sequence
  xs:element name=event-id type=xs:string/
  xs:element name=update type=xs:unsignedInt/
   

[jira] Commented: (AXIS2-1129) Doubled wrapper elements around XMLBeans-generated XML

2006-09-11 Thread Derek Foster (JIRA)
[ 
http://issues.apache.org/jira/browse/AXIS2-1129?page=comments#action_12434019 ] 

Derek Foster commented on AXIS2-1129:
-

In answer to Ajith's question:

As I remember, I was using the nightly build from probably September 1st or so, 
and found this error, and then upgraded to the build from September 8th and 
found that it still existed. I don't know how far back in the past it has gone.

I tried tracing through the code to see if I could figure out where the error 
was occurring, but found that some of the code is located in data files 
generated by WSDL2Java, and some is in .class files for which there is 
apparently no source code. I ended up feeling completely bewildered as to how 
the toString() value is getting generated at all.

Derek


 Doubled wrapper elements around XMLBeans-generated XML
 --

 Key: AXIS2-1129
 URL: http://issues.apache.org/jira/browse/AXIS2-1129
 Project: Apache Axis 2.0 (Axis2)
  Issue Type: Bug
  Components: core, om, wsdl, client-api, databinding
Affects Versions: 1.0
Reporter: Derek Foster
Priority: Blocker

 I recently noticed a big problem in how Axis2 generates XML for  XMLBeans 
 objects. It appears to be creating the wrapper element around
 an XMLBean twice, thus generating erroneous XML for a SOAP message. This 
 appears to be a big problem that would affect a lot of web services, and is 
 making it impossible for my company to use Axis2 to talk to our server.
 This error was found in the latest nightly build (September 8), but has 
 apparently been around for some time.
 I have a particular WSDL, as follows:
 ?xml version=1.0 encoding=UTF-8?
 definitions name=FDefinitions
targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:tns=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:c=http://www.c-corp.com/wsdl/2004-10-01/c;
xmlns:F=http://www.dummy-temp-address;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns=http://schemas.xmlsoap.org/wsdl/;
types
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
  xs:import namespace=http://www.dummy-temp-address; 
 schemaLocation=F.xsd/
  xs:element name=return type=xs:string/
  xs:element name=failure type=xs:string/
   /xs:schema
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/c;
  xs:element name=CPassword type=xs:string/
  xs:element name=CLogin type=xs:string/
   /xs:schema
/types
message name=FEvent
   part name=contents element=F:full/
/message
message name=FResponse
   part name=return element=tns:return/
/message
message name=CPassword
   part name=CPassword element=c:CPassword/
/message
message name=CLogin
   part name=CLogin element=c:CLogin/
/message
message name=Failure
   part name=faultDetail element=tns:failure/
/message
portType name=FPortType
   documentationF Port Type/documentation
   operation name=acceptFEvent parameterOrder=contents
  input name=acceptFEventRequest message=tns:FEvent/
  output name=acceptFEventResponse message=tns:FResponse/
  fault name=Failure message=tns:Failure/
   /operation
/portType
binding name=FSoapBinding type=tns:FPortType
   documentationF Soap Binding/documentation
   soap:binding style=document 
 transport=http://schemas.xmlsoap.org/soap/http/
   operation name=acceptFEvent
  soap:operation soapAction=acceptFEventAction/
  input
 soap:header message=tns:CLogin part=CLogin use=literal/
 soap:header message=tns:CPassword part=CPassword 
 use=literal/
 soap:body use=literal/
  /input
  output
 soap:body use=literal/
  /output
  fault name=Failure
 soap:fault name=Failure use=literal/
  /fault
   /operation
/binding
service name=FService
   documentationF Web Service/documentation
   port name=FPort binding=tns:FSoapBinding
  soap:address 
 location=http://localhost:8080/axis/services/FService/
   /port
/service
 /definitions
 My WSDL references the following XML schema:
 ?xml version=1.0 encoding=UTF-8?
 xs:schema targetNamespace=http://www.dummy-temp-address;
xmlns=http://www.dummy-temp-address;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:c=http://www.c-corp.com/schemas/c/schema_annotation;
elementFormDefault=unqualified
attributeFormDefault=unqualified
version=DRAFT
xs:element name=full type=Full/
xs:complexType name=Full
   xs:sequence
  xs:element name=message-header type=MessageHeader/
   

[jira] Commented: (AXIS2-1129) Doubled wrapper elements around XMLBeans-generated XML

2006-09-09 Thread Ajith Harshana Ranabahu (JIRA)
[ 
http://issues.apache.org/jira/browse/AXIS2-1129?page=comments#action_12433598 ] 

Ajith Harshana Ranabahu commented on AXIS2-1129:


This does seem to be a user error to me. For instance when I generated and 
tried to compile your code this line seems to be in error
final FullDocument full = Full.Factory.newInstance(); 

it should be
final FullDocument full = FullDocument.Factory.newInstance(); 

I would also recommend that you try generating the object structure rather than 
parsing the XML
something like this

 private static Full getSituation ()
throws XmlException
{
Full f = Full.Factory.newInstance();
EventReference eventReference = f.addNewEventReference();
eventReference.setEventId(blah blah);
eventReference.setResponsePlanId(blah blah);
eventReference.setUpdate(234234234);

MessageHeader messageHeader = f.addNewMessageHeader();
//set something

return f;
}

When I do that I get the proper output from toString().



 Doubled wrapper elements around XMLBeans-generated XML
 --

 Key: AXIS2-1129
 URL: http://issues.apache.org/jira/browse/AXIS2-1129
 Project: Apache Axis 2.0 (Axis2)
  Issue Type: Bug
  Components: core, om, wsdl, client-api, databinding
Affects Versions: 1.0
Reporter: Derek Foster
Priority: Blocker

 I recently noticed a big problem in how Axis2 generates XML for  XMLBeans 
 objects. It appears to be creating the wrapper element around
 an XMLBean twice, thus generating erroneous XML for a SOAP message. This 
 appears to be a big problem that would affect a lot of web services, and is 
 making it impossible for my company to use Axis2 to talk to our server.
 This error was found in the latest nightly build (September 8), but has 
 apparently been around for some time.
 I have a particular WSDL, as follows:
 ?xml version=1.0 encoding=UTF-8?
 definitions name=FDefinitions
targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:tns=http://www.c-corp.com/wsdl/2004-10-01/F;
xmlns:c=http://www.c-corp.com/wsdl/2004-10-01/c;
xmlns:F=http://www.dummy-temp-address;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns=http://schemas.xmlsoap.org/wsdl/;
types
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/F;
  xs:import namespace=http://www.dummy-temp-address; 
 schemaLocation=F.xsd/
  xs:element name=return type=xs:string/
  xs:element name=failure type=xs:string/
   /xs:schema
   xs:schema targetNamespace=http://www.c-corp.com/wsdl/2004-10-01/c;
  xs:element name=CPassword type=xs:string/
  xs:element name=CLogin type=xs:string/
   /xs:schema
/types
message name=FEvent
   part name=contents element=F:full/
/message
message name=FResponse
   part name=return element=tns:return/
/message
message name=CPassword
   part name=CPassword element=c:CPassword/
/message
message name=CLogin
   part name=CLogin element=c:CLogin/
/message
message name=Failure
   part name=faultDetail element=tns:failure/
/message
portType name=FPortType
   documentationF Port Type/documentation
   operation name=acceptFEvent parameterOrder=contents
  input name=acceptFEventRequest message=tns:FEvent/
  output name=acceptFEventResponse message=tns:FResponse/
  fault name=Failure message=tns:Failure/
   /operation
/portType
binding name=FSoapBinding type=tns:FPortType
   documentationF Soap Binding/documentation
   soap:binding style=document 
 transport=http://schemas.xmlsoap.org/soap/http/
   operation name=acceptFEvent
  soap:operation soapAction=acceptFEventAction/
  input
 soap:header message=tns:CLogin part=CLogin use=literal/
 soap:header message=tns:CPassword part=CPassword 
 use=literal/
 soap:body use=literal/
  /input
  output
 soap:body use=literal/
  /output
  fault name=Failure
 soap:fault name=Failure use=literal/
  /fault
   /operation
/binding
service name=FService
   documentationF Web Service/documentation
   port name=FPort binding=tns:FSoapBinding
  soap:address 
 location=http://localhost:8080/axis/services/FService/
   /port
/service
 /definitions
 My WSDL references the following XML schema:
 ?xml version=1.0 encoding=UTF-8?
 xs:schema targetNamespace=http://www.dummy-temp-address;
xmlns=http://www.dummy-temp-address;
xmlns:xs=http://www.w3.org/2001/XMLSchema;