Grails and Contract First SOAP webservices - hitting a wall!

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Grails and Contract First SOAP webservices - hitting a wall!

marcopas
The last couple of days i am trying to get a contract first WSDL
implemented using grails.
It is a really simple wsdl but somehow i keep hitting a wall and get stuck..

I am considering to move this piece of SOAP messaging to some plain
Spring project but i want to give it 1 more try!
It must be possible in Grails so it is probably me that is missing
some pieces of the puzzle..
Anyone with some experience that could give me some pointers?

The wsdl i am trying is located at:
WSDL: http://docs.codehaus.org/download/attachments/85983334/currencyConverterService.wsdl?version=1&modificationDate=1212335543051

I am trying to follow the required steps but i keep hitting a wall...

1) create a brand new Grails 2.0.1 project
2) install the cxf plugin
1) download the wsdl
2) generated the service interface using wsdl2java

<code>
@WebService(name = "currencyConvert", targetNamespace =
"http://www.examplewebservice.com")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@XmlSeeAlso({
   ObjectFactory.class
})
public interface CurrencyConvert {
   /**
    *
    * @param part1
    * @return
    *     returns nl.test.ConversionResponse
    */
   @WebMethod
   @WebResult(name = "conversionResponse", targetNamespace =
"http://www.examplewebservice.com/types", partName = "part1")
   public ConversionResponse convert(
           @WebParam(name = "conversionRequest", targetNamespace =
"http://www.examplewebservice.com/types", partName = "part1")
           ConversionRequest part1);
}
</code>

3) I copied the generated interface to the java/src folder
4) I created service which extends the generated interface

<code>
@WebService(
serviceName = "currencyConverterService",
portName = "converterSoapPort",
targetNamespace = "http://www.examplewebservice.com",
wsdlLocation = "/home/marco/Downloads/currencyConverterService.wsdl",
endpointInterface = "com.examplewebservice.CurrencyConvert")
class ConverterService implements CurrencyConvert {

   static expose=['cxfjax']

   test.ConversionResponse convert(test.ConversionRequest part1) {
       return null
   }
}

5) I start Grails and.. the following error message appears

Message: No DestinationFactory was found for the namespace http.

Somehow i got myself in a situation where i could get passed this
message but after that i got a strange wsdl
from the service in which the request and response where missing.. :(

Any hints or clues what i am doing wrong?

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails and Contract First SOAP webservices - hitting a wall!

robelsner
> 4) I created service which extends the generated interface
>
> <code>
> @WebService(
> serviceName = "currencyConverterService",
> portName = "converterSoapPort",
> targetNamespace = "http://www.examplewebservice.com",
> wsdlLocation = "/home/marco/Downloads/currencyConverterService.wsdl",
> endpointInterface = "com.examplewebservice.CurrencyConvert")


I'm not sure you need all the WebService definition, since that's what
the plugin is trying to wrap up for you.  Try it without and see how
that goes.

As a side note, I'm having problems getting this plugin to work in
Grails 2.0.1 so, yea.

Rob

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails and Contract First SOAP webservices - hitting a wall!

marcopas
Without the WebService definition the webservice does somethit but it
is totally forgetting about its request and reponse types..
I even moved the annotations from the interface to the service without
any luck. I get a wsdl which is missing the request and response type
parts

2012/3/13 Rob Elsner <[hidden email]>:

>> 4) I created service which extends the generated interface
>>
>> <code>
>> @WebService(
>> serviceName = "currencyConverterService",
>> portName = "converterSoapPort",
>> targetNamespace = "http://www.examplewebservice.com",
>> wsdlLocation = "/home/marco/Downloads/currencyConverterService.wsdl",
>> endpointInterface = "com.examplewebservice.CurrencyConvert")
>
>
> I'm not sure you need all the WebService definition, since that's what
> the plugin is trying to wrap up for you.  Try it without and see how
> that goes.
>
> As a side note, I'm having problems getting this plugin to work in
> Grails 2.0.1 so, yea.
>
> Rob
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails and Contract First SOAP webservices - hitting a wall!

marcopas
I removed the 'implements' from the grails service so that i only have
a grails service with some annotations. Then the request and response
types are picked up.
But using this approach the total contract first approach has no
meaning at all. The interface which is generated by wsdl2java just can
be deleted then :(

2012/3/13 Marco Pas <[hidden email]>:

> Without the WebService definition the webservice does somethit but it
> is totally forgetting about its request and reponse types..
> I even moved the annotations from the interface to the service without
> any luck. I get a wsdl which is missing the request and response type
> parts
>
> 2012/3/13 Rob Elsner <[hidden email]>:
>>> 4) I created service which extends the generated interface
>>>
>>> <code>
>>> @WebService(
>>> serviceName = "currencyConverterService",
>>> portName = "converterSoapPort",
>>> targetNamespace = "http://www.examplewebservice.com",
>>> wsdlLocation = "/home/marco/Downloads/currencyConverterService.wsdl",
>>> endpointInterface = "com.examplewebservice.CurrencyConvert")
>>
>>
>> I'm not sure you need all the WebService definition, since that's what
>> the plugin is trying to wrap up for you.  Try it without and see how
>> that goes.
>>
>> As a side note, I'm having problems getting this plugin to work in
>> Grails 2.0.1 so, yea.
>>
>> Rob
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>

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

    http://xircles.codehaus.org/manage_email