Re: OMElement to org.w3c.dom.Document

2007-11-27 Thread Evgeniy Vyborov
Hi,

I think the simplest way to transform OMElement to DOM Element is to use static 
method toDOM(OMElement element) from org.apache.axis2.util.XMLUtils class.

Regards,
Eugene

Fátima Milla Olaya <[EMAIL PROTECTED]> wrote: Hi,
I want to transform a OMElement to a dom document, I've tried this:
OMElement omquery = policyQuery.getPolicyQuery();
DocumentImpl omdoc=new DocumentImpl(omquery.getOMFactory());
Element queryelement = omdoc.getDocumentElement();
 
and I get this exception:
Exception in thread "main" org.apache.axis2.AxisFault: 
org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory cannot be 
cast to org.apache.axiom.om.impl.dom.factory.OMDOMFactory

My webservice exchanges two xml files. Thanks

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



   
-
Get easy, one-click access to your favorites.  Make Yahoo! your homepage.

Re: [Axis2] SOAP12 parameter types

2007-11-26 Thread Evgeniy Vyborov

Yes. I need to obtain details of the operations (parameters and theit types). I 
was trying to use wsdl4j, but the only thing I can get is org.w3c.dom.Element, 
that represents . I'm not sure that this is optimal way to parse 
parameters from the Element "by hand". It is really strange when I easily can 
get all necessary data for SOAP1.1 binding, but I can't do the same with 
SOAP1.2 binding.

Gurus, please, help me solve this problem. This is very necessary for me now.

Thanks,
Eugene
 On Nov 20, 2007 7:28 PM, Evgeniy Vyborov  wrote:
> Hi, everyone.
>
> I worked with Axis1.x and I used the next code to determine  operations and
> parameter types of the concrete port:
> ...
> SymbolTable symbolTable = wsdlParser.getSymbolTable();
> BindingEntry bEntry =
> symbolTable.getBindingEntry(binding.getQName());
> Parameters parameters = null;
> Operation operation = null;
> Iterator i = bEntry.getParameters().keySet().iterator();
> while (i.hasNext()) {
> Operation o = (Operation) i.next();
> if (o.getName().equals(operationName)) {
> operation = o;
> parameters = (Parameters) bEntry.getParameters().get(o);
>
> break;
> }
> }
> ...
> But this code doesn't work with SOAP12 binding.
> Can someone tell me how to determine operations parameters and their types
> using Axis1 or Axis2?
you mean you want to parse a WSDL file and get the details of the
Operations. Then you can use
wsdl4j. This is what use inside Axis2.

thanks,
Amila.


>
> And one more...
> Please, tell me the way to convert AXIOM's OMElement to org.w3c.Element and
> backward.
Solved.
>
> Regards,
> Eugene
>
>
>  
> Never miss a thing. Make Yahoo your homepage.



-- 
Amila Suriarachchi,
WSO2 Inc.

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



   
-
Never miss a thing.   Make Yahoo your homepage.

[Axis2] SOAP12 parameter types

2007-11-20 Thread Evgeniy Vyborov
Hi, everyone.

I worked with Axis1.x and I used the next code to determine  operations and 
parameter types of the concrete port:
...
SymbolTable symbolTable = wsdlParser.getSymbolTable();
BindingEntry bEntry = symbolTable.getBindingEntry(binding.getQName());
Parameters parameters = null;
Operation operation = null;
Iterator i = bEntry.getParameters().keySet().iterator();
while (i.hasNext()) {
Operation o = (Operation) i.next();
if (o.getName().equals(operationName)) {
operation = o;
parameters = (Parameters) bEntry.getParameters().get(o);

break;
}
}
...
But this code doesn't work with SOAP12 binding.
Can someone tell me how to determine operations parameters and their types 
using Axis1 or Axis2?

And one more...
Please, tell me the way to convert AXIOM's OMElement to org.w3c.Element and  
backward.

Regards,
Eugene

   
-
Never miss a thing.   Make Yahoo your homepage.

Re: [Axis2] Generic Web Service client

2007-10-31 Thread Evgeniy Vyborov
Thanks for your answer!
 
 I know how to invoke such web services using 
org.apache.commons.httpclient.methods.GetMethod and PostMethod directly.
   But I'd like to invoke such services using Axis2 API.

Charitha Kankanamge <[EMAIL PROTECTED]> wrote: Evgeniy Vyborov wrote:

> Hi  folks.
>
> I'm new to Axis 2.
> Now I'm trying to implement wsdl-based generic web service client.
> The logic of this client is simple: user loads *.wsdl file from 
> somewhere, chooses service, port, operation, sets input parameter 
> values. Then user can invoke this service with chosen parameters.
> Is it possible to implement completely generic web service client 
> using Axis2?
> For now, I understand how to invoke web services with SOAP and SOAP 
> 1.2 ports.
> But I can't invoke web service with ports like these (http GET and POST):
> ...
> 
> binding="tns:CurrencyConvertorHttpGet">
> 
> location="http://www.webservicex.net/CurrencyConvertor.asmx"/>
> 
> 
> binding="tns:CurrencyConvertorHttpPost">
> 
> location="http://www.webservicex.net/CurrencyConvertor.asmx"/>
> 
> ...
>
> Is it possible to invoke services with such ports with Axis2?

Yes. Please try the following URL.

http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?Fromcurrency=CAD&Tocurrency=BND

>
> P.S.: it would be great if you prompt me to some examples with SMTP, 
> JMS and other services invocation

The following references will help you.

http://ws.apache.org/axis2/1_3/jms-transport.html
http://ws.apache.org/axis2/1_3/mail-transport.html

>
> Thanks for your answers!
>
> Regards,
> Eugene
>
> __
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>


-- 
Charitha Kankanamge
WSO2 inc.
Flower Road, Colombo 07
+94 714268070

A bug in the hand is better than one as yet undetected



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



 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[Axis2] Generic Web Service client

2007-10-30 Thread Evgeniy Vyborov
Hi  folks.
  
  I'm new to Axis 2. 
  Now I'm trying to implement wsdl-based generic web service client.
  The logic of this client is simple: user loads *.wsdl file from somewhere, 
chooses service, port, operation, sets input parameter values. Then user can 
invoke this service with chosen parameters.
 Is it possible to implement completely generic web service client using Axis2?
  For now, I understand how to invoke web services with SOAP and SOAP 1.2 
ports. 
 But I can't invoke web service with ports like these (http GET and POST):
 ...
 
 http://www.webservicex.net/CurrencyConvertor.asmx"/>
 
 
 http://www.webservicex.net/CurrencyConvertor.asmx"/>
 
 ...
 
 Is it possible to invoke services with such ports with Axis2?
 
 P.S.: it would be great if you prompt me to some examples with SMTP, JMS and 
other services invocation
 
 Thanks for your answers!
 
 Regards,
 Eugene
 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com