You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Ramkumar R <ra...@gmail.com> on 2008/08/29 13:31:16 UTC

Validating WSDL against the Service Interface

Hi All,
When I was working with helloworld-ws-service-secure sample, noticed that
the wsdl/helloworld.wsdl file does not get validated while the service is
exposed.

This sample exposes a binding.ws service with a wsdl

    <service name="HelloWorldService" requires="authentication"
promote="HelloWorldServiceComponent/HelloWorldService">
        <interface.wsdl interface="
http://helloworld#wsdl.interface(HelloWorld)" />
        <binding.ws uri="http://localhost:8085/HelloWorldService"/>
    </service>

I tried modifying the wsdl/helloworld.wsdl file, by replacing the original
xsd:string data type with a junk value as shown below.

<wsdl:types>
        <schema elementFormDefault="qualified" targetNamespace="
http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
            <element name="getGreetings2">
                <complexType><sequence>
                        <element name="name" type="laksjdflaksdjfldsakfj"/>
                </sequence></complexType>
            </element>

            <element name="getGreetingsResponse2">
                <complexType><sequence>
                        <element name="getGreetingsReturn"
type="a;lskdjflsakdjf"/>
                </sequence></complexType>
            </element>
        </schema>
    </wsdl:types>

Here the validation for the data types does not seem to happen? Not sure if
this is intentional.

I believe we should be able to validate the same as we have logic in place
to generate WSDL from the service interface. Can I raise a JIRA to fix this?


-- 
Thanks & Regards,
Ramkumar Ramalingam

Re: Validating WSDL against the Service Interface

Posted by Ramkumar R <ra...@gmail.com>.
I have raised TUSCANY-2574 for this issue.

On Mon, Sep 1, 2008 at 6:10 PM, Ramkumar R <ra...@gmail.com> wrote:

> On Mon, Sep 1, 2008 at 3:00 PM, Simon Laws <si...@googlemail.com>wrote:
>
>>
>> Ok Ram it seems that you are picking up the right WSDL. Can you say more
>> about the WSDL not being validated when the service is exposed, For example,
>> what happens when you try to send a message to the service?
>>
>> Simon
>>
>
> Hi Simon,
> Everything works well, I guess no one is bothered about the junk data types
> present in the WSDL.
>
> In such scenario, the question is how is the data types computed without
> reading the one available from WSDL files?
>
> I think, I can open a JIRA for the same.
>
> --
> Thanks & Regards,
> Ramkumar Ramalingam
>


-- 
Thanks & Regards,
Ramkumar Ramalingam

Re: Validating WSDL against the Service Interface

Posted by Ramkumar R <ra...@gmail.com>.
On Mon, Sep 1, 2008 at 3:00 PM, Simon Laws <si...@googlemail.com>wrote:

>
> Ok Ram it seems that you are picking up the right WSDL. Can you say more
> about the WSDL not being validated when the service is exposed, For example,
> what happens when you try to send a message to the service?
>
> Simon
>

Hi Simon,
Everything works well, I guess no one is bothered about the junk data types
present in the WSDL.

In such scenario, the question is how is the data types computed without
reading the one available from WSDL files?

I think, I can open a JIRA for the same.

-- 
Thanks & Regards,
Ramkumar Ramalingam

Re: Validating WSDL against the Service Interface

Posted by Simon Laws <si...@googlemail.com>.
On Mon, Sep 1, 2008 at 7:32 AM, Ramkumar R <ra...@gmail.com> wrote:

>
> On Fri, Aug 29, 2008 at 7:31 PM, Simon Laws <si...@googlemail.com>wrote:
>
>>
>> Hi Ram
>>
>> Sounds like a JIRA to me if this is really the case. Can you check that
>> the WSDL that was actually being read as part of the contribution is the
>> WSDL that you changed?
>>
>> Simon
>>
>
> Hi Simon,
>
> I could see the error message is being thrown, when the interface name
> HelloWorld mentioned in the composite as shown below
>
> <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)<http://helloworld/#wsdl.interface%28HelloWorld%29>"
> />
>
> does not match with the portType name mentioned in the wsdl/helloworld.wsdl
> file as shown below.
>
> <wsdl:portType name="HelloWorld2">
>
> Please suggest if there are other ways to verify that this WSDL is actualy
> being read as part of the contribution.
>
> --
> Thanks & Regards,
> Ramkumar Ramalingam
>

Ok Ram it seems that you are picking up the right WSDL. Can you say more
about the WSDL not being validated when the service is exposed, For example,
what happens when you try to send a message to the service?

Simon

Re: Validating WSDL against the Service Interface

Posted by Ramkumar R <ra...@gmail.com>.
On Fri, Aug 29, 2008 at 7:31 PM, Simon Laws <si...@googlemail.com>wrote:

>
> Hi Ram
>
> Sounds like a JIRA to me if this is really the case. Can you check that the
> WSDL that was actually being read as part of the contribution is the WSDL
> that you changed?
>
> Simon
>

Hi Simon,

I could see the error message is being thrown, when the interface name
HelloWorld mentioned in the composite as shown below

<interface.wsdl
interface="http://helloworld#wsdl.interface(HelloWorld)<http://helloworld/#wsdl.interface%28HelloWorld%29>"
/>

does not match with the portType name mentioned in the wsdl/helloworld.wsdl
file as shown below.

<wsdl:portType name="HelloWorld2">

Please suggest if there are other ways to verify that this WSDL is actualy
being read as part of the contribution.

-- 
Thanks & Regards,
Ramkumar Ramalingam

Re: Validating WSDL against the Service Interface

Posted by Simon Laws <si...@googlemail.com>.
On Fri, Aug 29, 2008 at 12:31 PM, Ramkumar R <ra...@gmail.com> wrote:

> Hi All,
> When I was working with helloworld-ws-service-secure sample, noticed that
> the wsdl/helloworld.wsdl file does not get validated while the service is
> exposed.
>
> This sample exposes a binding.ws service with a wsdl
>
>     <service name="HelloWorldService" requires="authentication"
> promote="HelloWorldServiceComponent/HelloWorldService">
>         <interface.wsdl interface="
> http://helloworld#wsdl.interface(HelloWorld)<http://helloworld#wsdl.interface%28HelloWorld%29>"
> />
>         <binding.ws uri="http://localhost:8085/HelloWorldService"/>
>     </service>
>
> I tried modifying the wsdl/helloworld.wsdl file, by replacing the original
> xsd:string data type with a junk value as shown below.
>
> <wsdl:types>
>         <schema elementFormDefault="qualified" targetNamespace="
> http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
>             <element name="getGreetings2">
>                 <complexType><sequence>
>                         <element name="name" type="laksjdflaksdjfldsakfj"/>
>                 </sequence></complexType>
>             </element>
>
>             <element name="getGreetingsResponse2">
>                 <complexType><sequence>
>                         <element name="getGreetingsReturn"
> type="a;lskdjflsakdjf"/>
>                 </sequence></complexType>
>             </element>
>         </schema>
>     </wsdl:types>
>
> Here the validation for the data types does not seem to happen? Not sure if
> this is intentional.
>
> I believe we should be able to validate the same as we have logic in place
> to generate WSDL from the service interface. Can I raise a JIRA to fix this?
>
>
> --
> Thanks & Regards,
> Ramkumar Ramalingam
>

Hi Ram

Sounds like a JIRA to me if this is really the case. Can you check that the
WSDL that was actually being read as part of the contribution is the WSDL
that you changed?

Simon