geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fish4trout <>
Subject Geronimo, JAX WS, JAXB
Date Thu, 18 Sep 2008 19:19:53 GMT

I am new to JAX WS and Geronimo but am having a difficult time with the XML
mapping for a simple POJO Web Service that returns String[].

Here is the code:
package com.praxis.webservice.jaxws.reportmanager;

import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

        targetNamespace = "")
public interface ReportManger {

	public String getReportName(@WebParam int id);
	public String[] searchByID(@WebParam String iD);
	public Report getReport(@WebParam int id);


package com.praxis.webservice.jaxws.reportmanager;

import java.util.ArrayList;

import javax.jws.WebService;

@WebService(serviceName = "ReportManger",
        portName = "ReportMangerPort",
        endpointInterface =
        targetNamespace = "")
public class ReportManagerService implements ReportManger {

	public String getReportName(int id) {
		return "Got report";

	public String[] searchByID(String id) {
		ArrayList<String> res = new ArrayList<String>();
		res.add(new String("1"));
		res.add(new String("10"));
		return res.toArray(new String[0]);

	public Report getReport(int id) {
		return new Report(1,"Test Report");



The service deploys to Geronimo "getReportName" and "getReport" work as
The "searchByID" call always returns an array of size 1 with "" as the

The snippet of the xsd from the Geronimo server descripes the return element


<xs:complexType name="searchByIDResponse">
                   <xs:element maxOccurs="unbounded" minOccurs="0"
name="reportIDs" type="xs:string"/>


However the soap message body returned from the call contains this:


I have used the identical code for the Java classes and deployed the service
to a JBoss server. Although the xsd description is similar to the Geronimo
xsd the JBoss server returns this:

Does anyone have a suggestion as to what I may be doing wrong?

View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message