Is there any development in handling complex type input and output in xfire dynamic client in webservices ? I mean custom java classes as complex types here.
I need to invoke a web service dynamically with complex type input. Please let me know any alternate solution if xfire doesn't support complex types. Dan Diephouse wrote: > > Hiya, > The dynamic client doesn't store the schemas in the parameters. If > you're trying to get at the schemas I suggest you look at the > WSDLServiceBuilder and the getSchemas method on there. Cheers, > - Dan > > Anders Syvertsen wrote: > >> Replying to this thread as i have got no answer, sorry to for the noise. >> Adding a line that i forgot to.. The full code is now: >> >> String wsdlUri = >> "http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx?WSDL"; >> >> Client client = new Client(new URL(wsdlUri)); >> ServiceInfo si = client.getService().getServiceInfo(); >> OperationInfo oi = si.getOperations().iterator().next(); // Get the >> first operation >> MessageInfo inputMessage = oi.getInputMessage(); // Get the input >> message >> >> // Iterator over the parts and try to get the complex types in the >> WSDL (this is what im having problems doing) >> for (Iterator partIter= inputMessage.getMessageParts().iterator(); >> partIter.hasNext();) { >> MessagePartInfo partInfo = (MessagePartInfo) partIter.next(); >> SchemaType schemaType = partInfo.getSchemaType(); >> if (schemaType.isComplex()) { >> // Print out the complex schema type >> org.jdom.Element el = new org.jdom.Element("test"); >> schemaType.writeSchema(el); >> // Here i print the jdom element to system out, but it contains >> only <test></test> element, >> // this is where i think i might be doing something wrong, >> dealing with complex types has been a >> // pain to deal with.. any help is very much appreciated.. >> printTheJdomElement(el); >> } >> } >> >> How can i get to the complexType starting from the >> org.codehaus.xfire.client.Client class and have only the WSDL uri? >> >>> Hi folks, >>> >>> I'm trying to build a WSDL explorer with xfire only, but when the >>> webservice contains complextypes in its inputmessage, i cant seem to >>> get that information from xfire, the code i try is: >>> String wsdlUri = >>> "http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx?WSDL"; >>> >>> Client client = new Client(new URL(wsdlUri)); >>> ServiceInfo si = client.getService().getServiceInfo(); >>> OperationInfo oi = si.getOperations().iterator().next(); // Get the >>> first operation >>> MessageInfo inputMessage = oi.getInputMessage(); // Get the input >>> message >>> >>> // Iterator over the parts and try to get the complex types in the >>> WSDL (this is what im having problems doing) >>> for (Iterator partIter= inputMessage.getMessageParts().iterator(); >>> partIter.hasNext();) { >>> SchemaType schemaType = partInfo.getSchemaType(); >>> if (schemaType.isComplex()) { >>> // Print out the complex schema type >>> org.jdom.Element el = new org.jdom.Element("test"); >>> schemaType.writeSchema(el); >>> // Here i print the jdom element to system out, but it contains >>> only <test></test> element, >>> // this is where i think i might be doing something wrong, >>> dealing with complex types has been a >>> // pain to deal with.. any help is very much appreciated.. >>> printTheJdomElement(el); >>> } >>> } >>> >>> If anyone know a better/easier way to build a wsdl explorer i would >>> like to know about it.. >>> >>> Regards, Anders >>> >>> --------------------------------------------------------------------- >>> 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 >> > > > -- > Dan Diephouse > (616) 971-2053 > Envoi Solutions LLC > http://netzooid.com > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > > -- View this message in context: http://www.nabble.com/Getting-complex-type-with-the-client-tf1797370.html#a10802129 Sent from the XFire - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
