Web Service - Netbeans - JAXB

0 respostas
D

Pessoal, preciso de ajuda urgente em um projeto q estou fazendo. Já recuperei as classes de um WSDL [url]http://189.126.119.68:8080/wssevacourart/services/ServiceWS?wsdl[/url] usando o JAXB utilizei esse exemplo [url]http://netbeans.org/kb/docs/websvc/jaxb.html[/url] , mas não estou conseguindo obter o retorno dessas classes, não estou sabendo fazer.
Vou passar por parâmetro o nome da empresa e tem q me retornar um ID e uma STRING

package br.com.seva.webservice.servicews;

import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"nomeOrganizacao"})
@XmlRootElement(name = "recuperarPlacasPorOrganizacao")
public class RecuperarPlacasPorOrganizacao {

    @XmlElementRef(name = "nomeOrganizacao", namespace = "http://service.seva.com.br", type = JAXBElement.class, required = false)
    protected JAXBElement<String> nomeOrganizacao;

    public JAXBElement<String> getNomeOrganizacao() {
        return nomeOrganizacao;
    }

    public void setNomeOrganizacao(JAXBElement<String> value) {
        this.nomeOrganizacao = value;
    }
}
package br.com.seva.webservice.servicews;

import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"_return"})
@XmlRootElement(name = "recuperarPlacasPorOrganizacaoResponse")
public class RecuperarPlacasPorOrganizacaoResponse {

    @XmlElementRef(name = "return", namespace = "http://service.seva.com.br", type = JAXBElement.class, required = false)
    protected JAXBElement<String> _return;

    public JAXBElement<String> getReturn() {
        return _return;
    }

    public void setReturn(JAXBElement<String> value) {
        this._return = value;
    }
}

O WSDL me retornou um monte de classes, mas o q eu tenho q usar são essas duas.
Obrigado.

Criado 13 de setembro de 2012
Respostas 0
Participantes 1