You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jason Carreira <jc...@gmail.com> on 2005/04/27 17:48:58 UTC

Problem upgrading from Axis 1.1 to Axis 1.2RC3

Hi all,

I'm moving from Apache Axis 1.1 to 1.2RC3 and I'm having an issue with 
calling methods on a web service I've generated a client for. I re-generated 
the client code for 1.2RC3. I'm switching because we're moving from
JDK1.4.2up to JDK5 and the "enum" variable names and package are
illegal.

Anyway, on to my problem. The service I'm binding to is the weather service 
here: http://www.ejse.com/services/weather_xml_web_services.htm. It's just 
an example app to show how we can do these things and to test out using 
Spring's Axis support. With 1.1 this worked fine. With 1.2RC3 I've tracked 
the problem down to the section starting with line 1338 in 
org.apache.axis.client.Call:

for ( int i = 0 ; i < operations.size() ; i++, op=null ) {
op = (Operation) operations.get( i );
if ( opName.equals( op.getName() ) ) {
break ;
}
}

The problem is that opName is the name of the method from the generated stub 
interface: "getWeatherInfo". The op.getName is returning "GetWeatherInfo". I 
looked at the code for Call in Axis 1.1, and it looks the same, so I'm not 
sure why it was working, but it was. Unfortunately, no such luck in Axis 
1.2RC3.

Any ideas? Is there something I'm doing wrong, or is this a bug? 

Thanks,
 
Jason

Re: Problem upgrading from Axis 1.1 to Axis 1.2RC3

Posted by Jeff <je...@cogentlogic.com>.
Hi!

Works under J2SE 1.4.2_06 and Axis 1.2RC3.

I ran the Axis 1.2RC3 version of WSDL2Java against http://www.ejse.com/WeatherService/Service.asmx?WSDL then invoked this code:


   int nZipCode = 19147;  // Zip code for Philadelphia

   ServiceLocator locator = new ServiceLocator();
   ServiceSoapStub stub = (ServiceSoapStub)locator.getPort(ServiceSoap.class);
   GetWeatherInfo parameters = new GetWeatherInfo(nZipCode);
   GetWeatherInfoResponse response = stub.getWeatherInfo(parameters);
   com.ejse.WeatherService.WeatherInfo weatherInfoResult = response.getGetWeatherInfoResult();

   System.out.println("Location: " + weatherInfoResult.getLocation());
   System.out.println("Icon Index: " + weatherInfoResult.getIconIndex());
   System.out.println("Temprature: " + weatherInfoResult.getTemprature());
   System.out.println("Feels Like: " + weatherInfoResult.getFeelsLike());
   System.out.println("Forecast: " + weatherInfoResult.getForecast());
   System.out.println("Visibility: " + weatherInfoResult.getVisibility());
   System.out.println("Pressure: " + weatherInfoResult.getPressure());
   System.out.println("Dew Point: " + weatherInfoResult.getDewPoint());
   System.out.println("UV Index: " + weatherInfoResult.getUVIndex());
   System.out.println("Humidity: " + weatherInfoResult.getHumidity());
   System.out.println("Wind: " + weatherInfoResult.getWind());
   System.out.println("Reported At: " + weatherInfoResult.getReportedAt());
   System.out.println("Last Updated: " + weatherInfoResult.getLastUpdated());


and got this output:


Location: Philadelphia, PA
Icon Index: 26
Temprature: 63°F
Feels Like: 63°F
Forecast: Cloudy
Visibility: 
Pressure: 29.70 in.
Dew Point: 53°F
UV Index: 
Humidity: 69%
Wind: From WNW at 4 mph
Reported At: 
Last Updated: 



Jeff


  ----- Original Message ----- 
  From: Jason Carreira 
  To: axis-user@ws.apache.org 
  Sent: Wednesday, April 27, 2005 11:48 AM
  Subject: Problem upgrading from Axis 1.1 to Axis 1.2RC3


  Hi all,

  I'm moving from Apache Axis 1.1 to 1.2RC3 and I'm having an issue with calling methods on a web service I've generated a client for. I re-generated the client code for 1.2RC3. I'm switching because we're moving from JDK1.4.2 up to JDK5 and the "enum" variable names and package are illegal.

  Anyway, on to my problem. The service I'm binding to is the weather service here: http://www.ejse.com/services/weather_xml_web_services.htm. It's just an example app to show how we can do these things and to test out using Spring's Axis support. With 1.1 this worked fine. With 1.2RC3 I've tracked the problem down to the section starting with line 1338 in org.apache.axis.client.Call:

          for ( int i = 0 ; i < operations.size() ; i++, op=null ) {
              op = (Operation) operations.get( i );
              if ( opName.equals( op.getName() ) ) {
                  break ;
              }
          }

  The problem is that opName is the name of the method from the generated stub interface: "getWeatherInfo". The op.getName is returning "GetWeatherInfo". I looked at the code for Call in Axis 1.1, and it looks the same, so I'm not sure why it was working, but it was. Unfortunately, no such luck in Axis 1.2RC3.

  Any ideas? Is there something I'm doing wrong, or is this a bug? 

  Thanks,

  Jason

Fwd: Problem upgrading from Axis 1.1 to Axis 1.2RC3

Posted by Jason Carreira <jc...@gmail.com>.
Thought I'd forward to the Axis-User list too...

Oh, BTW, I tried upgrading to WSDL4J 1.5.1 with the same result...

Can anyone else bind to this web service and use it in JDK5?

Jason

---------- Forwarded message ----------
From: Jason Carreira <jc...@gmail.com>
Date: Apr 27, 2005 4:33 PM
Subject: Re: Problem upgrading from Axis 1.1 to Axis 1.2RC3
To: dims@apache.org

The problem is that your build will use Clover if it's in ant/lib and the 
classes put into the jar will be modified by Clover for code coverage. 

I rebuilt with a different ant without clover and I'm able to get past the 
line below... unfortunately a few lines later it does this:

BindingOperation bop = binding.getBindingOperation(opName,
null, null);
if ( bop == null ) {
throw new JAXRPCException( Messages.getMessage("noOperation02",
opName ));
}

This is calling into WSDL4J and bop is coming back as null, so it throws an 
exception. 

Any ideas?

On 4/27/05, Davanum Srinivas <da...@gmail.com> wrote:
> 
> using
> 
> for ( int i = 0 ; i < operations.size() ; i++, op=null ) {
> op = (Operation) operations.get( i );
> if ( opName.equals( JavaUtils.xmlNameToJava(op.getName()) ) ) {
> break ;
> }
> }
> 
> ??
> 
> -- dims
> 
> On 4/27/05, Jason Carreira <jcarreira@gmail.com > wrote:
> > and I get the same problem...
> >
> >
> > On 4/27/05, Davanum Srinivas <da...@gmail.com> wrote:
> > > just "ant" is enough to build the axis jar. 
> > >
> > > -- dims
> > >
> > > On 4/27/05, Jason Carreira <jc...@gmail.com> wrote:
> > > > How do I get it to build without Clover dependencies? I've been 
> doing 
> > "ant
> > > > dist" and the axis.jar file that goes into build/lib fails when I 
> use it
> > > > with:
> > > >
> > > > java.lang.NoClassDefFoundError: com/cortexeb/tools/clover/aq 
> > > > at
> > > > org.apache.axis.client.ServiceFactory
> > .<clinit>(ServiceFactory.java:49)
> > > >
> > > >
> > > > On 4/27/05, Davanum Srinivas < davanum@gmail.com> wrote:
> > > > > yep
> > > > >
> > > > > On 4/27/05, Jason Carreira < jcarreira@gmail.com> wrote:
> > > > > > I'm sorry, I don't understand... you mean add this to the Axis 
> > source in
> > > > > > Call and rebuild?
> > > > > >
> > > > > >
> > > > > > On 4/27/05, Davanum Srinivas < davanum@gmail.com > wrote:
> > > > > > > Jason,
> > > > > > >
> > > > > > > throw JavaUtils.xmlNameToJava into the mix and see if it works
> > with
> > > > > > > all your test cases...if it does, open up a JIRA bug and i 
> will 
> > check
> > > > > > > it in.
> > > > > > >
> > > > > > > thanks,
> > > > > > > dims
> > > > > > >
> > > > > > > On 4/27/05, Jason Carreira < jcarreira@gmail.com> wrote:
> > > > > > > > Hi all,
> > > > > > > >
> > > > > > > > I'm moving from Apache Axis 1.1 to 1.2RC3 and I'm having an
> > issue
> > > > with
> > > > > > > > calling methods on a web service I've generated a client 
> for. I
> > > > > > re-generated
> > > > > > > > the client code for 1.2RC3. I'm switching because we're 
> moving
> > from
> > > > > > JDK1.4.2
> > > > > > > > up to JDK5 and the "enum" variable names and package are
> > illegal.
> > > > > > > > 
> > > > > > > > Anyway, on to my problem. The service I'm binding to is the
> > weather
> > > > > > service
> > > > > > > > here:
> > > > > > > > 
> > > > > >
> > > >
> > http://www.ejse.com/services/weather_xml_web_services.htm .
> > > > > > > > It's just an example app to show how we can do these things 
> and 
> > to
> > > > test
> > > > > > out
> > > > > > > > using Spring's Axis support. With 1.1 this worked fine. With
> > 1.2RC3
> > > > I've
> > > > > > > > tracked the problem down to the section starting with line 
> 1338 
> > in
> > > > > > > > org.apache.axis.client.Call :
> > > > > > > >
> > > > > > > > for ( int i = 0 ; i < operations.size() ; i++, op=null
> > ) {
> > > > > > > > op = (Operation) operations.get( i );
> > > > > > > > if ( opName.equals( op.getName() ) ) {
> > > > > > > > break ;
> > > > > > > > }
> > > > > > > > }
> > > > > > > >
> > > > > > > > The problem is that opName is the name of the method from 
> the 
> > > > generated
> > > > > > > > stub interface: "getWeatherInfo". The op.getName is 
> returning
> > > > > > > > "GetWeatherInfo". I looked at the code for Call in Axis 1.1, 
> and
> > it
> > > > > > looks
> > > > > > > > the same, so I'm not sure why it was working, but it was.
> > > > Unfortunately,
> > > > > > no
> > > > > > > > such luck in Axis 1.2RC3.
> > > > > > > >
> > > > > > > > Any ideas? Is there something I'm doing wrong, or is this a
> > bug?
> > > > > > > >
> > > > > > > > Thanks, 
> > > > > > > >
> > > > > > > > Jason
> > > > > > >
> > > > > > > --
> > > > > > > Davanum Srinivas -
> > > > http://webservices.apache.org/~dims/<http://webservices.apache.org/%7Edims/>
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > -- 
> > > > > Davanum Srinivas -
> > http://webservices.apache.org/~dims/<http://webservices.apache.org/%7Edims/>
> > > > >
> > > >
> > > >
> > >
> > > -- 
> > > Davanum Srinivas - http://webservices.apache.org/~dims/<http://webservices.apache.org/%7Edims/>
> > >
> >
> >
> 
> --
> Davanum Srinivas - http://webservices.apache.org/~dims/<http://webservices.apache.org/%7Edims/>
>

Re: Problem upgrading from Axis 1.1 to Axis 1.2RC3

Posted by Jason Carreira <jc...@gmail.com>.
I'm sorry, I don't understand... you mean add this to the Axis source in 
Call and rebuild?

On 4/27/05, Davanum Srinivas <da...@gmail.com> wrote:
> 
> Jason,
> 
> throw JavaUtils.xmlNameToJava into the mix and see if it works with
> all your test cases...if it does, open up a JIRA bug and i will check
> it in.
> 
> thanks,
> dims
> 
> On 4/27/05, Jason Carreira <jc...@gmail.com> wrote:
> > Hi all,
> >
> > I'm moving from Apache Axis 1.1 to 1.2RC3 and I'm having an issue with
> > calling methods on a web service I've generated a client for. I 
> re-generated
> > the client code for 1.2RC3. I'm switching because we're moving from 
> JDK1.4.2
> > up to JDK5 and the "enum" variable names and package are illegal.
> >
> > Anyway, on to my problem. The service I'm binding to is the weather 
> service
> > here:
> > http://www.ejse.com/services/weather_xml_web_services.htm.
> > It's just an example app to show how we can do these things and to test 
> out
> > using Spring's Axis support. With 1.1 this worked fine. With 1.2RC3 I've
> > tracked the problem down to the section starting with line 1338 in
> > org.apache.axis.client.Call:
> >
> > for ( int i = 0 ; i < operations.size() ; i++, op=null ) {
> > op = (Operation) operations.get( i );
> > if ( opName.equals( op.getName() ) ) {
> > break ;
> > }
> > }
> >
> > The problem is that opName is the name of the method from the generated
> > stub interface: "getWeatherInfo". The op.getName is returning
> > "GetWeatherInfo". I looked at the code for Call in Axis 1.1, and it 
> looks
> > the same, so I'm not sure why it was working, but it was. Unfortunately, 
> no
> > such luck in Axis 1.2RC3.
> >
> > Any ideas? Is there something I'm doing wrong, or is this a bug?
> >
> > Thanks,
> >
> > Jason
> 
> --
> Davanum Srinivas - http://webservices.apache.org/~dims/
>

Re: Problem upgrading from Axis 1.1 to Axis 1.2RC3

Posted by Jason Carreira <jc...@gmail.com>.
Well, in the previous case it was.. I supplied a patch. 

I'm looking at what it could be now, because the auto-generated test case 
seems to work now. Did something change in type mapping between 1.1 and 1.2? 
I'm working with this through Spring, as described here:

http://springframework.org/docs/reference_1.2RC2/remoting.html#d0e10505

On 4/28/05, Jeff <je...@cogentlogic.com> wrote:
> 
> I mentioned this yesterday for J2SE 1.4.2_06 (I don't use J2SE 1.5). The
> implication being that it's unlikely to be an Axis 1.2RC3 issue causing 
> the
> problem!
> 
> 
> Jeff
> 
> 
> ----- Original Message -----
> From: "Davanum Srinivas" <da...@gmail.com>
> To: "Jason Carreira" <jc...@gmail.com>
> Cc: <ax...@ws.apache.org>
> Sent: Thursday, April 28, 2005 10:45 AM
> Subject: Re: Problem upgrading from Axis 1.1 to Axis 1.2RC3
> 
> Jason,
> 
> are u using the WSDL2Java generated classes? i just tried it and it works
> fine.
> 
> -- dims
> 
> On 4/28/05, Jason Carreira <jc...@gmail.com> wrote:
> > Ok, I've created an issue:
> > http://issues.apache.org/jira/browse/AXIS-1964
> >
> > Now I'm on to another bug :-)
> >
> > For some reason when it's trying to find the type mappings it's not
> getting
> > the correct encoding. In the
> > org.apache.axis.MessageContext#encodingStyle it's got "".
> > My type mappings are correctly mapped for
> > org.apache.axis.Constants#URI_SOAP11_ENC
> > ("http://schemas.xmlsoap.org/soap/encoding/"), so they're
> > not found and I end up with:
> >
> > org.xml.sax.SAXException: Deserializing parameter 
> 'GetWeatherInfoResult':
> > could not find deserializer for type
> > {http://ejse.com/WeatherService/}WeatherInfo
> > at
> > org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:270)
> > at
> >
> org.apache.axis.encoding.DeserializationContext.startElement
> (Deserialization
> Context.java:1035)
> >
> > Any thoughts on where I should look or what I might be doing wrong?
> >
> > Jason
> >
> > On 4/27/05, Davanum Srinivas <da...@gmail.com> wrote:
> > > Jason,
> > >
> > > throw JavaUtils.xmlNameToJava into the mix and see if it works with
> > > all your test cases...if it does, open up a JIRA bug and i will check
> > > it in.
> > >
> > > thanks,
> > > dims
> > >
> > > On 4/27/05, Jason Carreira < jcarreira@gmail.com> wrote:
> > > > Hi all,
> > > >
> > > > I'm moving from Apache Axis 1.1 to 1.2RC3 and I'm having an issue
> with
> > > > calling methods on a web service I've generated a client for. I
> > re-generated
> > > > the client code for 1.2RC3. I'm switching because we're moving from
> > JDK1.4.2
> > > > up to JDK5 and the "enum" variable names and package are illegal.
> > > >
> > > > Anyway, on to my problem. The service I'm binding to is the weather
> > service
> > > > here:
> > > >
> > http://www.ejse.com/services/weather_xml_web_services.htm.
> > > > It's just an example app to show how we can do these things and to
> test
> > out
> > > > using Spring's Axis support. With 1.1 this worked fine. With 1.2RC3
> I've
> > > > tracked the problem down to the section starting with line 1338 in
> > > > org.apache.axis.client.Call:
> > > >
> > > > for ( int i = 0 ; i < operations.size() ; i++, op=null ) {
> > > > op = (Operation) operations.get( i );
> > > > if ( opName.equals( op.getName() ) ) {
> > > > break ;
> > > > }
> > > > }
> > > >
> > > > The problem is that opName is the name of the method from the
> generated
> > > > stub interface: "getWeatherInfo". The op.getName is returning
> > > > "GetWeatherInfo". I looked at the code for Call in Axis 1.1, and it
> > looks
> > > > the same, so I'm not sure why it was working, but it was.
> Unfortunately,
> > no
> > > > such luck in Axis 1.2RC3.
> > > >
> > > > Any ideas? Is there something I'm doing wrong, or is this a bug?
> > > >
> > > > Thanks,
> > > >
> > > > Jason
> > >
> > > --
> > > Davanum Srinivas - http://webservices.apache.org/~dims/
> > >
> >
> >
> 
> --
> Davanum Srinivas - http://webservices.apache.org/~dims/
> 
>

Re: Problem upgrading from Axis 1.1 to Axis 1.2RC3

Posted by Jeff <je...@cogentlogic.com>.
I mentioned this yesterday for J2SE 1.4.2_06 (I don't use J2SE 1.5). The
implication being that it's unlikely to be an Axis 1.2RC3 issue causing the
problem!


Jeff


----- Original Message ----- 
From: "Davanum Srinivas" <da...@gmail.com>
To: "Jason Carreira" <jc...@gmail.com>
Cc: <ax...@ws.apache.org>
Sent: Thursday, April 28, 2005 10:45 AM
Subject: Re: Problem upgrading from Axis 1.1 to Axis 1.2RC3


Jason,

are u using the WSDL2Java generated classes? i just tried it and it works
fine.

-- dims

On 4/28/05, Jason Carreira <jc...@gmail.com> wrote:
> Ok, I've created an issue:
> http://issues.apache.org/jira/browse/AXIS-1964
>
>  Now I'm on to another bug :-)
>
>  For some reason when it's trying to find the type mappings it's not
getting
> the correct encoding. In the
> org.apache.axis.MessageContext#encodingStyle it's got "".
> My type mappings are correctly mapped for
> org.apache.axis.Constants#URI_SOAP11_ENC
> ("http://schemas.xmlsoap.org/soap/encoding/"), so they're
> not found and I end up with:
>
>  org.xml.sax.SAXException: Deserializing parameter 'GetWeatherInfoResult':
> could not find deserializer for type
> {http://ejse.com/WeatherService/}WeatherInfo
>      at
> org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:270)
>      at
>
org.apache.axis.encoding.DeserializationContext.startElement(Deserialization
Context.java:1035)
>
>  Any thoughts on where I should look or what I might be doing wrong?
>
>  Jason
>
> On 4/27/05, Davanum Srinivas <da...@gmail.com> wrote:
> > Jason,
> >
> > throw JavaUtils.xmlNameToJava into the mix and see if it works with
> > all your test cases...if it does, open up a JIRA bug and i will check
> > it in.
> >
> > thanks,
> > dims
> >
> > On 4/27/05, Jason Carreira < jcarreira@gmail.com> wrote:
> > > Hi all,
> > >
> > >  I'm moving from Apache Axis 1.1 to 1.2RC3 and I'm having an issue
with
> > > calling methods on a web service I've generated a client for. I
> re-generated
> > > the client code for 1.2RC3. I'm switching because we're moving from
> JDK1.4.2
> > > up to JDK5 and the "enum" variable names and package are illegal.
> > >
> > >  Anyway, on to my problem. The service I'm binding to is the weather
> service
> > > here:
> > >
> http://www.ejse.com/services/weather_xml_web_services.htm.
> > > It's just an example app to show how we can do these things and to
test
> out
> > > using Spring's Axis support. With 1.1 this worked fine. With 1.2RC3
I've
> > > tracked the problem down to the section starting with line 1338 in
> > > org.apache.axis.client.Call:
> > >
> > >          for ( int i = 0 ; i < operations.size() ; i++, op=null ) {
> > >              op = (Operation) operations.get( i );
> > >              if ( opName.equals( op.getName() ) ) {
> > >                  break ;
> > >              }
> > >          }
> > >
> > >  The problem is that opName is the name of the method from the
generated
> > > stub interface: "getWeatherInfo". The op.getName is returning
> > > "GetWeatherInfo". I looked at the code for Call in Axis 1.1, and it
> looks
> > > the same, so I'm not sure why it was working, but it was.
Unfortunately,
> no
> > > such luck in Axis 1.2RC3.
> > >
> > >  Any ideas? Is there something I'm doing wrong, or is this a bug?
> > >
> > >  Thanks,
> > >
> > >  Jason
> >
> > --
> > Davanum Srinivas - http://webservices.apache.org/~dims/
> >
>
>


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/


Re: Problem upgrading from Axis 1.1 to Axis 1.2RC3

Posted by Jason Carreira <jc...@gmail.com>.
There's something weird going on with type mappings, best I can figure. 

In this part of the Call class, it's getting the javaType as null, when it 
should be (I think) the WeatherInfo type created by WSDL2Java:


javaType = parameters.returnParam.getType().getName();
}
if (javaType == null) {
javaType = "";
}
else {
javaType = javaType + ".class";
}
this.setReturnType(returnType);
try {
Class clazz = ClassUtils.forName(javaType);
this.setReturnClass(clazz);
} catch (ClassNotFoundException swallowedException) {
//log that this lookup failed,
log.debug(Messages.getMessage("clientNoReturnClass",
javaType));
}

later it does this:

Use use = bEntry.getInputBodyType(bop.getOperation());
setOperationUse(use);
if (use == Use.LITERAL) {
// Turn off encoding
setEncodingStyle(null);
// turn off XSI types
setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
}

user comes back as "literal" which makes the encoding style be set to 
null... therefore it can't be used later to look up the type mappings.

I guess I don't understand type mappings in Axis. Here's what the unit test 
generated by WSDL2Java does:

org.apache.axis.description.OperationDesc oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("GetWeatherInfo");
oper.addParameter(new javax.xml.namespace.QName("
http://ejse.com/WeatherService/", "zipCode"), new javax.xml.namespace.QName
("http://www.w3.org/2001/XMLSchema", "int"), int.class, 
org.apache.axis.description.ParameterDesc.IN<http://org.apache.axis.description.ParameterDesc.IN>,
false, false);
oper.setReturnType(new javax.xml.namespace.QName("
http://ejse.com/WeatherService/", "WeatherInfo"));
oper.setReturnClass(com.eplus.app.service.bind.weather.WeatherInfo.class);
oper.setReturnQName(new javax.xml.namespace.QName("
http://ejse.com/WeatherService/", "GetWeatherInfoResult"));
oper.setStyle(org.apache.axis.constants.Style.WRAPPED);
oper.setUse(org.apache.axis.constants.Use.LITERAL);
_operations[0] = oper;

then later it sets this OperatatonDesc into a new Call object to call the 
operation. I'm not sure how it fits in, but it also does this:

qName = new javax.xml.namespace.QName("http://ejse.com/WeatherService/", 
"WeatherInfo");
cachedSerQNames.add(qName);
cls = com.eplus.app.service.bind.weather.WeatherInfo.class;
cachedSerClasses.add(cls);
cachedSerFactories.add(beansf);
cachedDeserFactories.add(beandf);

For my Spring-enabled client (autogenerating a stub and wrapping 
RemoteExceptions) I do this type mapping:

TypeMappingRegistry tmr = service.getTypeMappingRegistry();
TypeMapping tm = tmr.createTypeMapping();

registerMapping(tm, "WeatherInfo", WeatherInfo.class);
registerMapping(tm, "ExtendedWeatherInfo", ExtendedWeatherInfo.class);
registerMapping(tm, "DayForecastInfo", DayForecastInfo.class);
registerMapping(tm, "NineDayForecastInfo", NineDayForecastInfo.class);
registerMapping(tm, "ForecastDays", ForecastDays.class);
registerMapping(tm, "IraqCities", IraqCities.class);
tmr.register(org.apache.axis.Constants.URI_SOAP11_ENC, tm);
}

private void registerMapping(TypeMapping tm, String name, Class clazz) {
QName qname = new QName("http://ejse.com/WeatherService/",name);

tm.register(clazz,qname,
new BeanSerializerFactory(clazz, qname),
new BeanDeserializerFactory(clazz, qname));
}

Does anything stand out here? I know the type mappings are getting in there 
correctly, because I've seen them as I step through with the debugger, but 
the encodingStyle is being emptied out because it's decided it's used as 
"literal", so it doesn't find my type mappings. 

Thanks,

Jason

On 4/28/05, Davanum Srinivas <da...@gmail.com> wrote:
> 
> Jason,
> 
> are u using the WSDL2Java generated classes? i just tried it and it works 
> fine.
> 
> -- dims
> 
> On 4/28/05, Jason Carreira <jc...@gmail.com> wrote:
> > Ok, I've created an issue:
> > http://issues.apache.org/jira/browse/AXIS-1964
> >
> > Now I'm on to another bug :-)
> >
> > For some reason when it's trying to find the type mappings it's not 
> getting
> > the correct encoding. In the
> > org.apache.axis.MessageContext#encodingStyle it's got "".
> > My type mappings are correctly mapped for
> > org.apache.axis.Constants#URI_SOAP11_ENC
> > ("http://schemas.xmlsoap.org/soap/encoding/"), so they're
> > not found and I end up with:
> >
> > org.xml.sax.SAXException: Deserializing parameter 
> 'GetWeatherInfoResult':
> > could not find deserializer for type
> > {http://ejse.com/WeatherService/}WeatherInfo
> > at
> > org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:270)
> > at
> > org.apache.axis.encoding.DeserializationContext.startElement(
> DeserializationContext.java:1035)
> >
> > Any thoughts on where I should look or what I might be doing wrong?
> >
> > Jason
> >
> > On 4/27/05, Davanum Srinivas <da...@gmail.com> wrote:
> > > Jason,
> > >
> > > throw JavaUtils.xmlNameToJava into the mix and see if it works with
> > > all your test cases...if it does, open up a JIRA bug and i will check
> > > it in.
> > >
> > > thanks,
> > > dims
> > >
> > > On 4/27/05, Jason Carreira < jcarreira@gmail.com> wrote:
> > > > Hi all,
> > > >
> > > > I'm moving from Apache Axis 1.1 to 1.2RC3 and I'm having an issue 
> with
> > > > calling methods on a web service I've generated a client for. I
> > re-generated
> > > > the client code for 1.2RC3. I'm switching because we're moving from
> > JDK1.4.2
> > > > up to JDK5 and the "enum" variable names and package are illegal.
> > > >
> > > > Anyway, on to my problem. The service I'm binding to is the weather
> > service
> > > > here:
> > > >
> > http://www.ejse.com/services/weather_xml_web_services.htm.
> > > > It's just an example app to show how we can do these things and to 
> test
> > out
> > > > using Spring's Axis support. With 1.1 this worked fine. With 1.2RC3I've
> > > > tracked the problem down to the section starting with line 1338 in
> > > > org.apache.axis.client.Call:
> > > >
> > > > for ( int i = 0 ; i < operations.size() ; i++, op=null ) {
> > > > op = (Operation) operations.get( i );
> > > > if ( opName.equals( op.getName() ) ) {
> > > > break ;
> > > > }
> > > > }
> > > >
> > > > The problem is that opName is the name of the method from the 
> generated
> > > > stub interface: "getWeatherInfo". The op.getName is returning
> > > > "GetWeatherInfo". I looked at the code for Call in Axis 1.1, and it
> > looks
> > > > the same, so I'm not sure why it was working, but it was. 
> Unfortunately,
> > no
> > > > such luck in Axis 1.2RC3.
> > > >
> > > > Any ideas? Is there something I'm doing wrong, or is this a bug?
> > > >
> > > > Thanks,
> > > >
> > > > Jason
> > >
> > > --
> > > Davanum Srinivas - http://webservices.apache.org/~dims/
> > >
> >
> >
> 
> --
> Davanum Srinivas - http://webservices.apache.org/~dims/
>

Re: Problem upgrading from Axis 1.1 to Axis 1.2RC3

Posted by Davanum Srinivas <da...@gmail.com>.
Jason,

are u using the WSDL2Java generated classes? i just tried it and it works fine. 

-- dims

On 4/28/05, Jason Carreira <jc...@gmail.com> wrote:
> Ok, I've created an issue:
> http://issues.apache.org/jira/browse/AXIS-1964
>  
>  Now I'm on to another bug :-)
>  
>  For some reason when it's trying to find the type mappings it's not getting
> the correct encoding. In the
> org.apache.axis.MessageContext#encodingStyle it's got "".
> My type mappings are correctly mapped for
> org.apache.axis.Constants#URI_SOAP11_ENC
> ("http://schemas.xmlsoap.org/soap/encoding/"), so they're
> not found and I end up with:
>  
>  org.xml.sax.SAXException: Deserializing parameter 'GetWeatherInfoResult': 
> could not find deserializer for type
> {http://ejse.com/WeatherService/}WeatherInfo
>      at
> org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:270)
>      at
> org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
>  
>  Any thoughts on where I should look or what I might be doing wrong?
>  
>  Jason
> 
> On 4/27/05, Davanum Srinivas <da...@gmail.com> wrote:
> > Jason,
> > 
> > throw JavaUtils.xmlNameToJava into the mix and see if it works with
> > all your test cases...if it does, open up a JIRA bug and i will check
> > it in.
> > 
> > thanks,
> > dims
> > 
> > On 4/27/05, Jason Carreira < jcarreira@gmail.com> wrote:
> > > Hi all,
> > >
> > >  I'm moving from Apache Axis 1.1 to 1.2RC3 and I'm having an issue with
> > > calling methods on a web service I've generated a client for. I
> re-generated 
> > > the client code for 1.2RC3. I'm switching because we're moving from
> JDK1.4.2
> > > up to JDK5 and the "enum" variable names and package are illegal.
> > >
> > >  Anyway, on to my problem. The service I'm binding to is the weather
> service 
> > > here:
> > >
> http://www.ejse.com/services/weather_xml_web_services.htm.
> > > It's just an example app to show how we can do these things and to test
> out 
> > > using Spring's Axis support. With 1.1 this worked fine. With 1.2RC3 I've
> > > tracked the problem down to the section starting with line 1338 in
> > > org.apache.axis.client.Call:
> > >
> > >          for ( int i = 0 ; i < operations.size() ; i++, op=null ) {
> > >              op = (Operation) operations.get( i );
> > >              if ( opName.equals( op.getName() ) ) {
> > >                  break ;
> > >              }
> > >          } 
> > >
> > >  The problem is that opName is the name of the method from the generated
> > > stub interface: "getWeatherInfo". The op.getName is returning
> > > "GetWeatherInfo". I looked at the code for Call in Axis 1.1, and it
> looks
> > > the same, so I'm not sure why it was working, but it was. Unfortunately,
> no
> > > such luck in Axis 1.2RC3.
> > >
> > >  Any ideas? Is there something I'm doing wrong, or is this a bug?
> > >
> > >  Thanks,
> > >
> > >  Jason
> > 
> > --
> > Davanum Srinivas - http://webservices.apache.org/~dims/
> > 
> 
>  


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

Re: Problem upgrading from Axis 1.1 to Axis 1.2RC3

Posted by Jason Carreira <jc...@gmail.com>.
Ok, I've created an issue: http://issues.apache.org/jira/browse/AXIS-1964

Now I'm on to another bug :-)

For some reason when it's trying to find the type mappings it's not getting 
the correct encoding. In the
org.apache.axis.MessageContext#encodingStyleit's got "". My type
mappings are correctly mapped for
org.apache.axis.Constants#URI_SOAP11_ENC ("
http://schemas.xmlsoap.org/soap/encoding/"), so they're not found and I end 
up with:

org.xml.sax.SAXException: Deserializing parameter 'GetWeatherInfoResult': 
could not find deserializer for type {
http://ejse.com/WeatherService/}WeatherInfo
at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:270)
at org.apache.axis.encoding.DeserializationContext.startElement(
DeserializationContext.java:1035)

Any thoughts on where I should look or what I might be doing wrong?

Jason

On 4/27/05, Davanum Srinivas <da...@gmail.com> wrote:
> 
> Jason,
> 
> throw JavaUtils.xmlNameToJava into the mix and see if it works with
> all your test cases...if it does, open up a JIRA bug and i will check
> it in.
> 
> thanks,
> dims
> 
> On 4/27/05, Jason Carreira <jc...@gmail.com> wrote:
> > Hi all,
> >
> > I'm moving from Apache Axis 1.1 to 1.2RC3 and I'm having an issue with
> > calling methods on a web service I've generated a client for. I 
> re-generated
> > the client code for 1.2RC3. I'm switching because we're moving from 
> JDK1.4.2
> > up to JDK5 and the "enum" variable names and package are illegal.
> >
> > Anyway, on to my problem. The service I'm binding to is the weather 
> service
> > here:
> > http://www.ejse.com/services/weather_xml_web_services.htm.
> > It's just an example app to show how we can do these things and to test 
> out
> > using Spring's Axis support. With 1.1 this worked fine. With 1.2RC3 I've
> > tracked the problem down to the section starting with line 1338 in
> > org.apache.axis.client.Call:
> >
> > for ( int i = 0 ; i < operations.size() ; i++, op=null ) {
> > op = (Operation) operations.get( i );
> > if ( opName.equals( op.getName() ) ) {
> > break ;
> > }
> > }
> >
> > The problem is that opName is the name of the method from the generated
> > stub interface: "getWeatherInfo". The op.getName is returning
> > "GetWeatherInfo". I looked at the code for Call in Axis 1.1, and it 
> looks
> > the same, so I'm not sure why it was working, but it was. Unfortunately, 
> no
> > such luck in Axis 1.2RC3.
> >
> > Any ideas? Is there something I'm doing wrong, or is this a bug?
> >
> > Thanks,
> >
> > Jason
> 
> --
> Davanum Srinivas - http://webservices.apache.org/~dims/
>

Re: Problem upgrading from Axis 1.1 to Axis 1.2RC3

Posted by Davanum Srinivas <da...@gmail.com>.
Jason,

throw JavaUtils.xmlNameToJava into the mix and see if it works with
all your test cases...if it does, open up a JIRA bug and i will check
it in.

thanks,
dims

On 4/27/05, Jason Carreira <jc...@gmail.com> wrote:
> Hi all,
>  
>  I'm moving from Apache Axis 1.1 to 1.2RC3 and I'm having an issue with
> calling methods on a web service I've generated a client for. I re-generated
> the client code for 1.2RC3. I'm switching because we're moving from JDK1.4.2
> up to JDK5 and the "enum" variable names and package are illegal.
>  
>  Anyway, on to my problem. The service I'm binding to is the weather service
> here:
> http://www.ejse.com/services/weather_xml_web_services.htm.
> It's just an example app to show how we can do these things and to test out
> using Spring's Axis support. With 1.1 this worked fine. With 1.2RC3 I've
> tracked the problem down to the section starting with line 1338 in
> org.apache.axis.client.Call:
>  
>          for ( int i = 0 ; i < operations.size() ; i++, op=null ) {
>              op = (Operation) operations.get( i );
>              if ( opName.equals( op.getName() ) ) {
>                  break ;
>              }
>          }
>  
>  The problem is that opName is the name of the method from the generated
> stub interface: "getWeatherInfo". The op.getName is returning
> "GetWeatherInfo". I looked at the code for Call in Axis 1.1, and it looks
> the same, so I'm not sure why it was working, but it was. Unfortunately, no
> such luck in Axis 1.2RC3.
>  
>  Any ideas? Is there something I'm doing wrong, or is this a bug? 
>  
>  Thanks,
>  
>  Jason 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/