[
https://issues.apache.org/jira/browse/AXIS2-5058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199128#comment-13199128
]
John D'costa commented on AXIS2-5058:
-------------------------------------
We have the same issue. Cannot build client using the maven plugin wsdl2java.
It is failing to compile. Showing up following exception.
axis2-wsdl2code-maven-plugin:1.4:wsdl2code (default) @ accessmanagerclient ---
Retrieving document at 'src/main/resources/AMServices.wsdl'.
Retrieving schema at 'http://localhost:8001/am-services/AMServices?xsd=1',
relative to
'file:/C:/ws/sso/accessmanagerclient/src/main/resources/AMServices.wsdl'.
java.io.IOException: Server returned HTTP response code: 401 for URL:
http://localhost:8001/am-services/AMServices?xsd=1
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1290)
at java.net.URL.openStream(URL.java:1009)
at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:288)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:111)
at
org.apache.axis2.maven2.wsdl2code.WSDL2CodeMojo.execute(WSDL2CodeMojo.java:558)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.141s
[INFO] Finished at: Thu Feb 02 10:53:34 PST 2012
[INFO] Final Memory: 5M/9M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.axis2:axis2-wsdl2code-maven-plugin:1.4:wsdl2code (default) on
project accessmanagerclient: Error parsing WSDL: WSDLException (at
/definitions/types/xsd:schema[1]): faultCode=OTHER_ERROR: An error occurred
trying to resolve schema referenced at
'http://localhost:8001/am-services/AMServices?xsd=1', relative to
'file:/C:/ws/sso/accessmanagerclient/src/main/resources/AMServices.wsdl'.:
java.io.IOException: Server returned HTTP response code: 401 for URL:
http://localhost:8001/am-services/AMServices?xsd=1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> Error while accessing the schema of a hierarchical service which has a schema
> import in the WSDL
> ------------------------------------------------------------------------------------------------
>
> Key: AXIS2-5058
> URL: https://issues.apache.org/jira/browse/AXIS2-5058
> Project: Axis2
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.6.0
> Reporter: Isuru Eranga Suriarachchi
> Assignee: Isuru Eranga Suriarachchi
> Priority: Critical
> Fix For: nightly
>
>
> When accessing the schema of a hierarchical service which has a schema import
> in the WSDL, following error occurs.
> [ERROR] The endpoint reference (EPR) for the Operation not found is
> /axis2/services/foo/bar/SampleService?xsd=SampleService_schema1.xsd and the
> WSA Action = null. If this EPR was previously reachable, please contact the
> server administrator.
> org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation
> not found is
> /axis2/services/foo/bar/SampleService?xsd=SampleService_schema1.xsd and the
> WSA Action = null. If this EPR was previously reachable, please contact the
> server administrator.
> at
> org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:102)
> at org.apache.axis2.engine.Phase.invoke(Phase.java:329)
> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:168)
> at
> org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144)
> at
> org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:139)
> at
> org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:275)
> at
> org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
> at
> org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
> at
> org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> Therefore, such a service can't be invoked by a client as the client can't
> access the schema.
> Thanks,
> ~Isuru
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]