Re: AXIS2 wsdl2java limitations using jibx and xmlbeans databinding
On Sun, Mar 9, 2008 at 9:09 AM, Jonathan Joseph [EMAIL PROTECTED] wrote: Dennis, The wsdl works with ADB, with the exception of the 2 part declarations in a message declaration. I plan to enter a separte bug in JIRA for the jibx/soapheader, jibx/circular imports cases that you can look at (I'll provide the wsdl). And I plan to enter a separate JIRA bug for the xmlbeans circular imports case for the xmlbeans experts. Here are my results using ADB binding: Test Case 1: adb binding: 2 parts in a message. Results: org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: More than one part for message getPriceMessage This is a problem with your wsdl. According to the Basic profile if there are multiple parts for an message, (in document style) the part which should used must be specified at the binding level. eg. wsdl:operation name=Test soap:operation soapAction=Test/ wsdl:input soap:body use=literal parts=RequestMsg/ /wsdl:input wsdl:output soap:body use=literal/ /wsdl:output /wsdl:operation thanks, Amila. Test Case 2: adb binding: circular imports: Results: OK - NO ERRORS Retrieving schema wsdl:imported from '../../../schema/StockQuoteA.xsd', relative to 'file:/C:/swdev/wsproto/quickstartadb/resources/META-INF/'. Retrieving schema at 'StockQuoteB.xsd', relative to 'file:/C:/swdev/wsproto/schema/StockQuoteA.xsd'. Retrieving schema at 'StockQuoteA.xsd', relative to 'file:/C:/swdev/wsproto/schema/StockQuoteB.xsd'. Retrieving schema wsdl:imported from '../../../schema/StockQuoteA.xsd', relative to 'file:/C:/swdev/wsproto/quickstartadb/resources/META-INF/'. Retrieving schema at 'StockQuoteB.xsd', relative to 'file:/C:/swdev/wsproto/schema/StockQuoteA.xsd'. Retrieving schema at 'StockQuoteA.xsd', relative to 'file:/C:/swdev/wsproto/schema/StockQuoteB.xsd'. Test Case 3: soap header declaration: Results: OK - NO ERRORS Thanks, Jonathan Dennis Sosnoski wrote: Hi Jonathan, Since you didn't provide the modified WSDL it's difficult to say what's going wrong with this. Does your WSDL work with ADB? I gather you're using a header part, which probably has not been tested thoroughly. If you want to enter a Jira on this I'll take a look at the JiBX handling. - Dennis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
Re: AXIS2 wsdl2java limitations using jibx and xmlbeans databinding
On Sat, Mar 8, 2008 at 3:39 AM, [EMAIL PROTECTED] wrote: I'm trying to use wsdl2java from the Axis2 v1.3 distribution to generate soap headers, and import xml schemas via either jibx or xmlbeans databinding. I've run into some limitations using wsdl2java and wanted to confirm my findings. All my tests used the StockQuoteService wsdl provided in the quickstartjibx and quickstartxmlbeans examples. 1) Test Results for more than one part element per message element: -jibx: obtained the following error. Caused by: org.apache.axis2.AxisFault: message {http://quickstart.samples/}myHeaderMessagehttp://quickstart.samples/%7DmyHeaderMessagenot found in the WSDL -xmlbeans: obtained the following error. Caused by: org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException:More than one part for message getPriceMessage This is because of the problem I mentioned earlier. 2) Test Results for Cirular imports in a wsdl, where xml schema A imports schema B, which imports the original schema A: -jibx: didn't try. xml schema is complicated. -xmlbeans: Get 'Duplicate global element' Error. Caused by: org.apache.xmlbeans.XmlException: project://local/AlertInfrastructureTransactions.xsd:14:5: error: sch-props-correct.2: Duplicate global element: [EMAIL PROTECTED] (Original global element found in file: null) Try this. When generating the code with wsdl2java tool use -Ewdc option. This would generate some dummy classes for Xml beans. Then generate the Xmlbeans classes with the scomp tool comes with the Xmlbeans distribution. Then replace the above dummy classes with the latter generated data bind classes. 3) Test Results for soap headers added to binding. -jibx: Get mapping error when soap:header ... is added to binding. Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: No mapping defined for element {http://quickstart.samples/xsd}myHeaderhttp://quickstart.samples/xsd%7DmyHeader -xmlbeans: works, as long as there is a separate 1 part message for the header. even for headers you have to specify the part of the message to be used wsdl:operation name=Test soap:operation soapAction=Test/ wsdl:input soap:body use=literal parts=RequestMsg/ soap:header use=literal part=HeaderMsg message=tns:HeaderMsg/ /wsdl:input wsdl:output soap:body use=literal/ /wsdl:output /wsdl:operation thanks, Amila. Based on these findings, I plan to use xmlbeans databinding and pass the xml documents as string parameters, then use xmlbeans to create the binding objects in the invoked service method. Has anyone run into the issues cited above or had different experiences? Thanks, Jonathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
Re: AXIS2 wsdl2java limitations using jibx and xmlbeans databinding
Correction: There is no bug to report for jbix/circular imports. Jonathan Joseph wrote: Dennis, The wsdl works with ADB, with the exception of the 2 part declarations in a message declaration. I plan to enter a separte bug in JIRA for the jibx/soapheader, jibx/circular imports cases that you can look at (I'll provide the wsdl). And I plan to enter a separate JIRA bug for the xmlbeans circular imports case for the xmlbeans experts. Here are my results using ADB binding: Test Case 1: adb binding: 2 parts in a message. Results: org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: More than one part for message getPriceMessage Test Case 2: adb binding: circular imports: Results: OK - NO ERRORS Retrieving schema wsdl:imported from '../../../schema/StockQuoteA.xsd', relative to 'file:/C:/swdev/wsproto/quickstartadb/resources/META-INF/'. Retrieving schema at 'StockQuoteB.xsd', relative to 'file:/C:/swdev/wsproto/schema/StockQuoteA.xsd'. Retrieving schema at 'StockQuoteA.xsd', relative to 'file:/C:/swdev/wsproto/schema/StockQuoteB.xsd'. Retrieving schema wsdl:imported from '../../../schema/StockQuoteA.xsd', relative to 'file:/C:/swdev/wsproto/quickstartadb/resources/META-INF/'. Retrieving schema at 'StockQuoteB.xsd', relative to 'file:/C:/swdev/wsproto/schema/StockQuoteA.xsd'. Retrieving schema at 'StockQuoteA.xsd', relative to 'file:/C:/swdev/wsproto/schema/StockQuoteB.xsd'. Test Case 3: soap header declaration: Results: OK - NO ERRORS Thanks, Jonathan Dennis Sosnoski wrote: Hi Jonathan, Since you didn't provide the modified WSDL it's difficult to say what's going wrong with this. Does your WSDL work with ADB? I gather you're using a header part, which probably has not been tested thoroughly. If you want to enter a Jira on this I'll take a look at the JiBX handling. - Dennis - 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]
Re: AXIS2 wsdl2java limitations using jibx and xmlbeans databinding
Thanks Amila for pointing out the missing 'parts' attribute in the soap:body of my wsdl:binding. 7 out of 9 of my tests are now working. Here are my results thus far using wsdl2java for ADB, JIBX, XMLBeans data bindings: ADB Binding: All my test cases are working for ADB. XMLBeans Binding: still have a problem with circular imports. -- Amila, I don't quite understand how to proceed. What is the -Ewdc option? I tried the -Ewdc wsdl2java option using the same import declaration for the xmlschema that causes circular references, and got the same error for circular imports (Duplicate global type). There were no classes, under the build/service/classes directory due to the error. I've compiled the xmlschemas via scomp, but am not sure on how to proceed. Results: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: project://local/StockQuoteA.xsd:17:5: error: sch-props-correct.2: Duplicate global type: [EMAIL PROTECTED] (Original global type found in file: null) JIBX Binding: still have problem with the 2 part message declartion (which works with ADB binding) - Test Case 1: soap header declaration, using a wsdl:part element from a wsdl:message element that contains 2 wsdl:part elements. Results: Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: No mapping defined for element {http://quickstart.samples/xsd}myHeader Relevant parts of the WSDL: wsdl:definitions xmlns:axis2=http://quickstart.samples/; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:ns=http://quickstart.samples/xsd; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; targetNamespace=http://quickstart.samples/; wsdl:types xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://quickstart.samples/xsd; xs:element name=myHeader type=xs:string/ etc. /wsdl:types wsdl:message name=getPriceMessage wsdl:part name=myHeaderMessagePart element=ns:myHeader/ wsdl:part name=part1 element=ns:getPrice/ /wsdl:message wsdl:binding name=StockQuoteServiceSOAP11Binding type=axis2:StockQuoteServicePortType soap:binding transport=http://schemas.xmlsoap.org/soap/http; style=document/ wsdl:operation name=getPrice soap:operation soapAction=urn:getPrice style=document/ wsdl:input soap:header message=axis2:getPriceMessage part=myHeaderMessagePart use=literal/ soap:body use=literal parts=part1 namespace=http://quickstart.samples// /wsdl:input etc /wsdl:binding Amila Suriarachchi wrote: On Sat, Mar 8, 2008 at 3:39 AM, [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I'm trying to use wsdl2java from the Axis2 v1.3 distribution to generate soap headers, and import xml schemas via either jibx or xmlbeans databinding. I've run into some limitations using wsdl2java and wanted to confirm my findings. All my tests used the StockQuoteService wsdl provided in the quickstartjibx and quickstartxmlbeans examples. 1) Test Results for more than one part element per message element: -jibx: obtained the following error. Caused by: org.apache.axis2.AxisFault: message {http://quickstart.samples/}myHeaderMessage http://quickstart.samples/%7DmyHeaderMessage not found in the WSDL -xmlbeans: obtained the following error. Caused by: org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: More than one part for message getPriceMessage This is because of the problem I mentioned earlier. 2) Test Results for Cirular imports in a wsdl, where xml schema A imports schema B, which imports the original schema A: -jibx: didn't try. xml schema is complicated. -xmlbeans: Get 'Duplicate global element' Error. Caused by: org.apache.xmlbeans.XmlException: project://local/AlertInfrastructureTransactions.xsd:14:5: error: sch-props-correct.2: Duplicate global element: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] (Original global element found in file: null) Try this. When generating the code with wsdl2java tool use -Ewdc option. This would generate some dummy classes for Xml beans. Then generate the Xmlbeans classes with the scomp tool comes with the Xmlbeans distribution. Then replace the above dummy classes with the latter generated data bind classes. 3) Test Results for soap headers added to binding. -jibx: Get mapping error when soap:header ... is added to binding. Exception in thread
Re: AXIS2 wsdl2java limitations using jibx and xmlbeans databinding
On Mon, Mar 10, 2008 at 6:14 AM, Jonathan Joseph [EMAIL PROTECTED] wrote: Thanks Amila for pointing out the missing 'parts' attribute in the soap:body of my wsdl:binding. 7 out of 9 of my tests are now working. Here are my results thus far using wsdl2java for ADB, JIBX, XMLBeans data bindings: ADB Binding: All my test cases are working for ADB. XMLBeans Binding: still have a problem with circular imports. -- Amila, I don't quite understand how to proceed. What is the -Ewdc option? I tried the -Ewdc wsdl2java option using the same import declaration for the xmlschema that causes circular references, and got the same error for circular imports (Duplicate global type). Sorry I forgot to mention. This feature only available with the nightly builds. I added this feature after Axis2 1.3. There were no classes, under the build/service/classes directory due to the error. I've compiled the xmlschemas via scomp, but am not sure on how to proceed. if you use a nightly build then when you use the -Ewdc with wsdl2java tool it would generate the code with some dummy classes for XMLbeans data binding. Then you can replace these classes with the above generated code. thanks, Amila. Results: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: project://local/StockQuoteA.xsd:17:5: error: sch-props-correct.2: Duplicate global type: [EMAIL PROTECTED] (Original global type found in file: null) JIBX Binding: still have problem with the 2 part message declartion (which works with ADB binding) - Test Case 1: soap header declaration, using a wsdl:part element from a wsdl:message element that contains 2 wsdl:part elements. Results: Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: No mapping defined for element {http://quickstart.samples/xsd}myHeaderhttp://quickstart.samples/xsd%7DmyHeader Relevant parts of the WSDL: wsdl:definitions xmlns:axis2=http://quickstart.samples/; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:ns=http://quickstart.samples/xsd; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; targetNamespace=http://quickstart.samples/; wsdl:types xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://quickstart.samples/xsd; xs:element name=myHeader type=xs:string/ etc. /wsdl:types wsdl:message name=getPriceMessage wsdl:part name=myHeaderMessagePart element=ns:myHeader/ wsdl:part name=part1 element=ns:getPrice/ /wsdl:message wsdl:binding name=StockQuoteServiceSOAP11Binding type=axis2:StockQuoteServicePortType soap:binding transport=http://schemas.xmlsoap.org/soap/http; style=document/ wsdl:operation name=getPrice soap:operation soapAction=urn:getPrice style=document/ wsdl:input soap:header message=axis2:getPriceMessage part=myHeaderMessagePart use=literal/ soap:body use=literal parts=part1 namespace=http://quickstart.samples// /wsdl:input etc /wsdl:binding Amila Suriarachchi wrote: On Sat, Mar 8, 2008 at 3:39 AM, [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I'm trying to use wsdl2java from the Axis2 v1.3 distribution to generate soap headers, and import xml schemas via either jibx or xmlbeans databinding. I've run into some limitations using wsdl2java and wanted to confirm my findings. All my tests used the StockQuoteService wsdl provided in the quickstartjibx and quickstartxmlbeans examples. 1) Test Results for more than one part element per message element: -jibx: obtained the following error. Caused by: org.apache.axis2.AxisFault: message {http://quickstart.samples/}myHeaderMessagehttp://quickstart.samples/%7DmyHeaderMessage http://quickstart.samples/%7DmyHeaderMessage not found in the WSDL -xmlbeans: obtained the following error. Caused by: org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: More than one part for message getPriceMessage This is because of the problem I mentioned earlier. 2) Test Results for Cirular imports in a wsdl, where xml schema A imports schema B, which imports the original schema A: -jibx: didn't try. xml schema is complicated. -xmlbeans: Get 'Duplicate global element' Error. Caused by: org.apache.xmlbeans.XmlException: project://local/AlertInfrastructureTransactions.xsd:14:5: error:
Re: AXIS2 wsdl2java limitations using jibx and xmlbeans databinding
Dennis, The wsdl works with ADB, with the exception of the 2 part declarations in a message declaration. I plan to enter a separte bug in JIRA for the jibx/soapheader, jibx/circular imports cases that you can look at (I'll provide the wsdl). And I plan to enter a separate JIRA bug for the xmlbeans circular imports case for the xmlbeans experts. Here are my results using ADB binding: Test Case 1: adb binding: 2 parts in a message. Results: org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: More than one part for message getPriceMessage Test Case 2: adb binding: circular imports: Results: OK - NO ERRORS Retrieving schema wsdl:imported from '../../../schema/StockQuoteA.xsd', relative to 'file:/C:/swdev/wsproto/quickstartadb/resources/META-INF/'. Retrieving schema at 'StockQuoteB.xsd', relative to 'file:/C:/swdev/wsproto/schema/StockQuoteA.xsd'. Retrieving schema at 'StockQuoteA.xsd', relative to 'file:/C:/swdev/wsproto/schema/StockQuoteB.xsd'. Retrieving schema wsdl:imported from '../../../schema/StockQuoteA.xsd', relative to 'file:/C:/swdev/wsproto/quickstartadb/resources/META-INF/'. Retrieving schema at 'StockQuoteB.xsd', relative to 'file:/C:/swdev/wsproto/schema/StockQuoteA.xsd'. Retrieving schema at 'StockQuoteA.xsd', relative to 'file:/C:/swdev/wsproto/schema/StockQuoteB.xsd'. Test Case 3: soap header declaration: Results: OK - NO ERRORS Thanks, Jonathan Dennis Sosnoski wrote: Hi Jonathan, Since you didn't provide the modified WSDL it's difficult to say what's going wrong with this. Does your WSDL work with ADB? I gather you're using a header part, which probably has not been tested thoroughly. If you want to enter a Jira on this I'll take a look at the JiBX handling. - Dennis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AXIS2 wsdl2java limitations using jibx and xmlbeans databinding
I'm trying to use wsdl2java from the Axis2 v1.3 distribution to generate soap headers, and import xml schemas via either jibx or xmlbeans databinding. I've run into some limitations using wsdl2java and wanted to confirm my findings. All my tests used the StockQuoteService wsdl provided in the quickstartjibx and quickstartxmlbeans examples. 1) Test Results for more than one part element per message element: -jibx: obtained the following error. Caused by: org.apache.axis2.AxisFault: message {http://quickstart.samples/}myHeaderMessage not found in the WSDL -xmlbeans: obtained the following error. Caused by: org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: More than one part for message getPriceMessage 2) Test Results for Cirular imports in a wsdl, where xml schema A imports schema B, which imports the original schema A: -jibx: didn't try. xml schema is complicated. -xmlbeans: Get 'Duplicate global element' Error. Caused by: org.apache.xmlbeans.XmlException: project://local/AlertInfrastructureTransactions.xsd:14:5: error: sch-props-correct.2: Duplicate global element: [EMAIL PROTECTED] (Original global element found in file: null) 3) Test Results for soap headers added to binding. -jibx: Get mapping error when soap:header ... is added to binding. Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: No mapping defined for element {http://quickstart.samples/xsd}myHeader -xmlbeans: works, as long as there is a separate 1 part message for the header. Based on these findings, I plan to use xmlbeans databinding and pass the xml documents as string parameters, then use xmlbeans to create the binding objects in the invoked service method. Has anyone run into the issues cited above or had different experiences? Thanks, Jonathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AXIS2 wsdl2java limitations using jibx and xmlbeans databinding
Hi Jonathan, Since you didn't provide the modified WSDL it's difficult to say what's going wrong with this. Does your WSDL work with ADB? I gather you're using a header part, which probably has not been tested thoroughly. If you want to enter a Jira on this I'll take a look at the JiBX handling. - Dennis -- Dennis M. Sosnoski SOA and Web Services in Java Axis2 Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 [EMAIL PROTECTED] wrote: I'm trying to use wsdl2java from the Axis2 v1.3 distribution to generate soap headers, and import xml schemas via either jibx or xmlbeans databinding. I've run into some limitations using wsdl2java and wanted to confirm my findings. All my tests used the StockQuoteService wsdl provided in the quickstartjibx and quickstartxmlbeans examples. 1) Test Results for more than one part element per message element: -jibx: obtained the following error. Caused by: org.apache.axis2.AxisFault: message {http://quickstart.samples/}myHeaderMessage not found in the WSDL -xmlbeans: obtained the following error. Caused by: org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: More than one part for message getPriceMessage 2) Test Results for Cirular imports in a wsdl, where xml schema A imports schema B, which imports the original schema A: -jibx: didn't try. xml schema is complicated. -xmlbeans: Get 'Duplicate global element' Error. Caused by: org.apache.xmlbeans.XmlException: project://local/AlertInfrastructureTransactions.xsd:14:5: error: sch-props-correct.2: Duplicate global element: [EMAIL PROTECTED] (Original global element found in file: null) 3) Test Results for soap headers added to binding. -jibx: Get mapping error when soap:header ... is added to binding. Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: No mapping defined for element {http://quickstart.samples/xsd}myHeader -xmlbeans: works, as long as there is a separate 1 part message for the header. Based on these findings, I plan to use xmlbeans databinding and pass the xml documents as string parameters, then use xmlbeans to create the binding objects in the invoked service method. Has anyone run into the issues cited above or had different experiences? Thanks, Jonathan - 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]