Skip to main content

Seeing this issue again JAX-WS RI 2.2.5 - JAXWS 2.2 wsgen does not generate the correct wsdl and schema files

2 replies [Last post]
mcs130
Offline
Joined: 2006-01-26
Points: 0

Hello

I am currently using Ant tasks for wsgen and wsimport using the latest JAX-WS RI 2.2.5 libraries. I have an annotated endpoint service class in one package and have various type classes located in another package. Normally, as I have seen with previous releases 2.1.X, I would expect to see the WSDL file created along with the necessary XSD files imported where the XSDs have the respective namespaces correlating to the package names (in reverse). The "type" classes all have proper JAXB annotations on them such as:

package com.acme.book.services.dvo;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Book", namespace="http://dvo.services.book.acme.com/")
public class Book {

<code removed>   }

package com.acme.book.webservices;

import java.util.ArrayList;
import java.util.List;

import javax.jws.HandlerChain;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

import org.apache.log4j.Logger;

import com.acme.book.services.BookOrderManagerService;
import com.acme.book.services.dvo.Book;
import com.acme.book.services.dvo.BookOrder;

@WebService(name = "BookOrderManagerService", serviceName = "BookOrderManagerService", portName = "BookOrderManagerServicePort")
@HandlerChain(file = "handler-chain.xml")
public class BookOrderManagerWS implements BookOrderManagerService {

<code removed>   }

This has worked fine before... but now using the newer JAR files (2.2.5), all I am getting is the single WSDL file (expected) but with ONE xsd file (NOT expected) that has everything dumped into ONE namespace ....

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0" targetNamespace="http://webservices.book.acme.com/" xmlns:tns="http://webservices.book.acme.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">

...the namespace of the service endpoint only. This appears to describe what is found here now: (supposedly fixed in 2.2.2 per the link below)

http://java.net/jira/browse/JAX_WS-823?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel

Has this been fixed for the Ant tasks as well, or has somehow the bug shown back up again? Nothing I try can seem to get around this now.

Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mcs130
Offline
Joined: 2006-01-26
Points: 0

submitted a defect http://java.net/jira/browse/JAX_WS-1030 since reverting to 2.1.7 resolved problem, indicating defect was somehow introduced in 2.2.x

mcs130
Offline
Joined: 2006-01-26
Points: 0

For the record - the problem appears to occur w/ versions JAX-WS RI 2.2.1, 2.2.3 and 2.2.5 (tried all 3 versions). Then, I just installed the last available version of JAX-WS RI 2.1.x - appears to be 2.1.7 found at http://jax-ws.java.net/2.1.7 based on the link from here: http://jax-ws.java.net/

I re-ran the Ant build script w/ the wsgen taskdef set up to resolve from the 2.1.7 location - the problem does NOT occur IN THIS CASE. The issue appears to have been introduced in 2.2.x. Now I get the WSDL with the 3 EXPECTED XSD files instead of only ONE. I would presume that this would be considered a severe defect in the 2.2.x version of the libraries. I have not tried running as a direct "command line" so perhaps it was fixed there for folks who use wsgen that way - but clearly it appears the Wsgen Ant task DOES NOT work correctly.