Importing external schema in WSDL
I know this has been a topic several times before, but I don't see as it's fixed. I am using axis2 1.2 in Tomcat 5.5.23 on MacOSX 10.4.10. I have a WSDL schema, which imports a schema, which imports a schema, which imports many schemas After the first import, the schemas use relative URLs. These are public external schemas and are not under my control. So it is not possible to use absolute urls. I get the error: 2007-08-20 15:46:44,376 ERROR WSDL11ToAxisServiceBuilder.populateService.294 - javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/schema/xs:schema/xsd:schema): faultCode=OTHER_ERROR: Unable to locate with a locator the schema referenced at '../../gml/3.1.1/base/geometryAggregates.xsd' relative to document base 'http://schemas.opengis.net/filter/1.1.0/filter.xsd' I just tried upgrading to 1.3, and I don't see the error, but I think that is more likely because my logging is broken. In both cases, trying to get the wsdl using the ?wsdl command returns the error that axis cannot generate the wsdl, even though I have useOriginalwsdl set to true. attached is the WSDL. How do I proceed here? thanks, Linus ?xml version=1.0 encoding=UTF-8? wsdl:definitions targetNamespace=http://www.iris.edu/phasepick/xsd; xmlns:phase=http://www.iris.edu/phasepick/xsd; xmlns:ws=http://www.iris.edu/ws/xsd; xmlns:esdp=http://portal.earthscope.org; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; wsdl:types schema elementFormDefault=qualified targetNamespace=http://www.iris.edu/phasepick/xsd; xmlns=http://www.w3.org/2001/XMLSchema; import namespace=http://portal.earthscope.org; schemaLocation=http://www.iris.edu/schema/esdp/esdp.xsd/ include schemaLocation=http://www.iris.edu/schema/common/xml/coreDataTypes.xsd; / annotation documentationQuery Types/documentation /annotation complexType name=EventQueryType sequence element name=dateRange type=phase:DateRangeType/ element name=areaBox type=phase:AreaBoxType/ element name=magQuery type=phase:MagnitudeQuery minOccurs=0/ element name=depthRange type=phase:DepthRangeType/ element name=author type=string minOccurs=0 / element name=contributor type=string minOccurs=0/ /sequence /complexType complexType name=DateRangeType sequence element name=startDate type=dateTime/ element name=stopDate type=dateTime/ /sequence /complexType complexType name=AreaBoxType sequence element name=minLat type=double/ element name=maxLat type=double/ element name=minLon type=double/ element name=maxLon type=double/ /sequence /complexType complexType name=MagnitudeQuery sequence element name=magType type=string/ element name=minMag type=double/ element name=maxMag type=double/ element name=includeUnknowns type=boolean/ /sequence /complexType complexType name=DepthRangeType sequence element name=units type=string/ element name=minDepth type=double/ element name=maxDepth type=double/ /sequence /complexType complexType name=IteratorInfoType sequence element name=key type=long/ element name=startPosition type=int/ element name=batchSize type=int/ element name=totalCount type=int / /sequence /complexType complexType name=PhaseQueryReturnType sequence element name=Iterator type=phase:IteratorInfoType minOccurs=0 nillable=true/ element name=Event type=ws:EventType minOccurs=0 maxOccurs=unbounded/ /sequence /complexType simpleType name=DownloadFormatType restriction base=string enumeration value=CSV/ enumeration value=ISF/ enumeration value=XML/ /restriction /simpleType
Re: Reference to external schema in wsdl broken
Take the generated WSDL, edit the schema location to specify the absolute URL, and redeploy the service with your modified WSDL. Anne On 8/17/07, Jochen Rieß [EMAIL PROTECTED] wrote: Hello everybody. I'm facing a little problem with the codegen tool in Axis2 1.3 My wsdl file imports a schema, code snippet follows: xsd:schema xmlns=http://www.w3.org/2001/XMLSchema; targetNamespace=http://gueter.evision.de/GueterGUI/; xsd:include schemaLocation=datatypes.xsd /xsd:include [..] Using the codegen tool provides me with a modified wsdl which looks like.. xsd:schema targetNamespace=http://gueter.evision.de/GueterGUI/; xmlns=http://www.w3.org/2001/XMLSchema; xsd:include schemaLocation=xsd0.xsd /xsd:include [..] The schema has been properly copied into xsd0.xsd. Everything right until I deploy the service.. When getting the wsdl from the running axis2 instance it looks like: xsd:schema attributeFormDefault=unqualified elementFormDefault=unqualified targetNamespace=http://gueter.evision.de/GueterGUI/; xsd:include schemaLocation=GueterGUI?xsd=xsd0/ [...] Using this wsdl one cannot generate code, because the schemaLocation is relative to the service location. (In the codegen process the schema cannot be found) Replacing the last line with an absolute url pointing to the schema fixes that problem. My Question is: What can I do to have the wsdl file sent by the running axis2 instance be able to compile out of the box? Thanks in advance! Jochen Rieß - 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]
Reference to external schema in wsdl broken
Hello everybody. I'm facing a little problem with the codegen tool in Axis2 1.3 My wsdl file imports a schema, code snippet follows: xsd:schema xmlns=http://www.w3.org/2001/XMLSchema; targetNamespace=http://gueter.evision.de/GueterGUI/; xsd:include schemaLocation=datatypes.xsd /xsd:include [..] Using the codegen tool provides me with a modified wsdl which looks like.. xsd:schema targetNamespace=http://gueter.evision.de/GueterGUI/; xmlns=http://www.w3.org/2001/XMLSchema; xsd:include schemaLocation=xsd0.xsd /xsd:include [..] The schema has been properly copied into xsd0.xsd. Everything right until I deploy the service.. When getting the wsdl from the running axis2 instance it looks like: xsd:schema attributeFormDefault=unqualified elementFormDefault=unqualified targetNamespace=http://gueter.evision.de/GueterGUI/; xsd:include schemaLocation=GueterGUI?xsd=xsd0/ [...] Using this wsdl one cannot generate code, because the schemaLocation is relative to the service location. (In the codegen process the schema cannot be found) Replacing the last line with an absolute url pointing to the schema fixes that problem. My Question is: What can I do to have the wsdl file sent by the running axis2 instance be able to compile out of the box? Thanks in advance! Jochen Rieß - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [AXIS2] Importing a external schema in WSDL
I had the same issue. But this issue looks like only related to the new release (1.1.1 and 1.2), and if you use release 1.1, everything seems to work fine, except that it cannot generate wsdl, but the service works fine though dharmendra3 [EMAIL PROTECTED] 6/14/2007 8:50 AM Iam using Axis2 1.1.1 and OS is windows XP. We are creating our own war file. Its actually some WarBasedConfigurator which is not able to locate the .xsd file. Did you try with the wsdl ans xsd that I have sent. Do I need to make any changes to them. Ineed to resolve it asap. Amila Suriarachchi wrote: what is the axis2 version and the OS you use? I generated the code with full path and it worked fine. and it sets the paths in saved wsdl and schema files as well. On 6/11/07, dharmendra3 [EMAIL PROTECTED] wrote: i have attached the xsd and the wsdl files. Amila Suriarachchi wrote: can you send your wsdl and your xsd files? On 6/7/07, dharmendra3 [EMAIL PROTECTED] wrote: When I try to import a schema with relative url,wsdl2ava is working fine but deployment is causing the problem saying that its not able to find the xsd file (It looks for xsd file from the domain root). If I use absolute url (schemalocation) wsdl2java is failing. Is this a bug with the wsdl4j,how can I resolve this. -- View this message in context: http://www.nabble.com/-AXIS2---Importing-a-external-schema-in-WSDL-tf3884021.html#a11008452 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc. http://www.nabble.com/file/p11062282/transporter.xsd transporter.xsd http://www.nabble.com/file/p11062282/PoetManagementService.wsdl PoetManagementService.wsdl -- View this message in context: http://www.nabble.com/-AXIS2---Importing-a-external-schema-in-WSDL-tf3884021.html#a11062282 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc. -- View this message in context: http://www.nabble.com/-AXIS2---Importing-a-external-schema-in-WSDL-tf3884021.html#a11121505 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The information contained in this electronic communication and any document attached hereto or transmitted herewith is confidential and intended for the exclusive use of the individual or entity named above. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any examination, use, dissemination, distribution or copying of this communication or any part thereof is strictly prohibited. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this communication. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [AXIS2] Importing a external schema in WSDL
Iam trying to deploy it in weblogic. It gives me the same error saying that xsd0.xsd not found under domain root. is it because of weblogic. do i have to make any changes to my classpath. Iam using the latest release axis2-1.2 mgainty wrote: I agree with Ajith-- so in this situation xs:include schemaLocation=./Whatever.xsd/ make sure you have validated the Whatever.xsd beforehand http://www.w3schools.com/dom/dom_validate.asp M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Ajith Ranabahu [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Saturday, June 16, 2007 12:03 AM Subject: Re: [AXIS2] Importing a external schema in WSDL Hi, I have to admit that we had some problems with relative imports in some *previous* releases. However the absolute URL's case always worked. So here are somethings you can try 1. Try using the latest release. Since it seems to work without a problem for us its worth to try in your setting. 2. Please check whether you have any network restrictions, perhaps the personal firewall ? Best thing is to see whether you can access the URL by some other means, may be the browser. However this is not a fool proof method since personal firewalls are likely to have exceptions for programs such as the browser. 3. If non of this work a somewhat dirty solution would be to inline the schemas in the WSDL. Ajith On 6/15/07, dharmendra3 [EMAIL PROTECTED] wrote: Anyone had sucess using schema imports in wsdl. if I use relative url(shema import) my deployment complains and if i use absolute url for schema location wsdl2java fails. DeploymentEngine complains that its not able to find the xsd file. Iam loosing my patience here. Iam assuming that axis2 does not support a basic feature of importing schemas in the wsdl. dharmendra3 wrote: When I try to import a schema with relative url,wsdl2ava is working fine but deployment is causing the problem saying that its not able to find the xsd file (It looks for xsd file from the domain root). If I use absolute url (schemalocation) wsdl2java is failing. Is this a bug with the wsdl4j,how can I resolve this. -- View this message in context: http://www.nabble.com/-AXIS2---Importing-a-external-schema-in-WSDL-tf3884021.html#a11150477 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ajith Ranabahu - 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] -- View this message in context: http://www.nabble.com/-AXIS2---Importing-a-external-schema-in-WSDL-tf3884021.html#a11166907 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [AXIS2] Importing a external schema in WSDL
Anyone had sucess using schema imports in wsdl. if I use relative url(shema import) my deployment complains and if i use absolute url for schema location wsdl2java fails. DeploymentEngine complains that its not able to find the xsd file. Iam loosing my patience here. Iam assuming that axis2 does not support a basic feature of importing schemas in the wsdl. dharmendra3 wrote: When I try to import a schema with relative url,wsdl2ava is working fine but deployment is causing the problem saying that its not able to find the xsd file (It looks for xsd file from the domain root). If I use absolute url (schemalocation) wsdl2java is failing. Is this a bug with the wsdl4j,how can I resolve this. -- View this message in context: http://www.nabble.com/-AXIS2---Importing-a-external-schema-in-WSDL-tf3884021.html#a11150477 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [AXIS2] Importing a external schema in WSDL
Hi, I have to admit that we had some problems with relative imports in some *previous* releases. However the absolute URL's case always worked. So here are somethings you can try 1. Try using the latest release. Since it seems to work without a problem for us its worth to try in your setting. 2. Please check whether you have any network restrictions, perhaps the personal firewall ? Best thing is to see whether you can access the URL by some other means, may be the browser. However this is not a fool proof method since personal firewalls are likely to have exceptions for programs such as the browser. 3. If non of this work a somewhat dirty solution would be to inline the schemas in the WSDL. Ajith On 6/15/07, dharmendra3 [EMAIL PROTECTED] wrote: Anyone had sucess using schema imports in wsdl. if I use relative url(shema import) my deployment complains and if i use absolute url for schema location wsdl2java fails. DeploymentEngine complains that its not able to find the xsd file. Iam loosing my patience here. Iam assuming that axis2 does not support a basic feature of importing schemas in the wsdl. dharmendra3 wrote: When I try to import a schema with relative url,wsdl2ava is working fine but deployment is causing the problem saying that its not able to find the xsd file (It looks for xsd file from the domain root). If I use absolute url (schemalocation) wsdl2java is failing. Is this a bug with the wsdl4j,how can I resolve this. -- View this message in context: http://www.nabble.com/-AXIS2---Importing-a-external-schema-in-WSDL-tf3884021.html#a11150477 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [AXIS2] Importing a external schema in WSDL
what is the axis2 version and the OS you use? I generated the code with full path and it worked fine. and it sets the paths in saved wsdl and schema files as well. On 6/11/07, dharmendra3 [EMAIL PROTECTED] wrote: i have attached the xsd and the wsdl files. Amila Suriarachchi wrote: can you send your wsdl and your xsd files? On 6/7/07, dharmendra3 [EMAIL PROTECTED] wrote: When I try to import a schema with relative url,wsdl2ava is working fine but deployment is causing the problem saying that its not able to find the xsd file (It looks for xsd file from the domain root). If I use absolute url (schemalocation) wsdl2java is failing. Is this a bug with the wsdl4j,how can I resolve this. -- View this message in context: http://www.nabble.com/-AXIS2---Importing-a-external-schema-in-WSDL-tf3884021.html#a11008452 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc. http://www.nabble.com/file/p11062282/transporter.xsd transporter.xsd http://www.nabble.com/file/p11062282/PoetManagementService.wsdl PoetManagementService.wsdl -- View this message in context: http://www.nabble.com/-AXIS2---Importing-a-external-schema-in-WSDL-tf3884021.html#a11062282 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
Re: [AXIS2] Importing a external schema in WSDL
Iam using Axis2 1.1.1 and OS is windows XP. We are creating our own war file. Its actually some WarBasedConfigurator which is not able to locate the .xsd file. Did you try with the wsdl ans xsd that I have sent. Do I need to make any changes to them. Ineed to resolve it asap. Amila Suriarachchi wrote: what is the axis2 version and the OS you use? I generated the code with full path and it worked fine. and it sets the paths in saved wsdl and schema files as well. On 6/11/07, dharmendra3 [EMAIL PROTECTED] wrote: i have attached the xsd and the wsdl files. Amila Suriarachchi wrote: can you send your wsdl and your xsd files? On 6/7/07, dharmendra3 [EMAIL PROTECTED] wrote: When I try to import a schema with relative url,wsdl2ava is working fine but deployment is causing the problem saying that its not able to find the xsd file (It looks for xsd file from the domain root). If I use absolute url (schemalocation) wsdl2java is failing. Is this a bug with the wsdl4j,how can I resolve this. -- View this message in context: http://www.nabble.com/-AXIS2---Importing-a-external-schema-in-WSDL-tf3884021.html#a11008452 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc. http://www.nabble.com/file/p11062282/transporter.xsd transporter.xsd http://www.nabble.com/file/p11062282/PoetManagementService.wsdl PoetManagementService.wsdl -- View this message in context: http://www.nabble.com/-AXIS2---Importing-a-external-schema-in-WSDL-tf3884021.html#a11062282 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc. -- View this message in context: http://www.nabble.com/-AXIS2---Importing-a-external-schema-in-WSDL-tf3884021.html#a11121505 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [AXIS2] Importing a external schema in WSDL
can you send your wsdl and your xsd files? On 6/7/07, dharmendra3 [EMAIL PROTECTED] wrote: When I try to import a schema with relative url,wsdl2ava is working fine but deployment is causing the problem saying that its not able to find the xsd file (It looks for xsd file from the domain root). If I use absolute url (schemalocation) wsdl2java is failing. Is this a bug with the wsdl4j,how can I resolve this. -- View this message in context: http://www.nabble.com/-AXIS2---Importing-a-external-schema-in-WSDL-tf3884021.html#a11008452 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
RE: Importing Schema in WSDL
any luck with that. Iam also facing the same problem snehil wrote: I am using Axis2 1.2. _ From: keith chapman [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 30, 2007 2:37 PM To: axis-user@ws.apache.org Subject: Re: Importing Schema in WSDL Which version of axis are you using? Thanks, Keith. On 5/30/07, snehil Brajpuriya [EMAIL PROTECTED] wrote: Hi, I am importing ince scema in WSDL. Imported Scema inturn import some other schemas. They all are in propr location.FOlowing is the part of WSDL which imports schema - -- wsdl:types xsd:schema targetNamespace=urn:ifxforum-org:WSDL:1:PortType:types xmlns:ifx=urn:ifxforum-org:XSD:1 xmlns:xsd= http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema; elementFormDefault=qualified xsd:import namespace=urn:ifxforum-org:XSD:1 schemaLocation=IFX170.xsd/ xsd:element name=DoIFXRq xsd:complexType xsd:sequence xsd:element ref=ifx:IFX / /xsd:sequence /xsd:complexType /xsd:element xsd:element name=DoIFXRs xsd:complexType xsd:sequence xsd:element ref=ifx:IFX / /xsd:sequence /xsd:complexType /xsd:element /xsd:schema /wsdl:types However when trying to create Java code from this WSDL I am getting errors - - generate.service: [wsdl2java] Retrieving schema at 'IFX170_XSD.xsd', relative to 'file:/C:/axis2/s amples/IFX/resources/META-INF/'. [wsdl2java] Retrieving schema at 'RemitDetail_Type.xsd', relative to 'file:/C:/a xis2/samples/IFX/resources/META-INF/IFX170_XSD.xsd'. BUILD FAILED C:\axis2\samples\IFX\build.xml:56: org.apache.axis2.wsdl.codegen.CodeGenerationE xception: Error parsing WSDL Error I am getting seems to be to generic. All files are present in the correct location. How can i get the exact point of error. Thanks Snehil -- Keith Chapman WSO2 Inc. Oxygen for Web Services Developers. http://wso2.org/ http://www.patni.com World-Wide Partnerships. World-Class Solutions. _ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _ -- View this message in context: http://www.nabble.com/Importing-Schema-in-WSDL-tf3838605.html#a10975715 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Importing Schema in WSDL
Hi, I am importing ince scema in WSDL. Imported Scema inturn import some other schemas. They all are in propr location.FOlowing is the part of WSDL which imports schema - -- wsdl:types xsd:schema targetNamespace=urn:ifxforum-org:WSDL:1:PortType:types xmlns:ifx=urn:ifxforum-org:XSD:1 xmlns:xsd=http://www.w3.org/2001/XMLSchema; elementFormDefault=qualified xsd:import namespace=urn:ifxforum-org:XSD:1 schemaLocation=IFX170.xsd/ xsd:element name=DoIFXRq xsd:complexType xsd:sequence xsd:element ref=ifx:IFX / /xsd:sequence /xsd:complexType /xsd:element xsd:element name=DoIFXRs xsd:complexType xsd:sequence xsd:element ref=ifx:IFX / /xsd:sequence /xsd:complexType /xsd:element /xsd:schema /wsdl:types However when trying to create Java code from this WSDL I am getting errors - - generate.service: [wsdl2java] Retrieving schema at 'IFX170_XSD.xsd', relative to 'file:/C:/axis2/s amples/IFX/resources/META-INF/'. [wsdl2java] Retrieving schema at 'RemitDetail_Type.xsd', relative to 'file:/C:/a xis2/samples/IFX/resources/META-INF/IFX170_XSD.xsd'. BUILD FAILED C:\axis2\samples\IFX\build.xml:56: org.apache.axis2.wsdl.codegen.CodeGenerationE xception: Error parsing WSDL Error I am getting seems to be to generic. All files are present in the correct location. How can i get the exact point of error. Thanks Snehil
Re: Importing Schema in WSDL
Which version of axis are you using? Thanks, Keith. On 5/30/07, snehil Brajpuriya [EMAIL PROTECTED] wrote: Hi, I am importing ince scema in WSDL. Imported Scema inturn import some other schemas. They all are in propr location.FOlowing is the part of WSDL which imports schema - -- wsdl:types xsd:schema targetNamespace=urn:ifxforum-org:WSDL:1:PortType:types xmlns:ifx=urn:ifxforum-org:XSD:1 xmlns:xsd= http://www.w3.org/2001/XMLSchema; elementFormDefault=qualified xsd:import namespace=urn:ifxforum-org:XSD:1 schemaLocation=IFX170.xsd/ xsd:element name=DoIFXRq xsd:complexType xsd:sequence xsd:element ref=ifx:IFX / /xsd:sequence /xsd:complexType /xsd:element xsd:element name=DoIFXRs xsd:complexType xsd:sequence xsd:element ref=ifx:IFX / /xsd:sequence /xsd:complexType /xsd:element /xsd:schema /wsdl:types However when trying to create Java code from this WSDL I am getting errors - - generate.service: [wsdl2java] Retrieving schema at 'IFX170_XSD.xsd', relative to 'file:/C:/axis2/s amples/IFX/resources/META-INF/'. [wsdl2java] Retrieving schema at 'RemitDetail_Type.xsd', relative to 'file:/C:/a xis2/samples/IFX/resources/META-INF/IFX170_XSD.xsd'. BUILD FAILED C:\axis2\samples\IFX\build.xml:56: org.apache.axis2.wsdl.codegen.CodeGenerationE xception: Error parsing WSDL Error I am getting seems to be to generic. All files are present in the correct location. How can i get the exact point of error. Thanks Snehil -- Keith Chapman WSO2 Inc. Oxygen for Web Services Developers. http://wso2.org/
RE: Importing Schema in WSDL
I am using Axis2 1.2. _ From: keith chapman [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 30, 2007 2:37 PM To: axis-user@ws.apache.org Subject: Re: Importing Schema in WSDL Which version of axis are you using? Thanks, Keith. On 5/30/07, snehil Brajpuriya [EMAIL PROTECTED] wrote: Hi, I am importing ince scema in WSDL. Imported Scema inturn import some other schemas. They all are in propr location.FOlowing is the part of WSDL which imports schema - -- wsdl:types xsd:schema targetNamespace=urn:ifxforum-org:WSDL:1:PortType:types xmlns:ifx=urn:ifxforum-org:XSD:1 xmlns:xsd= http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema; elementFormDefault=qualified xsd:import namespace=urn:ifxforum-org:XSD:1 schemaLocation=IFX170.xsd/ xsd:element name=DoIFXRq xsd:complexType xsd:sequence xsd:element ref=ifx:IFX / /xsd:sequence /xsd:complexType /xsd:element xsd:element name=DoIFXRs xsd:complexType xsd:sequence xsd:element ref=ifx:IFX / /xsd:sequence /xsd:complexType /xsd:element /xsd:schema /wsdl:types However when trying to create Java code from this WSDL I am getting errors - - generate.service: [wsdl2java] Retrieving schema at 'IFX170_XSD.xsd', relative to 'file:/C:/axis2/s amples/IFX/resources/META-INF/'. [wsdl2java] Retrieving schema at 'RemitDetail_Type.xsd', relative to 'file:/C:/a xis2/samples/IFX/resources/META-INF/IFX170_XSD.xsd'. BUILD FAILED C:\axis2\samples\IFX\build.xml:56: org.apache.axis2.wsdl.codegen.CodeGenerationE xception: Error parsing WSDL Error I am getting seems to be to generic. All files are present in the correct location. How can i get the exact point of error. Thanks Snehil -- Keith Chapman WSO2 Inc. Oxygen for Web Services Developers. http://wso2.org/ http://www.patni.com World-Wide Partnerships. World-Class Solutions. _ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _
How to use AXIS 1.4 API to parse schema in WSDL
Hi, I tried to use AXIS APIs to parse schema in WSDL document, but I can not figure out how to use these APIs. Could anyone refer some documents how to use these APIs? Many thanks in advance. best regards donald
Re: How to use AXIS 1.4 API to parse schema in WSDL
See http://svn.apache.org/viewvc/webservices/axis/trunk/java/samples/client/ for example. -- dims On 1/26/07, donald yang [EMAIL PROTECTED] wrote: Hi, I tried to use AXIS APIs to parse schema in WSDL document, but I can not figure out how to use these APIs. Could anyone refer some documents how to use these APIs? Many thanks in advance. best regards donald -- Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Axis2 - schema and WSDL
Thilina, thank you for writing. I have a dumb question. What is DII API? I can't seem to find it in the document. Thank you again. Danny -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: Monday, December 25, 2006 11:35 PM To: axis-user@ws.apache.org Subject: Re: Axis2 - schema and WSDL Srinath had this[1] blog entry some time back which contains the use of XMLBeans generated code with the Axis 2 DII api... Seems like it is addresses your problem.. Also have a look at the databinding sample which comes with Axis2.. (Axis2/modules/samples/databinding).. It's bit more complex than the above and shows how users can plug in data binding frameworks easily.. Thanks, Thilina [1]http://www.bloglines.com/blog/hemapani?id=99 On 12/24/06, Ajith Ranabahu [EMAIL PROTECTED] wrote: Hi, XMLBeans can compile the schema into a set of classes that maps a schema to a class and also includes the code to convert a instance XML to an object instance (vice versa). This is what we call databinding However when you want to build a service it needs the plumbing code to get the XML message from the SOAP framework and do all the things that is specific to your framework. This code cannot be generated just by looking at the schema!. That is why you need the WSDL. This way of writing services is known as the 'contract first' and since you have the schema I think contract first way is the right way for you Ajith On 12/23/06, Danny Lin [EMAIL PROTECTED] wrote: Thank you, Ajith, for responding. I am very new to Web Services and Axis2. I was doing some reading yesterday and found out that XMLBeans has utility to convert XSD to Java. If I generate Java code with XMLBeans, will I be able to produce correct web service message that's in compliance with the schema I give? Or, I still need to have WSDL in order to make it to work? Thanks again. Danny -Original Message- From: Ajith Ranabahu [mailto:[EMAIL PROTECTED] Sent: Friday, December 22, 2006 7:32 PM To: axis-user@ws.apache.org Subject: Re: Axis2 - schema and WSDL Hi, Yes - right now the tools available in Axis2 does not let you directly convert a schema into a web service so you will have to make a WSDL document that uses that schema. However making a doc/lit WSDL using your schema is quite simple and straight forward. I have included a simple format you can follow definitions targetNamespace=xx' xmlns:tns=xx !-- don't forget the other namespaces in the parent !! -- types schema !-- import your schema here -- /schema /types !-- define two messages - one for input and one for output the names really does not matter since they are only used for reference -- message name=input part element=yourInputMessageElement name=part1/ /message message name=output part element=yourInputMessageElement name=part1/ /message portType name=YourPorttypeName operation name=yourOperationName input message=tns:input name=in/ output message=tns:output name=out/ /operation /portType binding name=yourBinding type=tns:YourPorttypeName soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ operation name=yourOperationName soap:operation soapAction=http://soapinterop.org/; style=document/ input name=in soap:body use=literal/ /input output name=out soap:body use=literal/ /output /operation /binding service name=yourServiceName port binding=tns:yourBinding name=yourPort soap:address location=http://some-dummy-address/ /port /service /definitions Note that the names of the portTypes bindings etc can be anything but the generated classes do reflect them. Say the generated java classs will contain the methods with the operation names. HTH Ajith On 12/22/06, Danny Lin [EMAIL PROTECTED] wrote: We are limited to use a pre-defined schema to create a web service. I have the schema as well as an sample XML document. What should I do next to create a web service in Axis2? I've read through all the sample codes but I couldn't find one that directs me from this path of development. Do I need to manually create a WSDL from this schema then use the wsdl2java tool to generate a stub? Thanks. -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL
Re: Axis2 - schema and WSDL
Ooops... Apologies for the acronyms.. DII - Dynamic Invocation Interface... In simpler words it's the Service Client and the OperationClient... ~Thilina On 12/26/06, Danny Lin [EMAIL PROTECTED] wrote: Thilina, thank you for writing. I have a dumb question. What is DII API? I can't seem to find it in the document. Thank you again. Danny -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: Monday, December 25, 2006 11:35 PM To: axis-user@ws.apache.org Subject: Re: Axis2 - schema and WSDL Srinath had this[1] blog entry some time back which contains the use of XMLBeans generated code with the Axis 2 DII api... Seems like it is addresses your problem.. Also have a look at the databinding sample which comes with Axis2.. (Axis2/modules/samples/databinding).. It's bit more complex than the above and shows how users can plug in data binding frameworks easily.. Thanks, Thilina [1]http://www.bloglines.com/blog/hemapani?id=99 On 12/24/06, Ajith Ranabahu [EMAIL PROTECTED] wrote: Hi, XMLBeans can compile the schema into a set of classes that maps a schema to a class and also includes the code to convert a instance XML to an object instance (vice versa). This is what we call databinding However when you want to build a service it needs the plumbing code to get the XML message from the SOAP framework and do all the things that is specific to your framework. This code cannot be generated just by looking at the schema!. That is why you need the WSDL. This way of writing services is known as the 'contract first' and since you have the schema I think contract first way is the right way for you Ajith On 12/23/06, Danny Lin [EMAIL PROTECTED] wrote: Thank you, Ajith, for responding. I am very new to Web Services and Axis2. I was doing some reading yesterday and found out that XMLBeans has utility to convert XSD to Java. If I generate Java code with XMLBeans, will I be able to produce correct web service message that's in compliance with the schema I give? Or, I still need to have WSDL in order to make it to work? Thanks again. Danny -Original Message- From: Ajith Ranabahu [mailto:[EMAIL PROTECTED] Sent: Friday, December 22, 2006 7:32 PM To: axis-user@ws.apache.org Subject: Re: Axis2 - schema and WSDL Hi, Yes - right now the tools available in Axis2 does not let you directly convert a schema into a web service so you will have to make a WSDL document that uses that schema. However making a doc/lit WSDL using your schema is quite simple and straight forward. I have included a simple format you can follow definitions targetNamespace=xx' xmlns:tns=xx !-- don't forget the other namespaces in the parent !! -- types schema !-- import your schema here -- /schema /types !-- define two messages - one for input and one for output the names really does not matter since they are only used for reference -- message name=input part element=yourInputMessageElement name=part1/ /message message name=output part element=yourInputMessageElement name=part1/ /message portType name=YourPorttypeName operation name=yourOperationName input message=tns:input name=in/ output message=tns:output name=out/ /operation /portType binding name=yourBinding type=tns:YourPorttypeName soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ operation name=yourOperationName soap:operation soapAction=http://soapinterop.org/; style=document/ input name=in soap:body use=literal/ /input output name=out soap:body use=literal/ /output /operation /binding service name=yourServiceName port binding=tns:yourBinding name=yourPort soap:address location=http://some-dummy-address/ /port /service /definitions Note that the names of the portTypes bindings etc can be anything but the generated classes do reflect them. Say the generated java classs will contain the methods with the operation names. HTH Ajith On 12/22/06, Danny Lin [EMAIL PROTECTED] wrote: We are limited to use a pre-defined schema to create a web service. I have the schema as well as an sample XML document. What should I do next to create a web service in Axis2? I've read through all the sample codes but I couldn't find one that directs me from this path of development. Do I need to manually create a WSDL from this schema then use the wsdl2java tool to generate a stub? Thanks. -- Ajith Ranabahu - To unsubscribe, e-mail
Re: Axis2 - schema and WSDL
Srinath had this[1] blog entry some time back which contains the use of XMLBeans generated code with the Axis 2 DII api... Seems like it is addresses your problem.. Also have a look at the databinding sample which comes with Axis2.. (Axis2/modules/samples/databinding).. It's bit more complex than the above and shows how users can plug in data binding frameworks easily.. Thanks, Thilina [1]http://www.bloglines.com/blog/hemapani?id=99 On 12/24/06, Ajith Ranabahu [EMAIL PROTECTED] wrote: Hi, XMLBeans can compile the schema into a set of classes that maps a schema to a class and also includes the code to convert a instance XML to an object instance (vice versa). This is what we call databinding However when you want to build a service it needs the plumbing code to get the XML message from the SOAP framework and do all the things that is specific to your framework. This code cannot be generated just by looking at the schema!. That is why you need the WSDL. This way of writing services is known as the 'contract first' and since you have the schema I think contract first way is the right way for you Ajith On 12/23/06, Danny Lin [EMAIL PROTECTED] wrote: Thank you, Ajith, for responding. I am very new to Web Services and Axis2. I was doing some reading yesterday and found out that XMLBeans has utility to convert XSD to Java. If I generate Java code with XMLBeans, will I be able to produce correct web service message that's in compliance with the schema I give? Or, I still need to have WSDL in order to make it to work? Thanks again. Danny -Original Message- From: Ajith Ranabahu [mailto:[EMAIL PROTECTED] Sent: Friday, December 22, 2006 7:32 PM To: axis-user@ws.apache.org Subject: Re: Axis2 - schema and WSDL Hi, Yes - right now the tools available in Axis2 does not let you directly convert a schema into a web service so you will have to make a WSDL document that uses that schema. However making a doc/lit WSDL using your schema is quite simple and straight forward. I have included a simple format you can follow definitions targetNamespace=xx' xmlns:tns=xx !-- don't forget the other namespaces in the parent !! -- types schema !-- import your schema here -- /schema /types !-- define two messages - one for input and one for output the names really does not matter since they are only used for reference -- message name=input part element=yourInputMessageElement name=part1/ /message message name=output part element=yourInputMessageElement name=part1/ /message portType name=YourPorttypeName operation name=yourOperationName input message=tns:input name=in/ output message=tns:output name=out/ /operation /portType binding name=yourBinding type=tns:YourPorttypeName soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ operation name=yourOperationName soap:operation soapAction=http://soapinterop.org/; style=document/ input name=in soap:body use=literal/ /input output name=out soap:body use=literal/ /output /operation /binding service name=yourServiceName port binding=tns:yourBinding name=yourPort soap:address location=http://some-dummy-address/ /port /service /definitions Note that the names of the portTypes bindings etc can be anything but the generated classes do reflect them. Say the generated java classs will contain the methods with the operation names. HTH Ajith On 12/22/06, Danny Lin [EMAIL PROTECTED] wrote: We are limited to use a pre-defined schema to create a web service. I have the schema as well as an sample XML document. What should I do next to create a web service in Axis2? I've read through all the sample codes but I couldn't find one that directs me from this path of development. Do I need to manually create a WSDL from this schema then use the wsdl2java tool to generate a stub? Thanks. -- Ajith Ranabahu - 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] -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne WSO2, Inc.; http://www.wso2.com/ Home page: http://webservices.apache.org/~thilina/ Blog: http://thilinag.blogspot.com/ - To unsubscribe, e
RE: Axis2 - schema and WSDL
Thank you, Ajith, for responding. I am very new to Web Services and Axis2. I was doing some reading yesterday and found out that XMLBeans has utility to convert XSD to Java. If I generate Java code with XMLBeans, will I be able to produce correct web service message that's in compliance with the schema I give? Or, I still need to have WSDL in order to make it to work? Thanks again. Danny -Original Message- From: Ajith Ranabahu [mailto:[EMAIL PROTECTED] Sent: Friday, December 22, 2006 7:32 PM To: axis-user@ws.apache.org Subject: Re: Axis2 - schema and WSDL Hi, Yes - right now the tools available in Axis2 does not let you directly convert a schema into a web service so you will have to make a WSDL document that uses that schema. However making a doc/lit WSDL using your schema is quite simple and straight forward. I have included a simple format you can follow definitions targetNamespace=xx' xmlns:tns=xx !-- don't forget the other namespaces in the parent !! -- types schema !-- import your schema here -- /schema /types !-- define two messages - one for input and one for output the names really does not matter since they are only used for reference -- message name=input part element=yourInputMessageElement name=part1/ /message message name=output part element=yourInputMessageElement name=part1/ /message portType name=YourPorttypeName operation name=yourOperationName input message=tns:input name=in/ output message=tns:output name=out/ /operation /portType binding name=yourBinding type=tns:YourPorttypeName soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ operation name=yourOperationName soap:operation soapAction=http://soapinterop.org/; style=document/ input name=in soap:body use=literal/ /input output name=out soap:body use=literal/ /output /operation /binding service name=yourServiceName port binding=tns:yourBinding name=yourPort soap:address location=http://some-dummy-address/ /port /service /definitions Note that the names of the portTypes bindings etc can be anything but the generated classes do reflect them. Say the generated java classs will contain the methods with the operation names. HTH Ajith On 12/22/06, Danny Lin [EMAIL PROTECTED] wrote: We are limited to use a pre-defined schema to create a web service. I have the schema as well as an sample XML document. What should I do next to create a web service in Axis2? I've read through all the sample codes but I couldn't find one that directs me from this path of development. Do I need to manually create a WSDL from this schema then use the wsdl2java tool to generate a stub? Thanks. -- Ajith Ranabahu - 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 - schema and WSDL
Hi, XMLBeans can compile the schema into a set of classes that maps a schema to a class and also includes the code to convert a instance XML to an object instance (vice versa). This is what we call databinding However when you want to build a service it needs the plumbing code to get the XML message from the SOAP framework and do all the things that is specific to your framework. This code cannot be generated just by looking at the schema!. That is why you need the WSDL. This way of writing services is known as the 'contract first' and since you have the schema I think contract first way is the right way for you Ajith On 12/23/06, Danny Lin [EMAIL PROTECTED] wrote: Thank you, Ajith, for responding. I am very new to Web Services and Axis2. I was doing some reading yesterday and found out that XMLBeans has utility to convert XSD to Java. If I generate Java code with XMLBeans, will I be able to produce correct web service message that's in compliance with the schema I give? Or, I still need to have WSDL in order to make it to work? Thanks again. Danny -Original Message- From: Ajith Ranabahu [mailto:[EMAIL PROTECTED] Sent: Friday, December 22, 2006 7:32 PM To: axis-user@ws.apache.org Subject: Re: Axis2 - schema and WSDL Hi, Yes - right now the tools available in Axis2 does not let you directly convert a schema into a web service so you will have to make a WSDL document that uses that schema. However making a doc/lit WSDL using your schema is quite simple and straight forward. I have included a simple format you can follow definitions targetNamespace=xx' xmlns:tns=xx !-- don't forget the other namespaces in the parent !! -- types schema !-- import your schema here -- /schema /types !-- define two messages - one for input and one for output the names really does not matter since they are only used for reference -- message name=input part element=yourInputMessageElement name=part1/ /message message name=output part element=yourInputMessageElement name=part1/ /message portType name=YourPorttypeName operation name=yourOperationName input message=tns:input name=in/ output message=tns:output name=out/ /operation /portType binding name=yourBinding type=tns:YourPorttypeName soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ operation name=yourOperationName soap:operation soapAction=http://soapinterop.org/; style=document/ input name=in soap:body use=literal/ /input output name=out soap:body use=literal/ /output /operation /binding service name=yourServiceName port binding=tns:yourBinding name=yourPort soap:address location=http://some-dummy-address/ /port /service /definitions Note that the names of the portTypes bindings etc can be anything but the generated classes do reflect them. Say the generated java classs will contain the methods with the operation names. HTH Ajith On 12/22/06, Danny Lin [EMAIL PROTECTED] wrote: We are limited to use a pre-defined schema to create a web service. I have the schema as well as an sample XML document. What should I do next to create a web service in Axis2? I've read through all the sample codes but I couldn't find one that directs me from this path of development. Do I need to manually create a WSDL from this schema then use the wsdl2java tool to generate a stub? Thanks. -- Ajith Ranabahu - 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] -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis2 - schema and WSDL
We are limited to use a pre-defined schema to create a web service. I have the schema as well as an sample XML document. What should I do next to create a web service in Axis2? I've read through all the sample codes but I couldn't find one that directs me from this path of development. Do I need to manually create a WSDL from this schema then use the wsdl2java tool to generate a stub? Thanks.
Re: Axis2 - schema and WSDL
Hi, Yes - right now the tools available in Axis2 does not let you directly convert a schema into a web service so you will have to make a WSDL document that uses that schema. However making a doc/lit WSDL using your schema is quite simple and straight forward. I have included a simple format you can follow definitions targetNamespace=xx' xmlns:tns=xx !-- don't forget the other namespaces in the parent !! -- types schema !-- import your schema here -- /schema /types !-- define two messages - one for input and one for output the names really does not matter since they are only used for reference -- message name=input part element=yourInputMessageElement name=part1/ /message message name=output part element=yourInputMessageElement name=part1/ /message portType name=YourPorttypeName operation name=yourOperationName input message=tns:input name=in/ output message=tns:output name=out/ /operation /portType binding name=yourBinding type=tns:YourPorttypeName soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ operation name=yourOperationName soap:operation soapAction=http://soapinterop.org/; style=document/ input name=in soap:body use=literal/ /input output name=out soap:body use=literal/ /output /operation /binding service name=yourServiceName port binding=tns:yourBinding name=yourPort soap:address location=http://some-dummy-address/ /port /service /definitions Note that the names of the portTypes bindings etc can be anything but the generated classes do reflect them. Say the generated java classs will contain the methods with the operation names. HTH Ajith On 12/22/06, Danny Lin [EMAIL PROTECTED] wrote: We are limited to use a pre-defined schema to create a web service. I have the schema as well as an sample XML document. What should I do next to create a web service in Axis2? I've read through all the sample codes but I couldn't find one that directs me from this path of development. Do I need to manually create a WSDL from this schema then use the wsdl2java tool to generate a stub? Thanks. -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Importing external schema in WSDL
Hi Carlos; I am sorry for late reply . I think this is a bug in either Axis2 or XMLSchema so it is better if you can create a JIRA. Carlos A. Perez wrote: Hi, I am attaching you the services.xml and the WSDL with the reference to the external schemas. I removed the external references and made a copy of all referenced schemas in the .aar file, and now Axis is not generating any exception at all, and the service appears in the service listing, but when I go the WSDL for the service and then I got to the referenced schemas, these schemas are modified. I am referencing some schemas from Dublin core, and they define some types using extension and restriction mechanisms and they define some elements to be substitution groups of another elements, Axis is removing this definitions, for example, in one of the schemas that I am referencing: http://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd They define an element with name title, like this: xs:element name=title substitutionGroup=any/ I made a copy of this xsd in the aar file, and when Axis serves this schema the element definition now looks like: xs:element name=title/ The worst case if the for the following schema: http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcmitype.xsd There, they define a simpleType like this: xs:simpleType name=DCMIType xs:union xs:simpleType xs:restriction base=xs:Name xs:enumeration value=Collection/ xs:enumeration value=Dataset/ xs:enumeration value=Event/ xs:enumeration value=Image/ xs:enumeration value=MovingImage/ xs:enumeration value=StillImage/ xs:enumeration value=InteractiveResource/ xs:enumeration value=Service/ xs:enumeration value=Software/ xs:enumeration value=Sound/ xs:enumeration value=Text/ xs:enumeration value=PhysicalObject/ /xs:restriction /xs:simpleType /xs:union /xs:simpleType But Axis now serves it as: xs:simpleType name=DCMIType xs:union memberTypes=null null/ /xs:simpleType Is this the expected behavior of Axis? I workaround for this is the serve all the schemas and WSDL and schemas outside of Axis, because I don't want Axis to modified them, so I think that is the best choice, but it would be nice if Axis could serve them as well. Thank you for your help. Cheers, Carlos -Original Message- From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 13, 2006 2:57 AM To: axis-user@ws.apache.org Subject: Re: Importing external schema in WSDL Hi Carlos; Once you put your wsdl file into META-INF directory of the service archive file , then if there are xsd:imports in your wsdl Axis2 tries to read them. If the schema imports are relative then they should be there in the META-INF directory, if the schema is absolute URL then it should work w.o having any problem. Any way it is very helpful that if you could attached your wsdl or service archive file for us to regenerate the issue. Carlos A. Perez wrote: Hi, I have been trying to reference an external schema in a WSDL file using xs:import inside the types section, and using as a schema locator an http URL. It worked with version 0.95, but now with version 1.0 it's giving me an error saying that it was unable to locate the schema with the http locator that I provided (Unable to locate with a locator the schema referenced at 'http://...'). Now, I don't know if in general I am not supposed to use http URLs as schema locators or if it's a bug introduced in the new version of Axis when fixing the bug in the version 0.95 that didn't allow me to import schemas that were inside the .aar file. Could someone help me with this issue? Bye and thank you very much for your help. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] serviceGroup service name=CMapWebService scope=application description Web service that allows access to resources in a CMap Server. /description parameter name=ServiceClass locked=falseus.ihmc.ws.services.CMapWebService/parameter operation name=getResource messageReceiver class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver/ /operation operation name=getResourceMeta messageReceiver class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver/ /operation operation name=getResourceMetaList messageReceiver class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver/ /operation operation name=getRootResourceMetaList messageReceiver class=org.apache.axis2
Re: Importing external schema in WSDL
Hi Carlos; Once you put your wsdl file into META-INF directory of the service archive file , then if there are xsd:imports in your wsdl Axis2 tries to read them. If the schema imports are relative then they should be there in the META-INF directory, if the schema is absolute URL then it should work w.o having any problem. Any way it is very helpful that if you could attached your wsdl or service archive file for us to regenerate the issue. Carlos A. Perez wrote: Hi, I have been trying to reference an external schema in a WSDL file using xs:import inside the types section, and using as a schema locator an http URL. It worked with version 0.95, but now with version 1.0 it's giving me an error saying that it was unable to locate the schema with the http locator that I provided (Unable to locate with a locator the schema referenced at 'http://...'). Now, I don't know if in general I am not supposed to use http URLs as schema locators or if it's a bug introduced in the new version of Axis when fixing the bug in the version 0.95 that didn't allow me to import schemas that were inside the .aar file. Could someone help me with this issue? Bye and thank you very much for your help. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks, Deepal ~Future is Open~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Importing external schema in WSDL
Hi, I have been trying to reference an external schema in a WSDL file using xs:import inside the types section, and using as a schema locator an http URL. It worked with version 0.95, but now with version 1.0 it's giving me an error saying that it was unable to locate the schema with the http locator that I provided (Unable to locate with a locator the schema referenced at 'http://...'). Now, I don't know if in general I am not supposed to use http URLs as schema locators or if it's a bug introduced in the new version of Axis when fixing the bug in the version 0.95 that didn't allow me to import schemas that were inside the .aar file. Could someone help me with this issue? Bye and thank you very much for your help. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Schema in WSDL
Hi All, But how do I configure axis so that I uses my wsdl rather than generating one. I have al ready created a wsdl with schema embedded in it but I dont how will I make sure that axis uses this schema rather than generating one. I am using axis-1_1 version. Thanks in advaance, Mani From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Friday, November 11, 2005 5:56 PM To: Manivannan Gopalan Subject: Re: FW: Schema in WSDL You must define the schema and add it to the WSDL. When you deploy the service, you must tell Axis to use your WSDL file rather than generate a new one. Anne ps- int the future, please send your questions to the Axis discussion list rather than to me personally. On 11/10/05, Manivannan Gopalan [EMAIL PROTECTED] wrote: Hi Anne, Thanks for the reply. Yes I mean Message by Document. I have deployed the service with interface just as Public Element[] myMethod(Element[] elems) And that the reason I suppose the wsdl has a schema definition as any type. My problem is I don't know how I can make sure that schema gets imbedded into wsdl while deploying the service. I have used castor for creating objects from schema and vice versa. Regards, Mani From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 10, 2005 10:03 PM To: axis-user@ws.apache.org Subject: Re: Schema in WSDL By document do you actually mean message style? Where did the WSDL come from? If you define your interface such that it simply sends a document and receives a document, your WSDL will contain xsd:anyType. On the other hand, if you define the structure of the documents (either by defining beans or defining the schema of the input and output document). Anne On 11/10/05, Manivannan Gopalan [EMAIL PROTECTED] wrote: Hi All, I am facing a problem while trying to generate the proxy classes from wsdl. I am trying to use a dot net tool to generate the files, but the stubs are not generated properly as the schema is not detailed in wsdl(there is only xsd:any type). My service is a document style service. How do I deploy my service such that the wsdl generated by axis contains detailed schema. So that any client can use the wsdl to call the service. Regards, Mani CAUTION - Disclaimer * This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS End of Disclaimer INFOSYS***
RE: Schema in WSDL
Hi All, Does any one have the schema for the deployment descriptor (wsdd) of AXIS. Looks like Im not aware of many of the options available descriptor and Im not able to find them even through googeling. TIA, -Mani From: Manivannan Gopalan [mailto:Manivannan_Gopalan@infosys.com] Sent: Monday, November 14, 2005 9:40 AM To: axis-user@ws.apache.org; axis-dev@ws.apache.org Cc: Anne Thomas Manes Subject: Schema in WSDL Hi All, But how do I configure axis so that I uses my wsdl rather than generating one. I have al ready created a wsdl with schema embedded in it but I dont how will I make sure that axis uses this schema rather than generating one. I am using axis-1_1 version. Thanks in advaance, Mani From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Friday, November 11, 2005 5:56 PM To: Manivannan Gopalan Subject: Re: FW: Schema in WSDL You must define the schema and add it to the WSDL. When you deploy the service, you must tell Axis to use your WSDL file rather than generate a new one. Anne ps- int the future, please send your questions to the Axis discussion list rather than to me personally. On 11/10/05, Manivannan Gopalan [EMAIL PROTECTED] wrote: Hi Anne, Thanks for the reply. Yes I mean Message by Document. I have deployed the service with interface just as Public Element[] myMethod(Element[] elems) And that the reason I suppose the wsdl has a schema definition as any type. My problem is I don't know how I can make sure that schema gets imbedded into wsdl while deploying the service. I have used castor for creating objects from schema and vice versa. Regards, Mani From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 10, 2005 10:03 PM To: axis-user@ws.apache.org Subject: Re: Schema in WSDL By document do you actually mean message style? Where did the WSDL come from? If you define your interface such that it simply sends a document and receives a document, your WSDL will contain xsd:anyType. On the other hand, if you define the structure of the documents (either by defining beans or defining the schema of the input and output document). Anne On 11/10/05, Manivannan Gopalan [EMAIL PROTECTED] wrote: Hi All, I am facing a problem while trying to generate the proxy classes from wsdl. I am trying to use a dot net tool to generate the files, but the stubs are not generated properly as the schema is not detailed in wsdl(there is only xsd:any type). My service is a document style service. How do I deploy my service such that the wsdl generated by axis contains detailed schema. So that any client can use the wsdl to call the service. Regards, Mani CAUTION - Disclaimer * This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS End of Disclaimer INFOSYS***
Re: Schema in WSDL
Hi Mani, I don't know what version it reflects but some people find the following site useful. http://www.osmoticweb.com/axis-wsdd/ Regards, Dies Manivannan Gopalan wrote: Hi All, Does any one have the schema for the deployment descriptor (wsdd) of AXIS. Looks like I'm not aware of many of the options available descriptor and I'm not able to find them even through googeling. TIA, -Mani
Re: Schema in WSDL
there are links to a DTD and XSD for WSDD files at the bottom of the Axis Wiki page - http://wiki.apache.org/ws/FrontPage/Axis however i've always found this site to be most useful - http://www.oio.de/axis-wsdd/ i'm not certain how up-to-date any of them are, but the last one does cover your wsdlFile question - http://www.oio.de/axis-wsdd/wsdlFile.htm hth. ..ron. Manivannan Gopalan wrote: Hi All, Does any one have the schema for the deployment descriptor (wsdd) of AXIS. Looks like I’m not aware of many of the options available descriptor and I’m not able to find them even through googeling. TIA, -Mani *From:* Manivannan Gopalan [mailto:[EMAIL PROTECTED] *Sent:* Monday, November 14, 2005 9:40 AM *To:* axis-user@ws.apache.org; axis-dev@ws.apache.org *Cc:* Anne Thomas Manes *Subject:* Schema in WSDL Hi All, But how do I configure axis so that I uses my wsdl rather than generating one. I have al ready created a wsdl with schema embedded in it but I don’t how will I make sure that axis uses this schema rather than generating one. I am using axis-1_1 version. Thanks in advaance, Mani *From:* Anne Thomas Manes [mailto:[EMAIL PROTECTED] *Sent:* Friday, November 11, 2005 5:56 PM *To:* Manivannan Gopalan *Subject:* Re: FW: Schema in WSDL You must define the schema and add it to the WSDL. When you deploy the service, you must tell Axis to use your WSDL file rather than generate a new one. Anne ps- int the future, please send your questions to the Axis discussion list rather than to me personally. On 11/10/05, *Manivannan Gopalan* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi Anne, Thanks for the reply. Yes I mean /Message/ by Document. I have deployed the service with interface just as Public Element[] myMethod(Element[] elems) And that the reason I suppose the wsdl has a schema definition as any type. My problem is I don't know how I can make sure that schema gets imbedded into wsdl while deploying the service. I have used castor for creating objects from schema and vice versa. *Regards,* *Mani* * * *From:* Anne Thomas Manes [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]] *Sent:* Thursday, November 10, 2005 10:03 PM *To:* axis-user@ws.apache.org mailto:axis-user@ws.apache.org *Subject:* Re: Schema in WSDL By document do you actually mean message style? Where did the WSDL come from? If you define your interface such that it simply sends a document and receives a document, your WSDL will contain xsd:anyType. On the other hand, if you define the structure of the documents (either by defining beans or defining the schema of the input and output document). Anne On 11/10/05, *Manivannan Gopalan* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi All, I am facing a problem while trying to generate the proxy classes from wsdl. I am trying to use a dot net tool to generate the files, but the stubs are not generated properly as the schema is not detailed in wsdl(there is only xsd:any type). My service is a document style service. How do I deploy my service such that the wsdl generated by axis contains detailed schema. So that any client can use the wsdl to call the service. Regards, Mani CAUTION - Disclaimer * This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS End of Disclaimer INFOSYS***
Schema in WSDL
Hi All, I am facing a problem while trying to generate the proxy classes from wsdl. I am trying to use a dot net tool to generate the files, but the stubs are not generated properly as the schema is not detailed in wsdl(there is only xsd:any type). My service is a document style service. How do I deploy my service such that the wsdl generated by axis contains detailed schema. So that any client can use the wsdl to call the service. Regards, Mani CAUTION - Disclaimer * This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS End of Disclaimer INFOSYS***
Re: Schema in WSDL
By document do you actually mean message style? Where did the WSDL come from? If you define your interface such that it simply sends a document and receives a document, your WSDL will contain xsd:anyType. On the other hand, if you define the structure of the documents (either by defining beans or defining the schema of the input and output document). AnneOn 11/10/05, Manivannan Gopalan [EMAIL PROTECTED] wrote: Hi All, I am facing a problem while trying to generate the proxy classes from wsdl. I am trying to use a dot net tool to generate the files, but the stubs are not generated properly as the schema is not detailed in wsdl(there is only xsd:any type). My service is a document style service. How do I deploy my service such that the wsdl generated by axis contains detailed schema. So that any client can use the wsdl to call the service. Regards, Mani CAUTION - Disclaimer * This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS End of Disclaimer INFOSYS***
Re: Getting complex type schema from WSDL with WSDL4J
Your WSDL doesn't have a wsdl:documentation element, therefore it's expected that you would get a NULL response. >From the Types class you can get the list of schemas (getSchemas() method). Then you need to use a schema API to parse the schema. AnneOn 10/1/05, Fabrício [EMAIL PROTECTED] wrote: Hello all, I have to parse my wsdl files and identify the types, specially the Complex types. An example of my wsdl file is: wsdl:types schema targetNamespace=urn:WSPessoa xmlns=http://www.w3.org/2001/XMLSchema import namespace=http://schemas.xmlsoap.org/soap/encoding// complexType name=Pessoa sequence element name=idade type=xsd:int/ element name=nome nillable=true type=soapenc:string/ /sequence /complexType complexType name=ArrayOfPessoa complexContent restriction base=soapenc:Array attribute ref=soapenc:arrayType wsdl:arrayType=tns1:Pessoa[]/ /restriction /complexContent /complexType /schema /wsdl:types And I'm trying to get it using WSDL4J API as: WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader wsdlReader = wsdlFactory.newWSDLReader(); Definition definition = wsdlReader.readWSDL(wsdlURI); Types myWsdlTypes = definition.getTypes(); Element element = myWsdlTypes.getDocumentationElement(); But I'm always receiving NULL in my element. Could you tell me why this is happening? Thanks a lot, Fabrício.
Getting complex type schema from WSDL with WSDL4J
Hello all, I have to parse my wsdl files and identify the types, specially the Complex types. An example of my wsdl file is: wsdl:types schema targetNamespace=urn:WSPessoa xmlns=http://www.w3.org/2001/XMLSchema import namespace=http://schemas.xmlsoap.org/soap/encoding// complexType name=Pessoa sequence element name=idade type=xsd:int/ element name=nome nillable=true type=soapenc:string/ /sequence /complexType complexType name=ArrayOfPessoa complexContent restriction base=soapenc:Array attribute ref=soapenc:arrayType wsdl:arrayType=tns1:Pessoa[]/ /restriction /complexContent /complexType /schema /wsdl:types And Im trying to get it using WSDL4J API as: WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader wsdlReader = wsdlFactory.newWSDLReader(); Definition definition = wsdlReader.readWSDL(wsdlURI); Types myWsdlTypes = definition.getTypes(); Element element = myWsdlTypes.getDocumentationElement(); But Im always receiving NULL in my element. Could you tell me why this is happening? Thanks a lot, Fabrício.
Re: import schema to wsdl
=bookFlights input message=tns:bookFlightsReq / output message=tns:bookFlightsResp / /operation /portType types xsd:schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; elementFormDefault = qualified targetNamespace = http://ie.tcd/taylorjw/flightbooking; xsd:import namespace = http://ie.tcd/taylorjw/flightbooking; schemaLocation=BookFlights.xsd/ xsd:import namespace = http://www.w3.org/2001/XMLSchema; / /xsd:schema /types message name=bookFlightsReq part name=parameters element=types:bookFlightsRequest / /message message name=bookFlightsResp part name=parameters element=types:bookFlightsResponse / /message portType name=IBookFlightsPort operation name=bookFlights input message=tns:bookFlightsReq / output message=tns:bookFlightsResp / /operation /portType Quoting Anne Thomas Manes [EMAIL PROTECTED]: James, If you want an interface that accepts parameters rather than an object, then you must define your WSDL so that it matches the wrapped convention. What that means is that your input message element name must be identical to your operation name. Currently your input message element name is bookFlightsRequest and your operation name is bookFlights. If you fix it so that they are the same, it should give you what you want. Anne On 6/6/05, Jeff [EMAIL PROTECTED] wrote: In general, I wouldn't let Axis provide a WSDL file. Tell it to use your WSDL file by adding a wsdlFile element to the WSDD file before you deploy so you wind up with something like: deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; wsdlFile/MyService.wsdl/wsdlFile service name=... Put MyService.wsdl in Tomcat\webapps\axis\WEB-INF\classes You will want to edit MyService.wsdl so that the endpoint near the end of the file is something that clients can connect instead of: http://localhost:9081/AxisWeb/services/BookFlightsSOAPPort Jeff - Original Message - From: James Taylor [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, June 06, 2005 5:02 AM Subject: Re: import schema to wsdl Thanks for your help jeff. The main problem was the conflicting target namespaces I was trying to import into my wsdl. I've gotten the wsdl2java tool to work fine now. Just a question on what will when the service gets deployed to axis. I presume axis will make a different wsdl then the one I gave to the tool as it has defined a method signature for the portType as public java.lang.Object bookFlights(java.lang.Object parameters) throws java.rmi.RemoteException; would any one mind commenting on this as I defined the method signature in the wsdl more specific then this... I know that I defined a custom collection bean that is of type object - I presume I'll cast the parameters to get at it. Regards, James. My wsdl and external schema... definitions targetNamespace=http://ie/tcd/taylorjw/flightbooking/wsdl; xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:tns=http://ie/tcd/taylorjw/flightbooking/wsdl; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:types=http://ie.tcd/taylorjw/flightbooking; types xsd:schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; elementFormDefault = qualified targetNamespace = http://ie.tcd/taylorjw/flightbooking; xsd:import namespace = http://ie.tcd/taylorjw/flightbooking; schemaLocation=BookFlights.xsd/ xsd:import namespace = http://www.w3.org/2001/XMLSchema; / /xsd:schema /types message name=bookFlightsReq part name=parameters element=types:bookFlightsRequest / /message message name=bookFlightsResp part name=parameters element=types:bookFlightsResponse / /message portType name=IBookFlightsPort operation name=bookFlights input message=tns:bookFlightsReq / output message=tns:bookFlightsResp / /operation /portType binding name=BookFlightsSOAPBinding type=tns:IBookFlightsPort soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http; / operation name=bookFlights
Re: import schema to wsdl
That reminds me, I found that WSDL2Java doesn't support maxOccurs in sequence, e.g. xsd:element name=bookFlightsResponse xsd:sequence maxOccurs=unbounded xsd:element name = bookedFlights type=fb:Flight/ /xsd:sequence /xsd:element - Original Message - From: Anne Thomas Manes [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Wednesday, June 08, 2005 4:41 PM Subject: Re: import schema to wsdl James, This definition: xsd:element name=bookFlightsResponse xsd:sequence xsd:element name = bookedFlights type=fb:Flight/ /xsd:sequence /xsd:element will return on Flight object. If you want to return an array of flight objects you should define it thus: xsd:element name=bookFlightsResponse xsd:sequence xsd:element name = bookedFlights type=fb:Flight maxOccurs=unbounded/ /xsd:sequence /xsd:element Anne On 6/8/05, James Taylor [EMAIL PROTECTED] wrote: Hey anne, I've followed your advice by changing the method name in the portType to the same as in the message in the wsdl. But when I ran it through wsdl2java it produced the following dtd that says its doc-literal and the message signature in SoabBindingImp still says Object and return type Object. To get wrapped style do I have to change these manually? The exposed web service message should take a BookFlight object and return a list of booked flights. Just a question on the return type. In the xsd I have declare it as xsd:element name=bookFlightsResponse xsd:sequence xsd:element name = bookedFlights type=fb:Flight/ /xsd:sequence /xsd:element does this not mean it should return a list of Flight objects? Regards, James. PS - Here's generated deploy.wsdd. !-- Use this file to deploy some handlers/chains and services -- !-- Two ways to do this: -- !-- java org.apache.axis.client.AdminClient deploy.wsdd -- !-- after the axis server is running -- !-- or -- !-- java org.apache.axis.utils.Admin client|server deploy.wsdd -- !-- from the same directory that the Axis engine runs -- deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; !-- Services from BookFlightsService WSDL service -- service name=BookFlightsSOAPPort provider=java:RPC style=document use=literal parameter name=wsdlTargetNamespace value=http://ie/tcd/taylorjw/flightbooking/wsdl/ parameter name=wsdlServiceElement value=BookFlightsService/ parameter name=wsdlServicePort value=BookFlightsSOAPPort/ parameter name=className value=flightCompany.bookFlights.rpcservice.BookFlightsSOAPBindingImpl/ parameter name=wsdlPortType value=IBookFlightsPort/ operation name=bookFlights qname=bookFlights returnQName=retNS:bookFlightsResponse xmlns:retNS=http://ie.tcd/taylorjw/flightbooking; returnType=rtns:anyType xmlns:rtns=http://www.w3.org/2001/XMLSchema; soapAction=bookFlights parameter qname=pns:bookFlightsRequest xmlns:pns=http://ie.tcd/taylorjw/flightbooking; type=tns:anyType xmlns:tns=http://www.w3.org/2001/XMLSchema/ /operation parameter name=allowedMethods value=bookFlights/ parameter name=scope value=Session/ typeMapping xmlns:ns=http://ie.tcd/taylorjw/flightbooking; qname=ns:Flight type=java: flightCompany.bookFlights.rpcservice.Flight serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / typeMapping xmlns:ns=http://ie.tcd/taylorjw/flightbooking; qname=ns:Passenger type=java: flightCompany.bookFlights.rpcservice.Passenger serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / typeMapping xmlns:ns=http://ie.tcd/taylorjw/flightbooking; qname=ns:Booking type=java: flightCompany.bookFlights.rpcservice.Booking serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / /service /deployment Quoting Anne Thomas Manes [EMAIL PROTECTED]: Sorry for the delay -- I've been away from this list for a couple of days... You need to change the message definition in the WSDL like so: message name=bookFlightsReq part name=parameters element=types:bookFlights / /message and in your schema you need to rename the bookFlightsRequest element to bookFlights. No other changes are required. Anne On 6/6/05
Re: import schema to wsdl
Ok well what I've done is add a flightList complexType to my external xsd that is like so xsd:complexType name=flightList xsd:sequence xsd:element name=flight type=fb:Flight minOccurs=0 maxOccurs=unbounded/ /xsd:sequence /xsd:complexType and referenced this as a return type for the message and wsdl2java has generated a class for this. xsd:element name=bookFlightsResponse xsd:sequence xsd:element name=flight type=fb:flightList/ /xsd:sequence /xsd:element Quoting Jeff [EMAIL PROTECTED]: That reminds me, I found that WSDL2Java doesn't support maxOccurs in sequence, e.g. xsd:element name=bookFlightsResponse xsd:sequence maxOccurs=unbounded xsd:element name = bookedFlights type=fb:Flight/ /xsd:sequence /xsd:element - Original Message - From: Anne Thomas Manes [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Wednesday, June 08, 2005 4:41 PM Subject: Re: import schema to wsdl James, This definition: xsd:element name=bookFlightsResponse xsd:sequence xsd:element name = bookedFlights type=fb:Flight/ /xsd:sequence /xsd:element will return on Flight object. If you want to return an array of flight objects you should define it thus: xsd:element name=bookFlightsResponse xsd:sequence xsd:element name = bookedFlights type=fb:Flight maxOccurs=unbounded/ /xsd:sequence /xsd:element Anne On 6/8/05, James Taylor [EMAIL PROTECTED] wrote: Hey anne, I've followed your advice by changing the method name in the portType to the same as in the message in the wsdl. But when I ran it through wsdl2java it produced the following dtd that says its doc-literal and the message signature in SoabBindingImp still says Object and return type Object. To get wrapped style do I have to change these manually? The exposed web service message should take a BookFlight object and return a list of booked flights. Just a question on the return type. In the xsd I have declare it as xsd:element name=bookFlightsResponse xsd:sequence xsd:element name = bookedFlights type=fb:Flight/ /xsd:sequence /xsd:element does this not mean it should return a list of Flight objects? Regards, James. PS - Here's generated deploy.wsdd. !-- Use this file to deploy some handlers/chains and services -- !-- Two ways to do this: -- !-- java org.apache.axis.client.AdminClient deploy.wsdd -- !-- after the axis server is running -- !-- or -- !-- java org.apache.axis.utils.Admin client|server deploy.wsdd -- !-- from the same directory that the Axis engine runs -- deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; !-- Services from BookFlightsService WSDL service -- service name=BookFlightsSOAPPort provider=java:RPC style=document use=literal parameter name=wsdlTargetNamespace value=http://ie/tcd/taylorjw/flightbooking/wsdl/ parameter name=wsdlServiceElement value=BookFlightsService/ parameter name=wsdlServicePort value=BookFlightsSOAPPort/ parameter name=className value=flightCompany.bookFlights.rpcservice.BookFlightsSOAPBindingImpl/ parameter name=wsdlPortType value=IBookFlightsPort/ operation name=bookFlights qname=bookFlights returnQName=retNS:bookFlightsResponse xmlns:retNS=http://ie.tcd/taylorjw/flightbooking; returnType=rtns:anyType xmlns:rtns=http://www.w3.org/2001/XMLSchema; soapAction=bookFlights parameter qname=pns:bookFlightsRequest xmlns:pns=http://ie.tcd/taylorjw/flightbooking; type=tns:anyType xmlns:tns=http://www.w3.org/2001/XMLSchema/ /operation parameter name=allowedMethods value=bookFlights/ parameter name=scope value=Session/ typeMapping xmlns:ns=http://ie.tcd/taylorjw/flightbooking; qname=ns:Flight type=java: flightCompany.bookFlights.rpcservice.Flight serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / typeMapping xmlns:ns=http://ie.tcd/taylorjw/flightbooking; qname=ns:Passenger type=java: flightCompany.bookFlights.rpcservice.Passenger serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / typeMapping xmlns:ns=http://ie.tcd/taylorjw/flightbooking; qname=ns:Booking type=java
Re: import schema to wsdl
Fun, this XML stuff, isn't it. I bet we could play all day with elements and things :-) If you think XML has a serious purpose, then be more thoughtful. Anne's suggestion is right on the money. Perhaps James is teasing us with his! The flightList element serves no purpose. All data structures should be as concise as possible otherwise we wind up with useless baggage. As an aid to understanding the implications of schemas, you might want to write down sample instances. James' solution: bookFlightsResponse xmlns=http://ie.tcd/taylorjw/flightbooking; flightList flight flightNum123/flightNum sourceAirportLAX/sourceAirport destAirportYYK/destAirport flightDate1005-08-12/flightDate seatsAvailible31/seatsAvailible seatPrice$175.95/seatPrice numberOfSeatsToBook3/numberOfSeatsToBook bookingNumber456/bookingNumber informationCharter/information /flight flight flightNum321/flightNum sourceAirportLON/sourceAirport destAirportADH/destAirport flightDate1005-07-25/flightDate seatsAvailible17/seatsAvailible seatPrice$365.95/seatPrice numberOfSeatsToBook1/numberOfSeatsToBook bookingNumber789/bookingNumber information/information /flight /flightList /bookFlightsResponse Anne's solution: bookFlightsResponse xmlns=http://ie.tcd/taylorjw/flightbooking; bookedFlights flightNum123/flightNum sourceAirportLAX/sourceAirport destAirportYYK/destAirport flightDate1005-08-12/flightDate seatsAvailible31/seatsAvailible seatPrice$175.95/seatPrice numberOfSeatsToBook3/numberOfSeatsToBook bookingNumber456/bookingNumber informationCharter/information /bookedFlights bookedFlights flightNum321/flightNum sourceAirportLON/sourceAirport destAirportADH/destAirport flightDate1005-07-25/flightDate seatsAvailible17/seatsAvailible seatPrice$365.95/seatPrice numberOfSeatsToBook1/numberOfSeatsToBook bookingNumber789/bookingNumber information/information /bookedFlights /bookFlightsResponse Slight variations on your schema, James, could well justify the use of flightList but not as it stands. What was your question, BTW? :-) Jeff - Original Message - From: James Taylor [EMAIL PROTECTED] To: axis-user@ws.apache.org; Jeff [EMAIL PROTECTED] Cc: axis-user@ws.apache.org; Anne Thomas Manes [EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 8:41 PM Subject: Re: import schema to wsdl Ok well what I've done is add a flightList complexType to my external xsd that is like so xsd:complexType name=flightList xsd:sequence xsd:element name=flight type=fb:Flight minOccurs=0 maxOccurs=unbounded/ /xsd:sequence /xsd:complexType and referenced this as a return type for the message and wsdl2java has generated a class for this. xsd:element name=bookFlightsResponse xsd:sequence xsd:element name=flight type=fb:flightList/ /xsd:sequence /xsd:element Quoting Jeff [EMAIL PROTECTED]: That reminds me, I found that WSDL2Java doesn't support maxOccurs in sequence, e.g. xsd:element name=bookFlightsResponse xsd:sequence maxOccurs=unbounded xsd:element name = bookedFlights type=fb:Flight/ /xsd:sequence /xsd:element - Original Message - From: Anne Thomas Manes [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Wednesday, June 08, 2005 4:41 PM Subject: Re: import schema to wsdl James, This definition: xsd:element name=bookFlightsResponse xsd:sequence xsd:element name = bookedFlights type=fb:Flight/ /xsd:sequence /xsd:element will return on Flight object. If you want to return an array of flight objects you should define it thus: xsd:element name=bookFlightsResponse xsd:sequence xsd:element name = bookedFlights type=fb:Flight maxOccurs=unbounded/ /xsd:sequence /xsd:element Anne On 6/8/05, James Taylor [EMAIL PROTECTED] wrote: Hey anne, I've followed your advice by changing the method name in the portType to the same as in the message in the wsdl. But when I ran it through wsdl2java it produced the following dtd that says its doc-literal and the message signature in SoabBindingImp still says Object and return type Object. To get wrapped style do I have to change these manually? The exposed web service message should take a BookFlight object and return a list of booked flights. Just a question on the return type. In the xsd I have declare it as xsd:element name=bookFlightsResponse xsd:sequence xsd:element name = bookedFlights type=fb:Flight/ /xsd:sequence /xsd:element
Re: import schema to wsdl
James, If you want an interface that accepts parameters rather than an object, then you must define your WSDL so that it matches the wrapped convention. What that means is that your input message element name must be identical to your operation name. Currently your input message element name is bookFlightsRequest and your operation name is bookFlights. If you fix it so that they are the same, it should give you what you want. Anne On 6/6/05, Jeff [EMAIL PROTECTED] wrote: In general, I wouldn't let Axis provide a WSDL file. Tell it to use your WSDL file by adding a wsdlFile element to the WSDD file before you deploy so you wind up with something like: deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; wsdlFile/MyService.wsdl/wsdlFile service name=... Put MyService.wsdl in Tomcat\webapps\axis\WEB-INF\classes You will want to edit MyService.wsdl so that the endpoint near the end of the file is something that clients can connect instead of: http://localhost:9081/AxisWeb/services/BookFlightsSOAPPort Jeff - Original Message - From: James Taylor [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, June 06, 2005 5:02 AM Subject: Re: import schema to wsdl Thanks for your help jeff. The main problem was the conflicting target namespaces I was trying to import into my wsdl. I've gotten the wsdl2java tool to work fine now. Just a question on what will when the service gets deployed to axis. I presume axis will make a different wsdl then the one I gave to the tool as it has defined a method signature for the portType as public java.lang.Object bookFlights(java.lang.Object parameters) throws java.rmi.RemoteException; would any one mind commenting on this as I defined the method signature in the wsdl more specific then this... I know that I defined a custom collection bean that is of type object - I presume I'll cast the parameters to get at it. Regards, James. My wsdl and external schema... definitions targetNamespace=http://ie/tcd/taylorjw/flightbooking/wsdl; xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:tns=http://ie/tcd/taylorjw/flightbooking/wsdl; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:types=http://ie.tcd/taylorjw/flightbooking; types xsd:schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; elementFormDefault = qualified targetNamespace = http://ie.tcd/taylorjw/flightbooking; xsd:import namespace = http://ie.tcd/taylorjw/flightbooking; schemaLocation=BookFlights.xsd/ xsd:import namespace = http://www.w3.org/2001/XMLSchema; / /xsd:schema /types message name=bookFlightsReq part name=parameters element=types:bookFlightsRequest / /message message name=bookFlightsResp part name=parameters element=types:bookFlightsResponse / /message portType name=IBookFlightsPort operation name=bookFlights input message=tns:bookFlightsReq / output message=tns:bookFlightsResp / /operation /portType binding name=BookFlightsSOAPBinding type=tns:IBookFlightsPort soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http; / operation name=bookFlights soap:operation style=document soapAction=bookFlights / input soap:body use=literal / /input output soap:body use=literal / /output /operation /binding service name=BookFlightsService port name=BookFlightsSOAPPort binding=tns:BookFlightsSOAPBinding soap:address location=http://localhost:9081/AxisWeb/services/BookFlightsSOAPPort; / /port /service /definitions !--BookFlights.xsd -- ?xml version=1.0 ? schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; targetNamespace = http://ie.tcd/taylorjw/flightbooking; xmlns:fb=http://ie.tcd/taylorjw/flightbooking; xsd:complexType name=Booking xsd:sequence xsd:element name=passenger type=fb:Passenger/ xsd:element name=flight type=fb:Flight minOccurs=0 maxOccurs=unbounded/ /xsd:sequence /xsd:complexType xsd:complexType name=Passenger xsd:sequence xsd:element name=passengerNum type=xsd:integer / xsd:element name=firstName type=xsd:string / xsd:element name=lastName type=xsd:string / xsd:element name=address type=xsd:string / /xsd:sequence /xsd:complexType xsd:complexType name=Flight xsd:sequence xsd:element name=flightNum type=xsd:integer / xsd:element name=sourceAirport type=xsd:string / xsd:element name=destAirport type=xsd:string / xsd:element name=flightDate type=xsd:string / xsd:element name=seatsAvailible type=xsd:integer / xsd:element name=seatPrice type=xsd:integer / xsd:element name=numberOfSeatsToBook type=xsd:string / xsd:element name=bookingNumber type=xsd:integer / xsd:element name=information type=xsd:string
Fwd: Re: import schema to wsdl
So I should just chang change types:bookFlightsRequest to types:bookFlights and reflect this in the external schema, will I have to change input message=tns:bookFlightsReq / input message=tns:bookFlights / also? ...heres the bit of the wsdl that would have to be changed... portType name=IBookFlightsPort operation name=bookFlights input message=tns:bookFlightsReq / output message=tns:bookFlightsResp / /operation /portType types xsd:schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; elementFormDefault = qualified targetNamespace = http://ie.tcd/taylorjw/flightbooking; xsd:import namespace = http://ie.tcd/taylorjw/flightbooking; schemaLocation=BookFlights.xsd/ xsd:import namespace = http://www.w3.org/2001/XMLSchema; / /xsd:schema /types message name=bookFlightsReq part name=parameters element=types:bookFlightsRequest / /message message name=bookFlightsResp part name=parameters element=types:bookFlightsResponse / /message portType name=IBookFlightsPort operation name=bookFlights input message=tns:bookFlightsReq / output message=tns:bookFlightsResp / /operation /portType Quoting Anne Thomas Manes [EMAIL PROTECTED]: James, If you want an interface that accepts parameters rather than an object, then you must define your WSDL so that it matches the wrapped convention. What that means is that your input message element name must be identical to your operation name. Currently your input message element name is bookFlightsRequest and your operation name is bookFlights. If you fix it so that they are the same, it should give you what you want. Anne On 6/6/05, Jeff [EMAIL PROTECTED] wrote: In general, I wouldn't let Axis provide a WSDL file. Tell it to use your WSDL file by adding a wsdlFile element to the WSDD file before you deploy so you wind up with something like: deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; wsdlFile/MyService.wsdl/wsdlFile service name=... Put MyService.wsdl in Tomcat\webapps\axis\WEB-INF\classes You will want to edit MyService.wsdl so that the endpoint near the end of the file is something that clients can connect instead of: http://localhost:9081/AxisWeb/services/BookFlightsSOAPPort Jeff - Original Message - From: James Taylor [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, June 06, 2005 5:02 AM Subject: Re: import schema to wsdl Thanks for your help jeff. The main problem was the conflicting target namespaces I was trying to import into my wsdl. I've gotten the wsdl2java tool to work fine now. Just a question on what will when the service gets deployed to axis. I presume axis will make a different wsdl then the one I gave to the tool as it has defined a method signature for the portType as public java.lang.Object bookFlights(java.lang.Object parameters) throws java.rmi.RemoteException; would any one mind commenting on this as I defined the method signature in the wsdl more specific then this... I know that I defined a custom collection bean that is of type object - I presume I'll cast the parameters to get at it. Regards, James. My wsdl and external schema... definitions targetNamespace=http://ie/tcd/taylorjw/flightbooking/wsdl; xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:tns=http://ie/tcd/taylorjw/flightbooking/wsdl; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:types=http://ie.tcd/taylorjw/flightbooking; types xsd:schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; elementFormDefault = qualified targetNamespace = http://ie.tcd/taylorjw/flightbooking; xsd:import namespace = http://ie.tcd/taylorjw/flightbooking; schemaLocation=BookFlights.xsd/ xsd:import namespace = http://www.w3.org/2001/XMLSchema; / /xsd:schema /types message name=bookFlightsReq part name=parameters element=types:bookFlightsRequest / /message message name=bookFlightsResp part name=parameters element=types:bookFlightsResponse / /message portType name=IBookFlightsPort operation name=bookFlights input message=tns:bookFlightsReq / output message=tns:bookFlightsResp / /operation /portType binding name=BookFlightsSOAPBinding type=tns:IBookFlightsPort soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http; / operation name=bookFlights soap:operation style=document soapAction=bookFlights / input
RE: import schema to wsdl
You don't have to specify any other changes in wsdl or WSDL2Java script. Once you run WSDL2Java, check the **SOAPBindingImpl.java, the method should return correct return type (Flight). Kiran mailto:[EMAIL PROTECTED] From: James Taylor [mailto:[EMAIL PROTECTED] Sent: Mon 6/6/2005 3:17 PM To: axis-user@ws.apache.org Subject: Re: import schema to wsdl If I make the changes below will I have to specify anything else in the wsdl or in wsdl2java to get wrapped-literal style? Quoting James Taylor [EMAIL PROTECTED]: So I should just chang change types:bookFlightsRequest to types:bookFlights and reflect this in the external schema, will I have to change input message=tns:bookFlightsReq / input message=tns:bookFlights / also? ...heres the bit of the wsdl that would have to be changed... portType name=IBookFlightsPort operation name=bookFlights input message=tns:bookFlightsReq / output message=tns:bookFlightsResp / /operation /portType types xsd:schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; elementFormDefault = qualified targetNamespace = http://ie.tcd/taylorjw/flightbooking; xsd:import namespace = http://ie.tcd/taylorjw/flightbooking; schemaLocation=BookFlights.xsd/ xsd:import namespace = http://www.w3.org/2001/XMLSchema; / /xsd:schema /types message name=bookFlightsReq part name=parameters element=types:bookFlightsRequest / /message message name=bookFlightsResp part name=parameters element=types:bookFlightsResponse / /message portType name=IBookFlightsPort operation name=bookFlights input message=tns:bookFlightsReq / output message=tns:bookFlightsResp / /operation /portType Quoting Anne Thomas Manes [EMAIL PROTECTED]: James, If you want an interface that accepts parameters rather than an object, then you must define your WSDL so that it matches the wrapped convention. What that means is that your input message element name must be identical to your operation name. Currently your input message element name is bookFlightsRequest and your operation name is bookFlights. If you fix it so that they are the same, it should give you what you want. Anne On 6/6/05, Jeff [EMAIL PROTECTED] wrote: In general, I wouldn't let Axis provide a WSDL file. Tell it to use your WSDL file by adding a wsdlFile element to the WSDD file before you deploy so you wind up with something like: deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; wsdlFile/MyService.wsdl/wsdlFile service name=... Put MyService.wsdl in Tomcat\webapps\axis\WEB-INF\classes You will want to edit MyService.wsdl so that the endpoint near the end of the file is something that clients can connect instead of: http://localhost:9081/AxisWeb/services/BookFlightsSOAPPort Jeff - Original Message - From: James Taylor [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, June 06, 2005 5:02 AM Subject: Re: import schema to wsdl Thanks for your help jeff. The main problem was the conflicting target namespaces I was trying to import into my wsdl. I've gotten the wsdl2java tool to work fine now. Just a question on what will when the service gets deployed to axis. I presume axis will make a different wsdl then the one I gave to the tool as it has defined a method signature for the portType as public java.lang.Object bookFlights(java.lang.Object parameters) throws java.rmi.RemoteException; would any one mind commenting on this as I defined the method signature in the wsdl more specific then this... I know that I defined a custom collection bean that is of type object - I presume I'll cast the parameters to get at it. Regards, James. My wsdl and external schema... definitions targetNamespace=http://ie/tcd/taylorjw/flightbooking/wsdl; xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:tns=http://ie/tcd/taylorjw/flightbooking/wsdl; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:types=http://ie.tcd/taylorjw/flightbooking; types xsd:schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; elementFormDefault = qualified targetNamespace = http://ie.tcd/taylorjw/flightbooking; xsd:import namespace = http://ie.tcd/taylorjw/flightbooking; schemaLocation=BookFlights.xsd/ xsd:import namespace = http://www.w3.org/2001/XMLSchema; / /xsd:schema /types message
import schema to wsdl
Hey folks if one refers to a outside shema in a wsdl, like in this listing, types xsd:schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; elementFormDefault = qualified targetNamespace = http://localhost:8080/axis/services/bookflights/wsdl/importtypes; xmlns:bf=http://localhost:8080/axis/services/bookflights/flightbooking; import namespace = http://localhost:8080/axis/services/bookflights/flightbooking; location = FlightBooking.xsd / import namespace = http://www.w3.org/2001/XMLSchema; / /xsd:schema /types should the schema be in the same directory as the wsdl. I've this wsdl in /project/bookflights and the ant build file in /ant. I'm using axis's wsdl2java tool. Just wondering will ant and wsdl2java pick up FlightBooking.xsd. Also would appreciate it if anyone spotted any mistakes in this listing. Regards, James. -- Between the question and the answer lies free will
Re: import schema to wsdl
I'm getting this error and am not sure how to fix it wsdl2java: [echo] Using wsdl in WSDL2Java task... [java] WSDLException (at /definitions/message[1]/part): faultCode=UNBOUND_P REFIX: Unable to determine namespace of 'bf:bookFlightsRequest'.: running this ant task java classname=org.apache.axis.wsdl.WSDL2Java fork=yes failonerror=true classpath refid=projectClasspath / arg value = -o / arg file = ${pathToService} / arg value = -d / arg value = Session / arg value = -s / arg value = -N http://localhost:8080/axis/services/bookflights/flightbooking=${servicePackage}; / arg value = -N http://localhost:8080/axis/services/bookflights/wsdl=${servicePackage}; / arg file = ${pathToService}/bookFlights.wsdl / /java Quoting James Taylor [EMAIL PROTECTED]: Hey folks if one refers to a outside shema in a wsdl, like in this listing, types xsd:schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; elementFormDefault = qualified targetNamespace = http://localhost:8080/axis/services/bookflights/wsdl/importtypes; xmlns:bf=http://localhost:8080/axis/services/bookflights/flightbooking; import namespace = http://localhost:8080/axis/services/bookflights/flightbooking; location = FlightBooking.xsd / import namespace = http://www.w3.org/2001/XMLSchema; / /xsd:schema /types should the schema be in the same directory as the wsdl. I've this wsdl in /project/bookflights and the ant build file in /ant. I'm using axis's wsdl2java tool. Just wondering will ant and wsdl2java pick up FlightBooking.xsd. Also would appreciate it if anyone spotted any mistakes in this listing. Regards, James. -- Between the question and the answer lies free will -- Between the question and the answer lies free will
Re: import schema to wsdl
Presumably, bf:bookFlightsRequest is in FlightBooking.xsd so you would have to examine that file. This issue falls within the scope of application domain debugging and, as such, not a legitimate matter to raise on the Axis mail-list. Jeff - Original Message - From: James Taylor [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Sunday, June 05, 2005 10:18 PM Subject: Re: import schema to wsdl I'm getting this error and am not sure how to fix it wsdl2java: [echo] Using wsdl in WSDL2Java task... [java] WSDLException (at /definitions/message[1]/part): faultCode=UNBOUND_P REFIX: Unable to determine namespace of 'bf:bookFlightsRequest'.: running this ant task java classname=org.apache.axis.wsdl.WSDL2Java fork=yes failonerror=true classpath refid=projectClasspath / arg value = -o / arg file = ${pathToService} / arg value = -d / arg value = Session / arg value = -s / arg value = -N http://localhost:8080/axis/services/bookflights/flightbooking=${servicePackage}; / arg value = -N http://localhost:8080/axis/services/bookflights/wsdl=${servicePackage}; / arg file = ${pathToService}/bookFlights.wsdl / /java Quoting James Taylor [EMAIL PROTECTED]: Hey folks if one refers to a outside shema in a wsdl, like in this listing, types xsd:schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; elementFormDefault = qualified targetNamespace = http://localhost:8080/axis/services/bookflights/wsdl/importtypes; xmlns:bf=http://localhost:8080/axis/services/bookflights/flightbooking; import namespace = http://localhost:8080/axis/services/bookflights/flightbooking; location = FlightBooking.xsd / import namespace = http://www.w3.org/2001/XMLSchema; / /xsd:schema /types should the schema be in the same directory as the wsdl. I've this wsdl in /project/bookflights and the ant build file in /ant. I'm using axis's wsdl2java tool. Just wondering will ant and wsdl2java pick up FlightBooking.xsd. Also would appreciate it if anyone spotted any mistakes in this listing. Regards, James. -- Between the question and the answer lies free will -- Between the question and the answer lies free will
Re: import schema to wsdl
Yes that's true to a point, but what I'm trying get help with is deploying a wsdl that references a external schema using axis' wsdl2java tool. Thats essentially what I'm trying to do. I'm not sure how to the wsdl2java tool will pick up the xsd file. This is the error i'm getting now [java] java.io.IOException: Element {http://localhost:8080/axis/services/bo okflights/types}bookFlightsRequest is referenced but not defined The bf:bookFlightsRequest is declared at the start of the wsdl like this definitions targetNamespace=http://localhost:8080/axis/services/bookflights/wsdl; xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:tns=http://localhost:8080/axis/services/bookflights/wsdl; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:bf=http://localhost:8080/axis/services/bookflights/types; and imported in the types part like so types xsd:schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; elementFormDefault = qualified targetNamespace = http://localhost:8080/axis/services/bookflights/wsdl/types; xsd:import namespace = http://localhost:8080/axis/services/bookflights; location=BookFlights.xsd/ xsd:import namespace = http://www.w3.org/2001/XMLSchema; / /xsd:schema /types Quoting Jeff [EMAIL PROTECTED]: Presumably, bf:bookFlightsRequest is in FlightBooking.xsd so you would have to examine that file. This issue falls within the scope of application domain debugging and, as such, not a legitimate matter to raise on the Axis mail-list. Jeff - Original Message - From: James Taylor [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Sunday, June 05, 2005 10:18 PM Subject: Re: import schema to wsdl I'm getting this error and am not sure how to fix it wsdl2java: [echo] Using wsdl in WSDL2Java task... [java] WSDLException (at /definitions/message[1]/part): faultCode=UNBOUND_P REFIX: Unable to determine namespace of 'bf:bookFlightsRequest'.: running this ant task java classname=org.apache.axis.wsdl.WSDL2Java fork=yes failonerror=true classpath refid=projectClasspath / arg value = -o / arg file = ${pathToService} / arg value = -d / arg value = Session / arg value = -s / arg value = -N http://localhost:8080/axis/services/bookflights/flightbooking=${servicePackage}; / arg value = -N http://localhost:8080/axis/services/bookflights/wsdl=${servicePackage}; / arg file = ${pathToService}/bookFlights.wsdl / /java Quoting James Taylor [EMAIL PROTECTED]: Hey folks if one refers to a outside shema in a wsdl, like in this listing, types xsd:schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; elementFormDefault = qualified targetNamespace = http://localhost:8080/axis/services/bookflights/wsdl/importtypes; xmlns:bf=http://localhost:8080/axis/services/bookflights/flightbooking; import namespace = http://localhost:8080/axis/services/bookflights/flightbooking; location = FlightBooking.xsd / import namespace = http://www.w3.org/2001/XMLSchema; / /xsd:schema /types should the schema be in the same directory as the wsdl. I've this wsdl in /project/bookflights and the ant build file in /ant. I'm using axis's wsdl2java tool. Just wondering will ant and wsdl2java pick up FlightBooking.xsd. Also would appreciate it if anyone spotted any mistakes in this listing. Regards, James. -- Between the question and the answer lies free will -- Between the question and the answer lies free will -- Between the question and the answer lies free will
Re: import schema to wsdl
Sure will give it a spin. I thought the uri's don't really matter as long as they are unique within the document?! Quoting Jeff [EMAIL PROTECTED]: URIs like: http://localhost:8080/axis/services/bookflights/wsdl/importtypes are not suitable for use as namespaces. Try something like: http://ie.tcd/taylorjw/bookflights instead. Jeff - Original Message - From: James Taylor [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Sunday, June 05, 2005 8:48 PM Subject: import schema to wsdl Hey folks if one refers to a outside shema in a wsdl, like in this listing, types xsd:schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; elementFormDefault = qualified targetNamespace = http://localhost:8080/axis/services/bookflights/wsdl/importtypes; xmlns:bf=http://localhost:8080/axis/services/bookflights/flightbooking; import namespace = http://localhost:8080/axis/services/bookflights/flightbooking; location = FlightBooking.xsd / import namespace = http://www.w3.org/2001/XMLSchema; / /xsd:schema /types should the schema be in the same directory as the wsdl. I've this wsdl in /project/bookflights and the ant build file in /ant. I'm using axis's wsdl2java tool. Just wondering will ant and wsdl2java pick up FlightBooking.xsd. Also would appreciate it if anyone spotted any mistakes in this listing. Regards, James. -- Between the question and the answer lies free will -- Between the question and the answer lies free will
Re: import schema to wsdl
They don't really matter as long as they are unique within planet Earth. Why else do you think namespaces exist? - Original Message - From: James Taylor [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, June 06, 2005 1:10 AM Subject: Re: import schema to wsdl Sure will give it a spin. I thought the uri's don't really matter as long as they are unique within the document?! Quoting Jeff [EMAIL PROTECTED]: URIs like: http://localhost:8080/axis/services/bookflights/wsdl/importtypes are not suitable for use as namespaces. Try something like: http://ie.tcd/taylorjw/bookflights instead. Jeff - Original Message - From: James Taylor [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Sunday, June 05, 2005 8:48 PM Subject: import schema to wsdl Hey folks if one refers to a outside shema in a wsdl, like in this listing, types xsd:schema xmlns:xsd = http://www.w3.org/2001/XMLSchema; elementFormDefault = qualified targetNamespace = http://localhost:8080/axis/services/bookflights/wsdl/importtypes; xmlns:bf=http://localhost:8080/axis/services/bookflights/flightbooking; import namespace = http://localhost:8080/axis/services/bookflights/flightbooking; location = FlightBooking.xsd / import namespace = http://www.w3.org/2001/XMLSchema; / /xsd:schema /types should the schema be in the same directory as the wsdl. I've this wsdl in /project/bookflights and the ant build file in /ant. I'm using axis's wsdl2java tool. Just wondering will ant and wsdl2java pick up FlightBooking.xsd. Also would appreciate it if anyone spotted any mistakes in this listing. Regards, James. -- Between the question and the answer lies free will -- Between the question and the answer lies free will