I did used WSDL2Java, but it issued an warning that it can't map my elements 
into Java types, so it mapped it into SOAPElement. I was expecting WSDL2Java to 
generate classes from my WSDL and schema. It generated proxy class(es).

As my web service expect SOAPElement as input, I tried to load my XML from a 
file:

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new InputSource("files/request_body.xml"));
Element request = doc.getDocumentElement();

GetCertificatePortProxy gc = new GetCertificatePortProxy();
SOAPElement response = gc.getCertificate(request);

but compiler doesn't compile that. :(

Any help? :)

Best regards,
Milan



----- Original Message ----
From: Philipp Leitner <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, April 2, 2007 1:49:19 PM
Subject: Re: WebServices client

wsdl2java should encapsulate the complex types for you, so you could 
call the WS as if it was a local object. you should not need to deal 
with SOAPElements in this case. If you are not experienced with WS this 
might be the easier starting point.

/philipp


Milan Tomic schrieb:
>> * my best guess is that you wanted to say that the service uses an 
>> IN-OUT MEP, and that it takes a parameter as complex type for IN and 
>> returns another complex type as OUT
> 
> Yes, that exactly describes what I wanted to say, using all those "fancy" 
> words like "MEP" and "complex type". :-)
> 
> As my service takes an complex type element as input, I need to pass 
> SOAPElement and to receive SOAPElement. I don't know how to fill SOAPElement. 
> I will try to use XFire for the client.
> 
> Thank you very much for your help,
> Milan
> 
> 
> 
> ----- Original Message ----
> From: Philipp Leitner <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Friday, March 30, 2007 2:48:46 PM
> Subject: Re: WebServices client
> 
> Although I have to confess that I lack any idea of what you mean by 
> "takes an XSD element and returns an XSD element"* I think that the 
> easiest way of testing a Web Service is to create client stubs using 
> wsdl2java (comes along with your Axis2 distribution) and use this stubs 
> to test the service. The whole process should not take < 30 minutes in 
> general.
> 
> Alternatively I have often used XFire (http://xfire.codehaus.org/) to 
> quickly test services ...
> 
> /philipp
> 
> * my best guess is that you wanted to say that the service uses an 
> IN-OUT MEP, and that it takes a parameter as complex type for IN and 
> returns another complex type as OUT
> 
> Milan Tomic schrieb:
>> I would like to test my web service, so I need a client. My web service 
>> takes an XSD Element and returns an XSD Element. Is there some example of 
>> such a client? Since input argument is large XML, I would like to load it 
>> from a file, rather then building it in code.
>>
>> Thank you in advance,
>> Milan
>>
>>
>>
>>
>>  
>> ____________________________________________________________________________________
>> Don't pick lemons.
>> See all the new 2007 cars at Yahoo! Autos.
>> http://autos.yahoo.com/new_cars.html 
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> 
>  
> ____________________________________________________________________________________
> Never miss an email again!
> Yahoo! Toolbar alerts you the instant new Mail arrives.
> http://tools.search.yahoo.com/toolbar/features/mail/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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






 
____________________________________________________________________________________
The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

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

Reply via email to