jbossws-native ignores @XmlSchema annotation on package-info.java
-----------------------------------------------------------------
Key: JBWS-1944
URL:
http://jira.jboss.com/jira/browse/JBWS-1944
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: jbossws-jaxws
Affects Versions: jbossws-2.0.2, jbossws-2.0.1.SP2, jbossws-2.0.1.SP1,
jbossws-2.0.1
Environment: Microsoft Windows XP Home SP2, x86
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
Reporter: Artur Karazniewicz
Seems that current implementations of jbossws-native ignores @XmlSchema annotation on
package in package-info.java.
Please find my test case attached.
Generated Schema is as follows:
{code:title=TestWebService.java endpoint}
package org.acme.service;
import javax.jws.WebService;
import javax.ejb.Stateless;
@WebService()
@Stateless()
public class TestWebSevice {
public void perform(Parms params) {
}
}
{code}
{code:title=Params.java payload}
package org.acme.service;
public class Parms {
public String val;
}
{code}
{code:title=package-info.java}
@XmlSchema(namespace="http://www.acme.org/service",
elementFormDefault=XmlNsForm.QUALIFIED)
package org.acme.service;
import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema;
{code}
generated WSDL:
{code:title=TestWebService WSDL}
<definitions name='TestWebSeviceService'
targetNamespace='http://service.acme.org/'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://service.acme.org/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
<types>
<xs:schema
targetNamespace='http://service.acme.org/' version='1.0'
xmlns:tns='http://service.acme.org/'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:element name='perform' type='tns:perform'/>
<xs:element name='performResponse' type='tns:performResponse'/>
<xs:complexType name='perform'>
<xs:sequence>
<xs:element minOccurs='0' name='arg0'
type='tns:parms'/>
</xs:sequence>
</xs:complexType>
<xs:complexType name='parms'>
<xs:sequence>
<xs:element minOccurs='0' name='val'
type='xs:string'/>
</xs:sequence>
</xs:complexType>
<xs:complexType name='performResponse'>
<xs:sequence/>
</xs:complexType>
</xs:schema>
</types>
<message name='TestWebSevice_perform'>
<part element='tns:perform' name='perform'></part>
</message>
<message name='TestWebSevice_performResponse'>
<part element='tns:performResponse'
name='performResponse'></part>
</message>
<portType name='TestWebSevice'>
<operation name='perform' parameterOrder='perform'>
<input message='tns:TestWebSevice_perform'></input>
<output message='tns:TestWebSevice_performResponse'></output>
</operation>
</portType>
<binding name='TestWebSeviceBinding' type='tns:TestWebSevice'>
<soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='perform'>
<soap:operation soapAction=''/>
<input>
<soap:body use='literal'/>
</input>
<output>
<soap:body use='literal'/>
</output>
</operation>
</binding>
<service name='TestWebSeviceService'>
<port binding='tns:TestWebSeviceBinding'
name='TestWebSevicePort'>
<soap:address location='http://127.0.0.1:8080/test/TestWebSevice'/>
</port>
</service>
</definitions>
{code}
I have checked the same codebase against glassfish v2 with metro, and relevant part of
WSDL (i.e. XSD) looks like below. Note *elementFormDefault="qualified"* and
*targetNamespace="http://www.acme.org/service"*
{code:title=TestWebService XSD from GlassFish v2 and Metro}
<?xml version="1.0" encoding="UTF-8"?>
<!-- Published by JAX-WS RI at
http://jax-ws.dev.java.net. RI's version is JAX-WS
RI 2.1.2-hudson-182-RC1. -->
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" version="1.0"
targetNamespace="http://www.acme.org/service">
<xs:complexType name="parms">
<xs:sequence>
<xs:element name="val" type="xs:string"
minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira