Hi Devs,

> 2. In the current code It uses a dom Element to Represent the WSDL.But
> in this scenario we need to check the namespace and if it is a WSDL11
> Get the javax.wsl.Definition from the reader or else if it is WSDL20,
> serialize it and write it to a output stream so we can get it as a
> input stream
> to build a AxisService out of WSDL20.

This is just a suggestion from me for above case. cant you use Woden
with following approach ?

Instead of  -  if
(Constants.NS_URI_WSDL20.equals(documentElementNS.getNamespaceURI()))
check try to  use  Woden WSDLReader in the AxisService class.

  try{
       WSDLFactory factory = WSDLFactory.newInstance();
       WSDLReader reader = factory.newWSDLReader();
       reader.setFeature(ReaderFeatures.VALIDATION_FEATURE_ID, true);
       Description descComp = reader.readWSDL(wsdlLoc);
      }

 Once you have a org.apache.woden.wsdl20.Description instance you can
implement a method something like

 createClientSideAxisService(wsdlDescription,
wsdlServiceName,portName, options);

Also add new constructors to WSDL20ToAxisServiceBuilder so that it
will get org.apache.woden.wsdl20.Description as a argument like
WSDL11ToAxisServiceBuilder constructors getting javax.wsdl.Definition
as  arguments, this will eliminate  repetitive  parsing of same WSDL
document.

Thanks ,

On Tue, Mar 17, 2009 at 3:42 PM, keith chapman <keithgchap...@gmail.com> wrote:
> I'm not sure how complete the AXIOM implementation is. The DOM is complete.
> I will ask this issue on the Woden list.
>
> Thanks,
> Keith.
>
> On Tue, Mar 17, 2009 at 4:24 AM, Andreas Veithen <andreas.veit...@gmail.com>
> wrote:
>>
>> What about improving WSDL20ToAxisServiceBuilder to support DOM and/or
>> Axiom directly (I think Woden supports both)?
>>
>> Andreas
>>
>> On Mon, Mar 16, 2009 at 06:19, Pradeep Fernando <pradee...@gmail.com>
>> wrote:
>> > Hi Devs,
>> >
>> > Right now Axis2 s' ServiceClient(Dynamic serviceClient) does not
>> > support WSDL2 as it argument. I did few changes to the Code and now it
>> > supports WSDL2 as well. But I would like to draw your attention
>> > regarding few issues.
>> >
>> > 1. In order to support both WSDL11 & WSDL20 without changing the
>> > method signature of the ServiceClient we need to identify the Given
>> > WSDL using the namespace.
>> >
>> > 2. In the current code It uses a dom Element to Represent the WSDL.But
>> > in this scenario we need to check the namespace and if it is a WSDL11
>> > Get the javax.wsl.Definition from the reader or else if it is WSDL20,
>> > serialize it and write it to a output stream so we can get it as a
>> > input stream
>> > to build a AxisService out of WSDL20.
>> >
>> > 3.since the current implementation uses dom element this mechanism
>> > results in a double parsing when its a WSDL20.possible solution is
>> > using
>> > Axiom instead of dom so that when namespace checking it does not parse
>> > the entire WSDL.
>> >
>> > 4. So i replaced Dom with Axiom and used Doom to create the Dom
>> > element out of Axiom element when need to fed to the readWSDL()
>> > method of the
>> > WSDL reader.
>> >
>> > WDYT devs? comments ,suggestions are mostly welcome.
>> > The patch related to this issue can be found in [1]
>> >
>> > Thanks in advance,
>> > Pradeep Fernando.
>> >
>> > [1] https://issues.apache.org/jira/browse/AXIS2-4253
>> >
>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
>



-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/

Reply via email to