Hi, http://issues.apache.org/jira/browse/AXIS2-3114 is not related to this. But as I see it you have no issue. When you give a developer a WSDL to test will you ge giving him this WSDL url? I suppose thats how you would do it and when this WSDL url is given to your developer, the tool that he is using will be able to resolve this schema location correctly.
But if you are handing over the WSDL as a file to him you will have to put the schema along side it and edit the schemalocation in the wsdl accordingly. Thanks, Keith. On Wed, Sep 3, 2008 at 3:35 PM, Davefeeder <[EMAIL PROTECTED]> wrote: > > Hello, > > Yeah, I've already generated code stubs with wsdl2java, to generate the > skeletonReciever class as well as the recieverInOut class. > Here's the command line parameters I've used: > wsdl2java.bat -p com.example.packagestructure -noBuildXML -uri example.wsdl > -ss -s -d none -sd > > The code is generated correcly (as far as I can tell), but the issue is > still there when getting Axis to generate the wsdl using "?wsdl" at the end > of the url. > It'll always work fine when the schemas are on the machine you use, but > when > someone on a different machine tries to get the wsdl in this manner (with a > view to usign it for development purposes) the schema location is still > relative, which will be of no use to them, as they wont have access to > them. > > I believe there's an issue around this raised on Apache's website: > http://issues.apache.org/jira/browse/AXIS2-3114 > Currently in an unresolved state. > > Cheers > > Dave > > > keith chapman wrote: > > > > Hi, > > > > Can you try using wsdl2java to generate a stub for this wsdl. If it works > > that means that the schema resolving works as it should. If it does not > > then > > there is a bug somewhere. Can you try this out and get back with the > > result. > > > > Thanks, > > Keith. > > > > On Wed, Sep 3, 2008 at 1:43 PM, Davefeeder <[EMAIL PROTECTED]> > wrote: > > > >> > >> Hi Keith, > >> > >> thanks for your response. > >> I'm relatively new to webservices so apologies if my query was a bit > >> clumsy! > >> > >> The link to the foo examples in your post just return an error message > >> for > >> me I'm afraid. > >> I'll try and elaborate on my post to see if it clarifies my query. > >> > >> The application I'm developing will be used by third parties, and > >> potentially be hosted on a different machine to the people using it. > >> I am envisaging third party developers constructing their own tools to > >> supply messages to my application, and for this they'll need to have the > >> wsdls. > >> The problem will occur when they get Axis2 to generate the wsdls, and > the > >> schema lcoation comes back as relative to their own machine (which won't > >> have the schemas on them), like this: > >> <xsd:schema> > >> <xsd:import namespace="http://example.co.uk/namespace/1" > >> schemaLocation="Example?xsd=example.xsd"/> > >> </xsd:schema> > >> If they try and use this wsdl to hit the service, it wont work as it > >> won't > >> be able to locate the schema to import. > >> > >> Does that make any more sense? > >> Apologies if it doesn't, I've only had one coffee so far. > >> > >> > >> Dave > >> > >> > >> > >> keith chapman wrote: > >> > > >> > Hi Dave, > >> > > >> > If you get the following WSDL at > >> > http://foo.com/axis2/services/Example?wsdland if > >> > http://foo.com/axis2/services/Example?xsd=example.xsd gets you the > >> schema > >> > I > >> > don't see an issue with what axis2 generates for you. May be I misread > >> > what > >> > you meant. Could you elaborate more please. > >> > > >> > Thanks, > >> > Keith. > >> > > >> > On Wed, Aug 27, 2008 at 8:34 PM, Davefeeder <[EMAIL PROTECTED]> > >> wrote: > >> > > >> >> > >> >> I am writing an application which uses Axis2 and I'm having a problem > >> >> with > >> >> the WSDL that Axis generates using "?wsdl" at the webservice url. > >> >> The imported schemas are referenced as relative to the hosting > >> machine, > >> >> rather than fully qualified with a complete url, eg: > >> >> <xsd:schema> > >> >> <xsd:import namespace="http://example.co.uk/namespace/1" > >> >> schemaLocation="Example?xsd=example.xsd"/> > >> >> </xsd:schema> > >> >> > >> >> Instead of: > >> >> <xsd:schema> > >> >> <xsd:import namespace="http://example.co.uk/namespace/1" > >> >> schemaLocation="Example?xsd=http://192.0.0.1/example.xsd"/> > >> >> </xsd:schema> > >> >> > >> >> I can't hard code the IP address and force Axis to return the WSDL > >> I've > >> >> written, as it's going to be run on different machines each time. > >> >> > >> >> I've found people that have had similar issues, but none which were > >> >> resolved > >> >> without hard coding the fully qualified schema location in the > >> original > >> >> WSDL. > >> >> > >> >> Can anyone help? > >> >> > >> >> Many thanks, > >> >> > >> >> Dave > >> >> -- > >> >> View this message in context: > >> >> > >> > http://www.nabble.com/Axis-generated-WSDL-not-importing-schema-correctly-tp19182932p19182932.html > >> >> Sent from the Axis - User mailing list archive at Nabble.com. > >> >> > >> >> > >> >> --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> >> For additional commands, e-mail: [EMAIL PROTECTED] > >> >> > >> >> > >> > > >> > > >> > -- > >> > Keith Chapman > >> > Senior Software Engineer > >> > WSO2 Inc. > >> > Oxygenating the Web Service Platform. > >> > http://wso2.org/ > >> > > >> > blog: http://www.keith-chapman.org > >> > > >> > > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/Axis-generated-WSDL-not-importing-schema-correctly-tp19182932p19284803.html > >> Sent from the Axis - User mailing list archive at Nabble.com. > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > -- > > Keith Chapman > > Senior Software Engineer > > WSO2 Inc. > > Oxygenating the Web Service Platform. > > http://wso2.org/ > > > > blog: http://www.keith-chapman.org > > > > > > -- > View this message in context: > http://www.nabble.com/Axis-generated-WSDL-not-importing-schema-correctly-tp19182932p19286336.html > Sent from the Axis - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Keith Chapman Senior Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://www.keith-chapman.org
