[Issue 541] New - JAX-WS2.1 is unable to consume Axis2 services

View: New views
8 Messages — Rating Filter:   Alert me  

[Issue 541] New - JAX-WS2.1 is unable to consume Axis2 services

by mkuchtiak-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://jax-ws.dev.java.net/issues/show_bug.cgi?id=541
                 Issue #|541
                 Summary|JAX-WS2.1 is unable to consume Axis2 services
               Component|jax-ws
                 Version|JAXWS 2.1 EA3
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|wsimport
             Assigned to|issues@jax-ws
             Reported by|mkuchtiak






------- Additional comments from mkuchtiak@... Fri Mar 14 17:00:41 +0000 2008 -------
I've created Axis2 web service wrom wsdl, that imports schema file :

Originaly I had a simple Test2WS.wsdl and schema2.xsd :
This is part from my Test2WS.wsdl :
....
<wsdl:types>
  <xsd:schema>
    <xsd:import namespace="http://xml.netbeans.org/examples/targetNS/xsd"
schemaLocation="schema2.xsd"/>
....

After I pass this wsdl file to Axis (wsdl2java utility) the wsdl is changed in
the following way :

Axis2 modification to Test2WS.wsdl :
....
<wsdl:types>
  <xsd:schema>
    <xsd:import namespace="http://xml.netbeans.org/examples/targetNS/xsd"
schemaLocation="Test2WS?xsd=xsd0.xsd"/>
....

When I deploy this Axis2 service to Tomcat - it works correctly :

The wsdl is located at :
http://localhost:8081/axis2/services/Test2WS?wsdl
The schema file is located at :
http://localhost:8080/axis2/services/Test2WS?wsdl
http://localhost:8080/axis2/services/Test2WS?xsd=xsd0.xsd

That's absolutely correct.

When I try to create JAX-WS client using wsimport, I get the error messages :

[ERROR] Unable to parse "Test2WS?xsd=xsd0.xsd" :
/usr/local/home/mkuchtiak/NetBeansProjects/JavaApplication1/xml-resources/web-service-references/Test2WS/wsdl/localhost_8081/axis2/services/Test2WS
(No such file or directory)
  line 5 of
file:/usr/local/home/mkuchtiak/NetBeansProjects/JavaApplication1/xml-resources/web-service-references/Test2WS/wsdl/localhost_8081/axis2/services/Test2WS.wsdl

[ERROR] Unable to parse "Test2WS?xsd=xsd0.xsd" :
/usr/local/home/mkuchtiak/NetBeansProjects/JavaApplication1/xml-resources/web-service-references/Test2WS/wsdl/localhost_8081/axis2/services/Test2WS
(No such file or directory)

Failed to read the WSDL document:
file:/usr/local/home/mkuchtiak/NetBeansProjects/JavaApplication1/xml-resources/web-service-references/Test2WS/wsdl/localhost_8081/axis2/services/Test2WS.wsdl,
because 1) could not find the document; /2) the document could not be read; 3)
the root element of the document is not <wsdl:definitions>.


[ERROR] Could not find wsdl:service in the provide WSDL(s):

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 541] JAX-WS2.1 is unable to consume Axis2 services

by jitu-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://jax-ws.dev.java.net/issues/show_bug.cgi?id=541



User jitu changed the following:

                What    |Old value                 |New value
================================================================================
             Assigned to|issues@jax-ws             |ramapulavarthi
--------------------------------------------------------------------------------




------- Additional comments from jitu@... Fri Mar 14 21:02:58 +0000 2008 -------
Assigning this to Rama

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 541] JAX-WS2.1 is unable to consume Axis2 services

by mkuchtiak-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://jax-ws.dev.java.net/issues/show_bug.cgi?id=541



User mkuchtiak changed the following:

                What    |Old value                 |New value
================================================================================
                Priority|P3                        |P2
--------------------------------------------------------------------------------




------- Additional comments from mkuchtiak@... Mon Mar 17 12:29:04 +0000 2008 -------
I consider the issue quite serious.
The URL of imported schema is correct, however JAX-WS isn't able to resolve it.

Increasing priority to P2.

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 541] JAX-WS2.1 is unable to consume Axis2 services

by ramapulavarthi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://jax-ws.dev.java.net/issues/show_bug.cgi?id=541






------- Additional comments from ramapulavarthi@... Fri Mar 21 22:21:32 +0000 2008 -------
I am not sure if this is bug with JAX-WS RI.

Can you the wsimport tool directly on the wsdl directly i.e
http://localhost:8081/axis2/services/Test2WS?wsdl
If it does n't run, then its definitely a problem with wsimport.
If it runs fine, I suspect it has to do something with the Netbeans. As I know
Netbeans fetches the wsdl and schema and stores them  in to xml-resources, and
tries to run wsimport on the local fetched wsdl. Is there file named
Test2WS?xsd=xsd0.xsd htat the local wsdl seems to import in xml-resources dir.
Please check if the wsdl and schema files are saved correctly in
xml-resources/web-service-references/ and are resolvable.


Also, Please attach a Netbeans sample project to reproduce the issue.

 

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 541] JAX-WS2.1 is unable to consume Axis2 services

by mkuchtiak-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://jax-ws.dev.java.net/issues/show_bug.cgi?id=541






------- Additional comments from mkuchtiak@... Tue Mar 25 13:52:53 +0000 2008 -------
I tested the wsimport outside Netbeans.
It works fine, so there is no problem with url itself.

Nevertheless, in Netbeans we have an issue and we need some help.

Short description of the problem:

1.
These are the URLs of wsdl and xsd files (created by Axis2):
http://localhost:8080/axis2/services/Test2WS?wsdl
http://localhost:8080/axis2/services/Test2WS?xsd=xsd0.xsd

xml schema is referenced, relatively, from wsdl using:
schemaLocation="Test2WS?xsd=xsd0.xsd"

2.
Netbeans downloads the wsdl and schema files into a project under a following
location :
project_home/xml_resources/Test2WS/wsdl/axis2/services/Test2WS.wsdl
project_home/xml_resources/Test2WS/wsdl/axis2/services/Test2WS.xsd_xsd0.xsd

And creates a catalog.xml file with the following entries:
    <system systemId="http://localhost:8080/axis2/services/Test2WS?wsdl"
uri="xml-resources/Test2WS/wsdl/axis2/services/Test2WS.wsdl"/>
    <system systemId="http://localhost:8080/axis2/services/Test2WS?xsd=xsd0.xsd"
uri="xml-resources/Test2WS/wsdl/axis2/services/Test2WS.xsd_xsd0.xsd"/>

3.
Finally Netbeans runs the wsimport ant task by passing the local wsdl file and
catalog.xml file as arguments.

The wsimport is not able to find the schema file (that is referenced from local
wsdl in the form of query paramater: schemaLocation="Test2WS?xsd=xsd0.xsd").

Question.
Is there any way to use the catalog.xml file for this kind of relative schema
references ?

Thank You for any help.


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 541] JAX-WS2.1 is unable to consume Axis2 services

by ramapulavarthi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://jax-ws.dev.java.net/issues/show_bug.cgi?id=541






------- Additional comments from ramapulavarthi@... Wed Jun 25 00:57:57 +0000 2008 -------
The problem seems to be in the catalog file generated by Netbeans.
Try setting the CatalogManager verbosity property to 3 as described in
http://xml.apache.org/commons/components/resolver/resolver-article.html#ctrlresolver

I guess this is what is happening when the imported schemas are resolved.

The primary wsdl http://localhost:8081/axis2/services/Test2WS?wsdl  to
project_home/xml_resources/Test2WS/wsdl/axis2/services/Test2WS.wsdl

and this local wsdl is parsed. wsimport sees a imported schema in your local
wsdl with schemaLocation="Test2WS?xsd=xsd0.xsd". Since this is relative to the
local wsdl (Test2WS.wsdl), we try to resolve
project_home/xml_resources/Test2WS/wsdl/axis2/services/Test2WS?xsd=xsd0.xsd
and your catalog has no entry for this. So, wsimport fails.

The catalog entry http://localhost:8080/axis2/services/Test2WS?xsd=xsd0.xsd is
not used, if you are resolving with the local Test2WS.wsdl. The entry should
have been <system
systemId="project_home/xml_resources/Test2WS/wsdl/axis2/services/Test2WS?xsd=xsd0.xsd"
uri="xml-resources/Test2WS/wsdl/axis2/services/Test2WS.xsd_xsd0.xsd"/>

Another solution  is to use namespace uris instead of system identifiers for
resolving the referenced schema.

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 541] JAX-WS2.1 is unable to consume Axis2 services

by mkuchtiak-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://jax-ws.dev.java.net/issues/show_bug.cgi?id=541






------- Additional comments from mkuchtiak@... Mon Jun 30 13:48:43 +0000 2008 -------
Thanks,

I was trying to apply the first solution but with no success.

Can you please describe more the second solution - with namespace URI.
Is that related to a specific catalog configuration ?
Can you please send me some examples.

Note:
We cannot modify schema references in existing wsdl file.


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 541] JAX-WS2.1 is unable to consume Axis2 services

by mkuchtiak-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://jax-ws.dev.java.net/issues/show_bug.cgi?id=541






------- Additional comments from mkuchtiak@... Mon Jun 30 14:40:19 +0000 2008 -------
I am afraid the solution described here doesn't work:

systemId="project_home/xml_resources/Test2WS/wsdl/axis2/services/Test2WS?xsd=xsd0.xsd"
uri="..."

I had to type the full path :

systemId="file:/home/mkuchtiak/nbprojects/project_home/xml_resources/Test2WS/wsdl/axis2/services/Test2WS?xsd=xsd0.xsd"
uri="..."

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...