[ 
https://issues.apache.org/jira/browse/AXIS2-4160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652860#action_12652860
 ] 

Jeff Faath commented on AXIS2-4160:
-----------------------------------

Andreas,

I did step through the code when I discovered the issue.  I can give you a 
brief description of what I found.

When retrieving the main WSDL (via, say, 
http://localhost:8080/juddi/services/MyService.MyServiceImplPort?wsdl) the code 
would invoke JAX-WS's "wsgen" utility to generate the WSDL(s) and stick them in 
the work directory.  In my case, the utility generated two WSDLs, where one 
imported the other.  Looking in the work directory, both files were in the same 
directory, so the import tag's location attribute simply names the file of the 
WSDL to import.  However, Axis2 re-writes this attribute to something like this:

from
location="MyServicePortType.wsdl"
to
location="MyService.MyServiceImplPort?wsdl=MyServicePortType.wsdl"

Then, when trying to access this URL:

http://localhost:8080/juddi/services/MyService.MyServiceImplPort?wsdl=MyServicePortType.wsdl

an error is returned.  It's a generic error, something about Axis2 not being 
able to create a SOAP 1.1 error without a certain setting.

Looking through the code, it seems that it's not looking for 
MyServicePortType.wsdl, but rather trying to get a parameter of MyService's 
AxisService object named "wsdl4jdefinition".  This parameter ends up being null 
and the process errors out.

This is all for the jUDDI project, so I normally could provide you with the 
problem war.  However, I've since fixed the issue with a workaround.  I've 
found a way to prevent JAX-WS from generating two WSDLs.  For those interested, 
you simply need to declare the same "targetNamespace" attribute on the 
@WebService annotation for both the SEI and the implementation class.

I still think there is an issue here, but it can be avoided with the 
workaround.  Perhaps the issue should be downgraded to minor.

> Generated WSDL that imports another WSDL (also generated) results in broken 
> URI
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-4160
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4160
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.4.1
>            Reporter: Jeff Faath
>
> I have JAX-WS services deployed in Axis2.  The WSDLs are properly generated.  
> However, the main WSDL imports another WSDL.  Axis2 rewrites the location 
> attribute of the import tag to something like:
> <main WSDL url>?wsdl=<imported WSDL name>
> So really, the only URL difference from the actual main service WSDL is the 
> 'wsdl' parameter is set to equal the file name of the imported WSDL.
> When trying to access this modified URL, a WSDL error is returned.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to