Problems with GroovyWS

View: New views
15 Messages — Rating Filter:   Alert me  

Problems with GroovyWS

by Neil Cherry-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm attempting to use GroovyWS (0.5.0) with the following code:

import groovyx.net.ws.WSClient

@Grab(group='org.codehaus.groovy.modules', module='groovyws', version='0.5.0')

getProxy(wsdl, classLoader) {
    new WSClient(wsdl, classLoader)
}

url = "http://isy.uucp/WEB/udiws10.ws"

proxy = new WSClient(url, this.class.classLoader)

proxy.initialize()

ERROR org.apache.cxf.service.factory.ServiceConstructionException:
NO_SERVICE_EXC
        at org.apache.cxf.wsdl11.WSDLServiceFactory.create (WSDLServiceFactory.java:102)
        at org.apache.cxf.endpoint.ClientImpl.<init> (ClientImpl.java:145)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:253)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:196)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:175)
        at groovyx.net.ws.AbstractCXFWSClient.createClient (AbstractCXFWSClient.java:194)
        at groovyx.net.ws.WSClient.initialize (WSClient.java:107)
        at groovyx.net.ws.IWSClient$initialize.call (Unknown Source)
        at groovysh_evaluate.run (groovysh_evaluate:3)
        ...

I've tried the simplier services from the GrovvyWS page and they work
fine. But what I have noticed with the above is that the rather large
wsdl file gets truncated while sending over the network. I'm unable to
diagnose the problem any further because I'm a bit new to Java, WSDL
and Groovy.

One last data point I was able to test the wsdl with SoupUI and I was able
to validate the wsdl and test the service.

Any pointers what to do next?

--
Linux Home Automation         Neil Cherry       ncherry@...
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:     Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Problems with GroovyWS

by casmall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Neil,

There seem to be issues with dynamic downloading of the wsdl from a url (http://jira.codehaus.org/browse/GMOD-96) that I ran into a couple weeks ago too.  Every soap http header response I've worked with has more than 3 lines.  You could patch the source as the defect describes - works, I tried it.  I've opted to download and use a local .wsdl file instead.  I had to do something like this (I'm in grails app):

        def canonicalPath = (new File(".")).getCanonicalPath()  
        def wsdlFilename = "wsdlFile.wsdl"

        def wsdlURL
        if (ApplicationHolder?.application?.isWarDeployed()) {
            wsdlURL = "file:///${canonicalPath}/../webapps/ROOT/WEB-INF/wsdls/${wsdlFilename}"
        } else {
            wsdlURL = "file:///${canonicalPath}/grails-app/conf/wsdls/${wsdlFilename}"
        }

        def proxy = new WSClient(wsdlURL, this.class.classLoader)
        proxy.initialize()

Now I'm struggling with my proxy.create()  :(  Have other thread on this list.

Good Luck
chad.


Neil Cherry-3 wrote:
I'm attempting to use GroovyWS (0.5.0) with the following code:

import groovyx.net.ws.WSClient

@Grab(group='org.codehaus.groovy.modules', module='groovyws', version='0.5.0')

getProxy(wsdl, classLoader) {
    new WSClient(wsdl, classLoader)
}

url = "http://isy.uucp/WEB/udiws10.ws"

proxy = new WSClient(url, this.class.classLoader)

proxy.initialize()

ERROR org.apache.cxf.service.factory.ServiceConstructionException:
NO_SERVICE_EXC
        at org.apache.cxf.wsdl11.WSDLServiceFactory.create (WSDLServiceFactory.java:102)
        at org.apache.cxf.endpoint.ClientImpl.<init> (ClientImpl.java:145)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:253)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:196)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:175)
        at groovyx.net.ws.AbstractCXFWSClient.createClient (AbstractCXFWSClient.java:194)
        at groovyx.net.ws.WSClient.initialize (WSClient.java:107)
        at groovyx.net.ws.IWSClient$initialize.call (Unknown Source)
        at groovysh_evaluate.run (groovysh_evaluate:3)
        ...

I've tried the simplier services from the GrovvyWS page and they work
fine. But what I have noticed with the above is that the rather large
wsdl file gets truncated while sending over the network. I'm unable to
diagnose the problem any further because I'm a bit new to Java, WSDL
and Groovy.

One last data point I was able to test the wsdl with SoupUI and I was able
to validate the wsdl and test the service.

Any pointers what to do next?

--
Linux Home Automation         Neil Cherry       ncherry@linuxha.com
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:     Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Re: Problems with GroovyWS

by Neil Cherry-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

casmall wrote:

> Hey Neil,
>
> There seem to be issues with dynamic downloading of the wsdl from a url
> (http://jira.codehaus.org/browse/GMOD-96) that I ran into a couple weeks ago
> too.  Every soap http header response I've worked with has more than 3
> lines.  You could patch the source as the defect describes - works, I tried
> it.  I've opted to download and use a local .wsdl file instead.  I had to do
> something like this (I'm in grails app):
>
>         def canonicalPath = (new File(".")).getCanonicalPath()  
>         def wsdlFilename = "wsdlFile.wsdl"
>
>         def wsdlURL
>         if (ApplicationHolder?.application?.isWarDeployed()) {
>             wsdlURL =
> "file:///${canonicalPath}/../webapps/ROOT/WEB-INF/wsdls/${wsdlFilename}"
>         } else {
>             wsdlURL =
> "file:///${canonicalPath}/grails-app/conf/wsdls/${wsdlFilename}"
>         }
>
>         def proxy = new WSClient(wsdlURL, this.class.classLoader)
>         proxy.initialize()
>
> Now I'm struggling with my proxy.create()  :(  Have other thread on this
> list.

I didn't understand a word you said. :-) I'm still relearning Java etal.
I'll play with the code and see what it does (I think I understand that
part). I've had no luck getting GroovyWS to compile as I have no idea
how Grails works or what the error message I'm getting means. Since I'm
not trying to learn Gradle yet I've decided to leave that one alone..

Thanks for the pointer and I am following your GroovyWS discussion.

--
Linux Home Automation         Neil Cherry       ncherry@...
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:     Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Problems with GroovyWS

by casmall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I might have jumped the gun on your issue anyway Neil.  This url should point to the wsdl of the web service you are calling into. "http://isy.uucp/WEB/udiws10.ws"   I'm not sure this is the case - at least from the public internet, I couldn't resolve the url.  And wsdl url's commonly end in ?WSDL.

chad.

Neil Cherry-3 wrote:
casmall wrote:
> Hey Neil,
>
> There seem to be issues with dynamic downloading of the wsdl from a url
> (http://jira.codehaus.org/browse/GMOD-96) that I ran into a couple weeks ago
> too.  Every soap http header response I've worked with has more than 3
> lines.  You could patch the source as the defect describes - works, I tried
> it.  I've opted to download and use a local .wsdl file instead.  I had to do
> something like this (I'm in grails app):
>
>         def canonicalPath = (new File(".")).getCanonicalPath()  
>         def wsdlFilename = "wsdlFile.wsdl"
>
>         def wsdlURL
>         if (ApplicationHolder?.application?.isWarDeployed()) {
>             wsdlURL =
> "file:///${canonicalPath}/../webapps/ROOT/WEB-INF/wsdls/${wsdlFilename}"
>         } else {
>             wsdlURL =
> "file:///${canonicalPath}/grails-app/conf/wsdls/${wsdlFilename}"
>         }
>
>         def proxy = new WSClient(wsdlURL, this.class.classLoader)
>         proxy.initialize()
>
> Now I'm struggling with my proxy.create()  :(  Have other thread on this
> list.

I didn't understand a word you said. :-) I'm still relearning Java etal.
I'll play with the code and see what it does (I think I understand that
part). I've had no luck getting GroovyWS to compile as I have no idea
how Grails works or what the error message I'm getting means. Since I'm
not trying to learn Gradle yet I've decided to leave that one alone..

Thanks for the pointer and I am following your GroovyWS discussion.

--
Linux Home Automation         Neil Cherry       ncherry@linuxha.com
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:     Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Re: Problems with GroovyWS

by Neil Cherry-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

casmall wrote:
> I might have jumped the gun on your issue anyway Neil.  This url should point
> to the wsdl of the web service you are calling into.
> "http://isy.uucp/WEB/udiws10.ws"   I'm not sure this is the case - at least
> from the public internet, I couldn't resolve the url.  And wsdl url's
> commonly end in ?WSDL.

Sorry the .uucp domain is no longer in use outside my home (I hope).
the is.uucp resolves from inside my home to 192.168.24.21. If you'd
like to see the wsdl (udiws10.ws) file I can post a link to it on
my web site. The device that serves up that file is a ISY99i
( http://www.universal-devices.com/99i.htm ). It's a web server
interface to the Insteon devices on the power line (home automation).

--
Linux Home Automation         Neil Cherry       ncherry@...
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:     Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Problems with GroovyWS

by tog :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

Yes it might help to see the wsdl. Is a wget on the url pointing to your wsdl working ?

Regards
Guillaume

On Mon, Nov 9, 2009 at 8:10 AM, Neil Cherry <ncherry@...> wrote:
casmall wrote:
> I might have jumped the gun on your issue anyway Neil.  This url should point
> to the wsdl of the web service you are calling into.
> "http://isy.uucp/WEB/udiws10.ws"   I'm not sure this is the case - at least
> from the public internet, I couldn't resolve the url.  And wsdl url's
> commonly end in ?WSDL.

Sorry the .uucp domain is no longer in use outside my home (I hope).
the is.uucp resolves from inside my home to 192.168.24.21. If you'd
like to see the wsdl (udiws10.ws) file I can post a link to it on
my web site. The device that serves up that file is a ISY99i
( http://www.universal-devices.com/99i.htm ). It's a web server
interface to the Insteon devices on the power line (home automation).

--
Linux Home Automation         Neil Cherry       ncherry@...
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:      Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
PGP KeyID: 1024D/69B00854  subkeys.pgp.net

http://cheztog.blogspot.com

Re: Problems with GroovyWS

by Neil Cherry-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

tog wrote:
> Hi
>
> Yes it might help to see the wsdl. Is a wget on the url pointing to your
> wsdl working ?

Yes, it works for the most part (found an extra " in the middle of
the file with no purpose, have to file a bug on that with the
vendor). Here's the file on my site after I did a wget:

http://www.linuxha.com/common/udiws10.ws

It's the untouched file.

--
Linux Home Automation         Neil Cherry       ncherry@...
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:     Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Problems with GroovyWS

by tog :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok I guess you are missing the service part with the port in your wsdl. It should be something like this:

<wsdl:service name="TerraService">
    <wsdl:port name="TerraServiceSoap" binding="tns:TerraServiceSoap">
        <soap:address location="http://terraservice.net/TerraService.asmx"/>
    </wsdl:port>
</wsdl:service>

On Mon, Nov 9, 2009 at 9:35 AM, Neil Cherry <ncherry@...> wrote:
tog wrote:
> Hi
>
> Yes it might help to see the wsdl. Is a wget on the url pointing to your
> wsdl working ?

Yes, it works for the most part (found an extra " in the middle of
the file with no purpose, have to file a bug on that with the
vendor). Here's the file on my site after I did a wget:

http://www.linuxha.com/common/udiws10.ws

It's the untouched file.

--
Linux Home Automation         Neil Cherry       ncherry@...
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:      Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
PGP KeyID: 1024D/69B00854  subkeys.pgp.net

http://cheztog.blogspot.com

Re: Problems with GroovyWS

by Neil Cherry-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

tog wrote:
> Ok I guess you are missing the service part with the port in your wsdl.
> It should be something like this:
>
> <wsdl:service name="TerraService">
>     <wsdl:port name="TerraServiceSoap" binding="tns:TerraServiceSoap">
>         <soap:address location="http://terraservice.net/TerraService.asmx"/>
>     </wsdl:port>
> </wsdl:service>

Oh, sorry, I tried so many different things that I last tried the
previous file. Here's the initial file:

http://www.linuxha.com/common/services.wsdl

Normally it would be called with:

http://isy.uucp/services.wsdl

--
Linux Home Automation         Neil Cherry       ncherry@...
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:     Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Problems with GroovyWS

by tog :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The initial file does not go through the CXF wsdl2java :( Is this the one having an extra " ?
If yes can you tell me where is is located ?

On Mon, Nov 9, 2009 at 10:56 AM, Neil Cherry <ncherry@...> wrote:
tog wrote:
> Ok I guess you are missing the service part with the port in your wsdl.
> It should be something like this:
>
> <wsdl:service name="TerraService">
>     <wsdl:port name="TerraServiceSoap" binding="tns:TerraServiceSoap">
>         <soap:address location="http://terraservice.net/TerraService.asmx"/>
>     </wsdl:port>
> </wsdl:service>

Oh, sorry, I tried so many different things that I last tried the
previous file. Here's the initial file:

http://www.linuxha.com/common/services.wsdl

Normally it would be called with:

http://isy.uucp/services.wsdl

--
Linux Home Automation         Neil Cherry       ncherry@...
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:      Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
PGP KeyID: 1024D/69B00854  subkeys.pgp.net

http://cheztog.blogspot.com

Re: Problems with GroovyWS

by Neil Cherry-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

tog wrote:
> The initial file does not go through the CXF wsdl2java :( Is this the
> one having an extra " ?

That would be the udiws10.ws file that has the extra " .

> If yes can you tell me where is is located ?

     http://www.linuxha.com/common/udiws10.ws

Normally it would be referenced from:

     http://isy.uucp/services.wsdl

Now I've noted that at least one person attempted to use GroovyWS
to access the services.wsdl and the udiws10.ws via my linuxha.com
site (thanks, I really do appreciate the effort) so I also put
the files in the following locations that should work:

http://www.linuxha.com/services.wsdl

and

http://www.linuxha.com/WEB/udiws10.ws

I think that will work and I just tested it failed similarly to
the actual local isy.uucp device.

--
Linux Home Automation         Neil Cherry       ncherry@...
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:     Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Problems with GroovyWS

by tog :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Ok thanks for putting files online. Actually now I am getting an error when compiling the wsdl. Since this is happening in cxf, I want to make sure the wsdl is correct.
I remember that sometimes back you mentionned that the wsdl had an extra "
Is that in the (online) version which I am using ?

Regards

On Mon, Nov 9, 2009 at 8:26 PM, Neil Cherry <ncherry@...> wrote:
tog wrote:
> The initial file does not go through the CXF wsdl2java :( Is this the
> one having an extra " ?

That would be the udiws10.ws file that has the extra " .

> If yes can you tell me where is is located ?

    http://www.linuxha.com/common/udiws10.ws

Normally it would be referenced from:
Now I've noted that at least one person attempted to use GroovyWS
to access the services.wsdl and the udiws10.ws via my linuxha.com
site (thanks, I really do appreciate the effort) so I also put
the files in the following locations that should work:

http://www.linuxha.com/services.wsdl

and

http://www.linuxha.com/WEB/udiws10.ws

I think that will work and I just tested it failed similarly to
the actual local isy.uucp device.

--
Linux Home Automation         Neil Cherry       ncherry@...
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:      Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
PGP KeyID: 1024D/69B00854  subkeys.pgp.net

http://cheztog.blogspot.com

Re: Problems with GroovyWS

by Neil Cherry-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

tog wrote:
> Hi,
>
> Ok thanks for putting files online. Actually now I am getting an error
> when compiling the wsdl. Since this is happening in cxf, I want to make
> sure the wsdl is correct.
> I remember that sometimes back you mentionned that the wsdl had an extra "
> Is that in the (online) version which I am using ?

Yes, teh udiws10.ws file has an estra " and lacks a ^M also at that
point. I've posted a second version with the " removed and a ^M added.
In addition I adjusted the services.wsdl file to point to the new file.
Here they are:

http://www.linuxha.com/services2.wsdl

http://www.linuxha.com/WEB/udiws102.ws

I attempted to use them from GroovyWS:

import groovyx.net.ws.WSClient;

@Grab(group='org.codehaus.groovy.modules', module='groovyws', version='0.5.0')

def getProxy(wsdl, classLoader) {
  new WSClient(wsdl, classLoader);
};

url = "http://www.linuxha.com/WEB/services2.wsdl";

isy = getProxy(url, this.class.classLoader);

isy.initialize()

but I get the same error:

groovy:000> isy.initialize()
ERROR java.lang.reflect.UndeclaredThrowableException:
null
        at $Proxy33.bind (Unknown Source)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:280)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:196)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:175)
        at groovyx.net.ws.AbstractCXFWSClient.createClient (AbstractCXFWSClient.java:194)
        at groovyx.net.ws.WSClient.initialize (WSClient.java:107)
        at groovyx.net.ws.IWSClient$initialize$0.call (Unknown Source)
        at groovysh_evaluate.run (groovysh_evaluate:3)
        ...

--
Linux Home Automation         Neil Cherry       ncherry@...
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:     Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Problems with GroovyWS

by tog :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok fine, this is then either a CXF problem or a wsdl compatibility issue. I will find this out with the cxf folks.

On Wed, Nov 11, 2009 at 6:11 PM, Neil Cherry <ncherry@...> wrote:
tog wrote:
> Hi,
>
> Ok thanks for putting files online. Actually now I am getting an error
> when compiling the wsdl. Since this is happening in cxf, I want to make
> sure the wsdl is correct.
> I remember that sometimes back you mentionned that the wsdl had an extra "
> Is that in the (online) version which I am using ?

Yes, teh udiws10.ws file has an estra " and lacks a ^M also at that
point. I've posted a second version with the " removed and a ^M added.
In addition I adjusted the services.wsdl file to point to the new file.
Here they are:

http://www.linuxha.com/services2.wsdl

http://www.linuxha.com/WEB/udiws102.ws

I attempted to use them from GroovyWS:

import groovyx.net.ws.WSClient;

@Grab(group='org.codehaus.groovy.modules', module='groovyws', version='0.5.0')

def getProxy(wsdl, classLoader) {
 new WSClient(wsdl, classLoader);
};

url = "http://www.linuxha.com/WEB/services2.wsdl";

isy = getProxy(url, this.class.classLoader);

isy.initialize()

but I get the same error:

groovy:000> isy.initialize()
ERROR java.lang.reflect.UndeclaredThrowableException:
null
       at $Proxy33.bind (Unknown Source)
       at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:280)
       at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:196)
       at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:175)
       at groovyx.net.ws.AbstractCXFWSClient.createClient (AbstractCXFWSClient.java:194)
       at groovyx.net.ws.WSClient.initialize (WSClient.java:107)
       at groovyx.net.ws.IWSClient$initialize$0.call (Unknown Source)
       at groovysh_evaluate.run (groovysh_evaluate:3)
       ...

--
Linux Home Automation         Neil Cherry       ncherry@...
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:      Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
PGP KeyID: 1024D/69B00854  subkeys.pgp.net

http://cheztog.blogspot.com

Re: Problems with GroovyWS

by tog :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

It is working fine with the attached wsdl using the following code.

import groovyx.net.ws.WSClient

@Grab(group='org.codehaus.groovy.modules', module='groovyws', version='0.5.1-SNAPSHOT')
def getProxy(wsdl, classLoader) {
        new WSClient(wsdl, classLoader)
}
//def url="http://www.linuxha.com/WEB/services2.wsdl"
def url="file:///tmp/web2"
proxy = getProxy(url, this.class.classLoader)
proxy.initialize()

Cheers
Guillaume

On Wed, Nov 11, 2009 at 6:11 PM, Neil Cherry <ncherry@...> wrote:
tog wrote:
> Hi,
>
> Ok thanks for putting files online. Actually now I am getting an error
> when compiling the wsdl. Since this is happening in cxf, I want to make
> sure the wsdl is correct.
> I remember that sometimes back you mentionned that the wsdl had an extra "
> Is that in the (online) version which I am using ?

Yes, teh udiws10.ws file has an estra " and lacks a ^M also at that
point. I've posted a second version with the " removed and a ^M added.
In addition I adjusted the services.wsdl file to point to the new file.
Here they are:

http://www.linuxha.com/services2.wsdl

http://www.linuxha.com/WEB/udiws102.ws

I attempted to use them from GroovyWS:

import groovyx.net.ws.WSClient;

@Grab(group='org.codehaus.groovy.modules', module='groovyws', version='0.5.0')

def getProxy(wsdl, classLoader) {
 new WSClient(wsdl, classLoader);
};

url = "http://www.linuxha.com/WEB/services2.wsdl";

isy = getProxy(url, this.class.classLoader);

isy.initialize()

but I get the same error:

groovy:000> isy.initialize()
ERROR java.lang.reflect.UndeclaredThrowableException:
null
       at $Proxy33.bind (Unknown Source)
       at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:280)
       at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:196)
       at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
(DynamicClientFactory.java:175)
       at groovyx.net.ws.AbstractCXFWSClient.createClient (AbstractCXFWSClient.java:194)
       at groovyx.net.ws.WSClient.initialize (WSClient.java:107)
       at groovyx.net.ws.IWSClient$initialize$0.call (Unknown Source)
       at groovysh_evaluate.run (groovysh_evaluate:3)
       ...

--
Linux Home Automation         Neil Cherry       ncherry@...
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:      Linux Smart Homes For Dummies

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
PGP KeyID: 1024D/69B00854  subkeys.pgp.net

http://cheztog.blogspot.com


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

web2 (113K) Download Attachment