Thanks Simon. With your suggestion, it is taking my WSDL now. Seems my
WSDL is not proper, I am getting 
- There are no parts for fault message : {http://lang.java/}Exception
org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingEx
ception: There are no parts for fault message :
{http://lang.java/}Exception
        at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameReferenc
e(WSDL11ToAxisServiceBuilder.java:1230)
        at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBinding(
WSDL11ToAxisServiceBuilder.java:776)

I'll try to correct it and let you know.
        
Regards
Raman
-----Original Message-----
From: Simon Nash [mailto:[email protected]] 
Sent: Thursday, April 22, 2010 5:27 PM
To: [email protected]
Subject: Re: WSDL picked up by binding.jms

Malisetti, Ramanjaneyulu wrote:
> Thanks Simon for the clarification. My service operations take
> DataObject as parameters or return type. The main problem I faced in
> dealing with generated WSDL that it can't be loaded in soap tools like
> SOAPUI. The issue is with its unknown type. So, I have taken generated
> WSDL and modified it to make DataObject type as known. I can use this
> modified WSDL in SOAPUI. I want to make service to use this wsdl when
> users access WSDL from browser ?wsdl.
> 
> But, I don't see even it is importing WSDL. Here I attached sample
that
> I am playing with. You can import this as a project in eclipse. The
> composite I am giving as string referring WSDL from C:\xxxxx.wsdl, you
> need to modify this before running samples.
> 
Hi Raman,
My apologies for the misunderstanding.  I thought that you had provided
your own WSDL on the service's <binding.ws> element and your question
was why that WSDL isn't being returned.

So now I know what your question really is, I'll answer it :-)

You have tried to use the wsdli:wsdlLocation attribute of the service's
<binding.ws> element to provide your own WSDL.  This isn't the correct
way to do this, so Tuscany thinks you haven't provided any WSDL and it
generates WSDL at runtime by running the JAX-WS Java to WSDL mapping on
the Java interface for the service.  This produces the WSDL that you are
seeing in your browser when you do a ?wsdl query.

To correct this problem you need to change the <binding.ws> element in
the service definition.  Instead of
   <binding.ws uri="http://localhost:8085/HelloWorldService1";
               wsdli:wsdlLocation="file:/C:/HelloWorldService1.wsdl"/>
you need to specify one of the following:

1. If you want to use the port definition from your WSDL "as is",
    you can specify
      <binding.ws
wsdlElement="http://jms.binding.sca.tuscany.apache.org/#wsdl.port(HelloW
orldServiceService/HelloWorldServicePort)"/>
    You don't need wsdl:wsdlLocation because Tuscany will automatically
    find the WSDL in the contributions that it loads.  This would use
port
      http://malra09-xp1:8085/HelloWorldService1
    because this is what appears in your WSDL.

2. If you want to use the binding from your WSDL and provide your
    own port address, you can specify
      <binding.ws
wsdlElement="http://jms.binding.sca.tuscany.apache.org/#wsdl.binding(Hel
loWorldServiceBinding)"/>
                  uri="http://localhost:8085/HelloWorldService1"/>
    This would use the port specified by the uri attribute which is
      http://localhost:8085/HelloWorldService1
    together with the WSDL binding HelloWorldServiceBinding as defined
    in your WSDL.

When you do either of the above and run a ?wsdl query on the service,
you won't actually see your own WSDL.  Instead you'll see a small
generated WSDL that imports your own WSDL.  This should work fine in
SOAPUI and any other tools that process WSDL.

   Simon
> 
> 
> Regards
> Raman
> 
> -----Original Message-----
> From: Simon Nash [mailto:[email protected]] 
> Sent: Tuesday, April 20, 2010 1:35 AM
> To: [email protected]
> Subject: Re: WSDL picked up by binding.jms
> 
> Malisetti, Ramanjaneyulu wrote:
>> Hi ,
>>
>>               I have remotable service bound to WS binding in the 
>> following way. If I open service wsdl from browser, the WSDL shown
> there 
>> is generated one but not the one I mentioned in composite. Is this
the
> 
>> expected behavior?
>>
>>  
>>
>> <binding.ws wsdli:wsdlLocation="file:/C:/ HelloWorldService.wsdl" 
>> _uri_http://localhost:9999/sample/HelloWorldService"/>
>>
>>  
>>
>>  
>>
>> Is there a way to tell SCA runtime to use WSDL specified in binding
> tag 
>> and show only that in browser?
>>
>>  
>>
>>  
>>
>> Regards
>>
>> Raman
>>
>>  
> Hi Raman,
> There's no way to change what Tuscany returns for a ?wsdl query
> from a browser.
> 
> The generated wsdl that Tuscany returns is correct and uses the
> <import> tag to bring in the user's wsdl specified in <binding.ws>.
> The wsdl returned by Tuscany should be consumable by any tool that
> can handle WSDL and resolve WSDL imports.
> 
> This import approach allows Tuscany to control precisely which parts
> of the user's wsdl are exposed by ?wsdl, and to guarantee that the
> wsdl returned by ?wsdl exactly matches what the Tuscany endpoint
> supports.
> 
> For example, if the user provides a wsdl with additional bindings
> and/or ports that aren't used by the Tuscany endpoint, these
> wouldn't be included in the wsdl that Tuscany returns from ?wsdl.
> If the user's wsdl were returned "as is", the returned wsdl would
> be misleading because it would refer to capabilities that the
> Tuscany endpoint isn't able to provide.
> 
> Also, the generated wsdl that Tuscany returns conforms with the
> naming recommendations (for service, port, etc.) in the SCA
> Web Service Binding 1.0 specification.  This wouldn't be possible
> if the user's wsdl were returned directly.
> 
>    Simon
> 
> 


Reply via email to