It is not the encoding style.

It appears that the method you are calling returns an XML complexType
WeatherReport.  In order to consume this service, you must create a Java
class into which this XML will be deserialized.  If the Java class is
not a JavaBean, you will also need a class that implements the
Deserializer interface for this XML type.  You must also register the
association between the XML type, Java class and deserializer using the
mapTypes method of your SOAPMappingRegistry.

If you are using a nightly build of Apache SOAP, there is another
alternative.  You can use the PropertyBagSerializer, which will
deserialize the WeatherReport type into a Java Map, where each map key
is an XML element name and each map value is the value from the XML.
You would still need to use mapTypes to map this serializer.

Scott Nichol

----- Original Message -----
From: "Sauquet Dominique" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 1:39 PM
Subject: RE: Propblem with SOAPAction not correct while invoking a Web
service


thank you Scott
It is better !!!
I am a very beginner in SOAP ...
Now it is better but still does not work.

It has something to do with encoding.
I did a
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
and the error is now :

Exception in thread "main" java.lang.IllegalArgumentException: No
Deserializer f
ound to deserialize a
'http://www.capeclear.com/GlobalWeather.xsd:WeatherReport'
 using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.
        at
org.apache.soap.util.xml.XMLJavaMappingRegistry.queryDeserializer(Unk
nown Source)
        at
org.apache.soap.util.xml.XMLJavaMappingRegistry.unmarshall(Unknown So
urce)
        at
org.apache.soap.encoding.soapenc.ParameterSerializer.unmarshall(Unkno
wn Source)
        at
org.apache.soap.util.xml.XMLJavaMappingRegistry.unmarshall(Unknown So
urce)
        at org.apache.soap.rpc.RPCMessage.unmarshall(Unknown Source)
        at org.apache.soap.rpc.RPCMessage.extractFromEnvelope(Unknown
Source)
        at org.apache.soap.rpc.Response.extractFromEnvelope(Unknown
Source)
        at
samples.xmethods.GetDayForecastInfo.main(GetDayForecastInfo.java:239)


at a resp = Response.extractFromEnvelope(respEnv, smr, respCtx);
If you have an idea of what I did wrong ???
Thanks again
Dominique

-----Message d'origine-----
De : Scott Nichol [mailto:[EMAIL PROTECTED]]
Envoyé : mardi 17 décembre 2002 19:30
À : [EMAIL PROTECTED]
Objet : Re: Propblem with SOAPAction not correct while invoking a Web
service


As the error message you see says, the problem is not the
targetObjectURI, it is the SOAPAction.  The SOAPAction is specified as a
parameter to call.invoke or SOAPTransport.send.

Scott Nichol

----- Original Message -----
From: "Sauquet Dominique" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 1:14 PM
Subject: Propblem with SOAPAction not correct while invoking a Web
service


I tried to access the Global Weather service that looks great.
Unfortunately, I got the following error :

After  extractFromEnvelope :

[Header=null] [methodName=null]
[targetObjectURI=null] [encodingStyleURI=null]
[SOAPContext=[Parts={[cid:null type: text/xml enc: null]}] multiRefs: 0
deserializedMultiRefs: 0] [fault=[Attributes={}] [faultCode=
SOAP-ENV:Client.MessageFormat]
[faultString=SOAPAction is not correct for the ta
rget web service method:  Got "", expected
"capeconnect:GlobalWeather:StationInf
o#isValidCode"]
[faultActorURI=capeconnect:dispatch:dispatcher]
[DetailEntries=
[(0)=<cc2:exception
xmlns:cc2="http://www.capeclear.com/soapfaultdetail";>
<type xsi:type="xsd:string"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
">com.capeclear.capeconnect.api.exception.CCException</type><value>
<detailMessage xsi:type="xsd:string"
xmlns:xsi="http://www.w3.org/2001/XMLSchema
-instance">SOAPAction is not correct for the target web service method:
Got
&qu
ot;&quot;, expected
&quot;capeconnect:GlobalWeather:StationInfo#isValidCode&quot
;</detailMessage><nested xsi:nil="true"
xmlns:xsi="http://www.w3.org/2001/XMLSch
ema-instance"/><errorCode>

My code is based on the getTemp example of the samples of SOAP withe the
following
modifications.

URL url = new URL("http://live.capescience.com:80/ccx/GlobalWeather";);

Call call = new Call();
call.setSOAPTransport(st);
call.setTargetObjectURI("capeconnect:GlobalWeather:StationInfo");
call.setMethodName("isValidCode");
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);

Vector params = new Vector();
params.addElement(new Parameter("code", String.class,"JFK", null));
call.setParams(params);

I also tried (and many others) :
call.setTargetObjectURI("capeconnect:GlobalWeather:GlobalWeather");
call.setMethodName("getWeatherReport");

Thanks a lot
Dominique
ps : you will get info at
http://live.capescience.com/GlobalWeather/index.html
or
http://www.capescience.com/webservices/globalweather/index.shtml


> Dominique Sauquet
> Direction des Moyens Informatiques
> Tel : 01 46 84 13 12
> <mailto:[EMAIL PROTECTED]>
>
> Prosodie
> 150, rue Galliéni
> 92100 Boulogne
> <http://www.prosodie.com/>
>
>
>

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



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

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



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

Reply via email to