Hi Keith,

thanks for your advice! I could solve my problem!

Here's the code for everyone who's got the same problem (compatible with Axis2 
1.4):

WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();                  
Definition def = reader.readWSDL(*Path-to-wsdl*);
ListenerManager.defaultConfigurationContext.getAxisConfiguration().getService(serviceName).addParameter(WSDLConstants.WSDL_4_J_DEFINITION,
 def);

Greetings,
Natalia


> Datum: Wed, 7 May 2008 20:46:42 +0530
> Von: "keith chapman" <[EMAIL PROTECTED]>
> An: [email protected]
> Betreff: Re: Provide original WSDL

> Hi Natalia,
> 
> When useOriginalWSDL is set to tru axis2 gets it WSDL4JDefinition off a
> parameter in the service and serialize it. You can set this parameter as
> follows,
> 
> axisService.setParameter(WSDLConstants.WSDL_4_J_DEFINITION,
> wsdl4JDefinition);
> 
> Have a look at the private Definition readInTheWSDLFile(InputStream in) in
> axisService to seee how you can build the wsdl4JDefinition object.
> 
> And to answere your next question, Type information in the WSDl is
> genarated
> correctly only if the RPCMessegeReceiver is used. In other cases its
> almost
> impossible to infer the type information cause it depends on the
> messegeReceiver heavily.
> 
> Hope this helps.
> 
> Thanks,
> Keith.
> 
> 
> 
> On Wed, May 7, 2008 at 4:57 PM, Natalia Ignatowicz <
> [EMAIL PROTECTED]> wrote:
> 
> > Hi,
> >
> > I'm trying to provide my original WSDL-file for users of my webservice,
> so
> > "useOriginalwsdl" is set to true.
> > This works fine when I deploy my service through an AAR. But for several
> > reasons, I'm deploying my service programmatically at runtime. Now the
> WSDL
> > is not found and Axis says "Unable to generate WSDL 1.1 for this
> service".
> > Is there any way to tell Axis at runtime that there is a WSDL-file and
> > that this file should be used? (Placing the file in META-INF doesn't
> help.)
> >
> > Btw: Why are the generated WSDLs (if useOriginalwsdl is set to false) so
> > ugly? All types like xs:int etc. have "xs:anyType" then.
> >
> > Greetings,
> > Natalia
> > --
> > GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
> > Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> -- 
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
> 
> blog: http://www.keith-chapman.org

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to