/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package jdws3; import iseries.wsbeans.wsstk01a.xsd.WSSTK01AInput; import iseries.wsbeans.wsstk01a.xsd.WSSTK01AResult; import java.util.Scanner; /** * http://10.100.0.1:10043/web/services/WSSTK01A?wsdl * @author User */ public class JdWS3 { public static void main(String[] args) { Scanner obj = new Scanner(System.in); System.out.println("Article Code: "); String codart = obj.next(); WSSTK01AInput param0 = new WSSTK01AInput(); ******** I tried in so many ways and don't figure how i can pass the variable 'codart' to param0 (type WSSTK01AInput) ******** I have included in this source the class WSSTK01AInput and WSSTK01AResult below System.out.println("Article name= "+wsstk01AXML(param0)); } private static String wsstk01AXML(iseries.wsbeans.wsstk01a.xsd.WSSTK01AInput param0) { iseries.wsbeans.wsstk01a.WSSTK01A service = new iseries.wsbeans.wsstk01a.WSSTK01A(); iseries.wsbeans.wsstk01a.WSSTK01APortType port = service.getWSSTK01ASOAP11PortHttp(); return port.wsstk01AXML(param0); } } WSSTK01AInput: package iseries.wsbeans.wsstk01a.xsd; 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.XmlType; /** *
Java class for WSSTK01AInput complex type. * *
The following schema fragment specifies the expected content contained within this class. * *
* <complexType name="WSSTK01AInput"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="_CODART" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> * </complexType> ** * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "WSSTK01AInput", propOrder = { "codart" }) public class WSSTK01AInput { @XmlElementRef(name = "_CODART", namespace = "http://wsstk01a.wsbeans.iseries/xsd", type = JAXBElement.class, required = false) protected JAXBElement
Java class for WSSTK01AResult complex type. * *
The following schema fragment specifies the expected content contained within this class. * *
* <complexType name="WSSTK01AResult"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="_ERRMSG" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="_NOMEARTIGO" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> * </complexType> ** * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "WSSTK01AResult", propOrder = { "errmsg", "nomeartigo" }) public class WSSTK01AResult { @XmlElementRef(name = "_ERRMSG", namespace = "http://wsstk01a.wsbeans.iseries/xsd", type = JAXBElement.class, required = false) protected JAXBElement