Getting the temperature worked. 

My console showed:
Reading WSDL document from 'http://www.xmethods.com/sd/TemperatureService.wsdl'
Preparing WSIF dynamic invocation
- WSIF0006W: Multiple WSIFProvider found supporting the same namespace URI 
'http://schemas.xmlsoap.org/wsdl/soap/'. Found 
('org.apache.wsif.providers.soap.apacheaxis.WSIFDynamicProvider_ApacheAxis, 
org.apache.wsif.providers.soap.apachesoap.WSIFDynamicProvider_ApacheSOAP')  
- WSIF0007I: Using WSIFProvider 
'org.apache.wsif.providers.soap.apacheaxis.WSIFDynamicProvider_ApacheAxis' for 
namespaceURI 'http://schemas.xmlsoap.org/wsdl/soap/' 
Executing operation getTemp
Result:
return=56.0

Done!


-----Original Message-----
From: Aleksander Slominski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 16, 2004 9:50 AM
To: [EMAIL PROTECTED]
Subject: Re: problem with the soap sample


hi,

what is exactly the version of WSIF you use (how did you build it)? yo 
should use version from CVS as it has better error handling - most 
probably error message ( Cannot get Object part 'Result'. ) is because 
there was no response BUT fault - this is all fixed in CVS including 
better error messages.

also make sure you use right address (see below and i am not sure if 
this one works - i could not connect)  and you should try many different 
stockquote services (they are all very flaky ...) like this one: 
("http://www.webservicex.net/stockquote.asmx?WSDL"; "GetQuote" "IBM")
but even this one sometimes timeout ...

what worked for me
http://www.xmethods.com/sd/TemperatureService.wsdl getTemp 10570

it makes one wonder where are reliable web services ....

HTH,

alek

Anthony Sangha wrote:

>  
>
>> -----Original Message-----
>>From:         Anthony Sangha  
>>Sent: Tuesday, November 16, 2004 8:26 AM
>>To:   '[EMAIL PROTECTED]'
>>Subject:      problem with the soap sample
>>
>>I'm using the Dynamic Invoker class and tried to use the following arguments:
>>D:\download\webservices\wsif-bin-2.0\wsif-2.0\samples\simplesoap\StockquoteSOAP.wsdl
>> getQuote IBM
>>
>>and I get the following exception:
>>org.apache.wsif.WSIFException: Cannot get Object part 'Result'. No parts are 
>>set on the message
>>      at 
>> org.apache.wsif.base.WSIFDefaultMessage.handleNoPartsException(Unknown 
>> Source)
>>      at org.apache.wsif.base.WSIFDefaultMessage.getObjectPart(Unknown Source)
>>      at 
>> simplesoap.client.DynamicInvoker.invokeMethod(DynamicInvoker.java:338)
>>      at simplesoap.client.DynamicInvoker.main(DynamicInvoker.java:150)
>>Exception in thread "main" 
>>
>>What am I doing wrong?
>>
>>Anthony
>>    
>>
>
>  
>

invoking operation 'getQuote' using WSDL from 
file:///C:/Forge/ws-apache-cvs/ws-wsif/java/samples/simplesoap/StockquoteSOAP.wsdl
symbol=IBM
HTTP related exception: could not read response line; nested exception is:
    Connection reset; nested exception is:
java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:168)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
    at 
xsul.http_client.HttpClientResponse.readLine(HttpClientResponse.java:72)
    at 
xsul.http_client.HttpClientResponse.readStatusLine(HttpClientResponse.java:105)
    at 
xsul.invoker.http.HttpDynamicInfosetInvoker.invokeXml(HttpDynamicInfosetInvoker.java:254)
    at 
xsul.invoker.soap_over_http.SoapHttpDynamicInfosetInvoker.invokeMessage(SoapHttpDynamicInfosetInvoker.java:126)
    at 
xsul.wsif_xsul_soap_http.XsulSoapOperation.executeRequestResponseOperation(XsulSoapOperation.java:147)
    at xsul_dii.XsulDynamicInvoker.runClient(XsulDynamicInvoker.java:150)
    at xsul_dii.XsulDynamicInvoker.main(XsulDynamicInvoker.java:77)
Exception in thread "main"







<?xml version='1.0' encoding='UTF-8'?>
<definitions name='net.xmethods.services.stockquote.StockQuote'
             
targetNamespace='http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/'
             
xmlns:tns='http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/'
             xmlns:electric='http://www.themindelectric.com/'
             xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
             xmlns:xsd='http://www.w3.org/2001/XMLSchema'
             xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
             xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
             xmlns='http://schemas.xmlsoap.org/wsdl/'>

   <message name='getQuoteResponse1'>
      <part name='Result' type='xsd:float'/>
   </message>

   <message name='getQuoteRequest1'>
      <part name='symbol' type='xsd:string'/>
   </message>

   <portType name='net.xmethods.services.stockquote.StockQuotePortType'>
      <operation name='getQuote' parameterOrder='symbol'>
         <input message='tns:getQuoteRequest1'/>
         <output message='tns:getQuoteResponse1'/>
      </operation>
   </portType>

   <binding name='net.xmethods.services.stockquote.StockQuoteBinding'
            type='tns:net.xmethods.services.stockquote.StockQuotePortType'>
      <soap:binding style='rpc' 
transport='http://schemas.xmlsoap.org/soap/http'/>
      <operation name='getQuote'>
         <soap:operation soapAction='urn:xmethods-delayed-quotes#getQuote'/>
         <input>
            <soap:body use='encoded'
                       namespace='urn:xmethods-delayed-quotes'
                       
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
         </input>
         <output>
            <soap:body use='encoded'
                       namespace='urn:xmethods-delayed-quotes'
                       
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
         </output>
      </operation>
   </binding>

   <service name='net.xmethods.services.stockquote.StockQuoteService'>
      <documentation>net.xmethods.services.stockquote.StockQuote web 
service</documentation>
      <port name='net.xmethods.services.stockquote.StockQuotePort'
            
binding='tns:net.xmethods.services.stockquote.StockQuoteBinding'>
         <!--soap:address location='http://66.28.98.121:9090/soap'/-->
         <soap:address location='http://64.124.140.30:9090/soap'/>
      </port>
   </service>
</definitions>



Starting xsul_dii.XsulDynamicInvoker
invoking operation 'getTemp' using WSDL from 
http://www.xmethods.com/sd/TemperatureService.wsdl
zipcode=10570
received response <getTempResponse>
<return n1:type="xsd:float" 
xmlns:n1="http://www.w3.org/2001/XMLSchema-instance";>55.0</return>
</getTempResponse>

-- 
The best way to predict the future is to invent it - Alan Kay


Reply via email to