On Thursday, June 16, 2011 4:57:12 AM berlindutza wrote:
> Thanks for the answer. I am a newbie in this field and I haven't quite
> understood what you meant.
Before calling the
new ReadVariableNodeService1Service(wsdlURL, SERVICE_NAME);
line, just do wsdlURL.getContent() to make sure it's resolvable.
Dan
>
> Here is the code for the ReadVariableNodeService1Service, which was
> automatically generated on the client side:
>
>
> @WebServiceClient(name = "ReadVariableNodeService1Service",
> wsdlLocation =
> "http://localhost:8080/Prosys_incercare_noua_SERVICII/services/ReadVariableN
> odeService1Port?wsdl", targetNamespace = "http://readAValue/")
> public class ReadVariableNodeService1Service extends Service {
>
> public final static URL WSDL_LOCATION;
>
> public final static QName SERVICE = new QName("http://readAValue/",
> "ReadVariableNodeService1Service");
> public final static QName ReadVariableNodeService1Port = new
> QName("http://readAValue/", "ReadVariableNodeService1Port");
> static {
> URL url = null;
> try {
> url = new
> URL("http://localhost:8080/Prosys_incercare_noua_SERVICII/services/ReadVaria
> bleNodeService1Port?wsdl"); } catch (MalformedURLException e) {
>
> java.util.logging.Logger.getLogger(ReadVariableNodeService1Service.class.get
> Name()) .log(java.util.logging.Level.INFO,
> "Can not initialize the default wsdl from {0}",
> "http://localhost:8080/Prosys_incercare_noua_SERVICII/services/ReadVariableN
> odeService1Port?wsdl"); }
> WSDL_LOCATION = url;
> }
>
> public ReadVariableNodeService1Service(URL wsdlLocation) {
> super(wsdlLocation, SERVICE);
> }
>
> public ReadVariableNodeService1Service(URL wsdlLocation, QName
> serviceName) {
> super(wsdlLocation, serviceName);
> }
>
> public ReadVariableNodeService1Service() {
> super(WSDL_LOCATION, SERVICE);
> }
>
>
> /**
> *
> * @return
> * returns SEIGetVal
> */
> @WebEndpoint(name = "ReadVariableNodeService1Port")
> public SEIGetVal getReadVariableNodeService1Port() {
> return super.getPort(ReadVariableNodeService1Port, SEIGetVal.class);
> }
>
> /**
> *
> * @param features
> * A list of {@link javax.xml.ws.WebServiceFeature} to configure on
> the proxy. Supported features not in the <code>features</code> parameter
> will have their default values.
> * @return
> * returns SEIGetVal
> */
> @WebEndpoint(name = "ReadVariableNodeService1Port")
> public SEIGetVal getReadVariableNodeService1Port(WebServiceFeature...
> features) {
> return super.getPort(ReadVariableNodeService1Port, SEIGetVal.class,
> features);
> }
>
> }
>
>
> ...and the code of the client, where the web service is called:
>
>
> public final class SEIGetVal_ReadVariableNodeService1Port_Client {
>
> private static final QName SERVICE_NAME = new
> QName("http://readAValue/", "ReadVariableNodeService1Service");
>
> private SEIGetVal_ReadVariableNodeService1Port_Client() {
> }
>
> public static void main(String args[]) {
> URL wsdlURL = ReadVariableNodeService1Service.WSDL_LOCATION;
> if (args.length > 0) {
> File wsdlFile = new File(args[0]);
> try {
> if (wsdlFile.exists()) {
> wsdlURL = wsdlFile.toURI().toURL();
> } else {
> wsdlURL = new URL(args[0]);
> }
> } catch (MalformedURLException e) {
> e.printStackTrace();
> }
> }
>
> ReadVariableNodeService1Service ss = new
> ReadVariableNodeService1Service(wsdlURL, SERVICE_NAME);
> SEIGetVal port = ss.getReadVariableNodeService1Port();
>
> {
> System.out.println("Invoking getValue...");
> java.lang.String _getValue_arg0 = "MyLevel";
> try {
> long startTime = System.nanoTime();
>
> double _getValue__return = port.getValue(_getValue_arg0);
> ............................................................................
> ..................
>
>
> Thank you again very much!!!
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Odd-error-with-CXF-Please-help-tp4490161p44
> 94761.html Sent from the cxf-user mailing list archive at Nabble.com.
--
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com