Axis1.1 / Axis 1.2 IllegalArgumentException

2005-06-22 Thread Peter Len




Hello,

I am trying to run some tests to upgrade from Axis 1.1 to Axis 1.2 and
have run into a problem. My WSDL has the following:

xs:complexType name="OntSearchResponseType"
 xs:sequence
   xs:element name="id" type="ifis:SearchIdType"/
   xs:element name="result" type="ifis:OntResultType"/
 /xs:sequence
/xs:complexType

xs:simpleType name="SearchIdType"
 xs:annotation
  xs:documentationPer provider unique search
id./xs:documentation
 /xs:annotation
 xs:restriction base="xs:positiveInteger"/
/xs:simpleType

When I run WSDL2Java under 1.1 a SearchIdType object is created but
under Axis 1.2 it is not. 

In my test I have my client still running under Axis 1.1 with the Axis
1.1 WSDL2Java generated objects (can't convert the client just yet
because other modules are out of my control). I have two servers
running. One is running the Axis 1.1 stuff and the other server is
running Axis 1.2 with the Axis 1.2 WSDL2Java generated objects.

When I make a web service call from my client to the Axis 1.1
server the SOAP body being returned is:

soapenv:Body
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="id-30999846" 
 searchResponse xmlns="urn:ifis-wsdl" 
 id xmlns=""1/id 
 result xmlns=""
xmlns:ns1="http://www.dod.mil/ifis/1.0/ifis#"
ns1:isStillProcessing="false"
ns1:timestamp="2005-06-22T12:45:52.020Z"/ 
 /searchResponse 
 /soapenv:Body

When I make a web service call from my client to the Axis 1.2 server
the SOAP body being returned is:

soapenv:Body
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="id-1132857"
 searchResponse xmlns="urn:ifis-wsdl"
 id xmlns=""
xsi:type="xsd:positiveInteger"1/id
 result xmlns=""
xmlns:ns1="http://www.dod.mil/ifis/1.0/ifis#"
ns1:isStillProcessing="false"
ns1:timestamp="2005-06-22T12:54:28.191Z"/
 /searchResponse
 /soapenv:Body

You can see that the Axis 1.2 server returned a slightly different
version of the "id" element. When hitting the Axis 1.2 server, my
client ends up throwing an "IllegalArgumentException: argument type
mismatch" error. My thought is that when Axis (1.1) deserializes
the SOAP Body on my client, it is having problems with this new version
of the "id" element. 

Can anyone verify that this is what is causing the error?

Thanks - Peter











Re: Axis1.1 / Axis 1.2 IllegalArgumentException

2005-06-22 Thread Peter Len




Solved... 

Even though the SearchIdType did not exist as an object after running
WSDL2Java using Axis 1.2, there still was a typeMapping entry that got
created (in the deploy.wsdd file) which I failed to add to my
server-config.wsdd file. Once I did that all was well.

Developer error.

Thanks - Peter

Peter Len wrote:

  
  
Hello,
  
I am trying to run some tests to upgrade from Axis 1.1 to Axis 1.2 and
have run into a problem. My WSDL has the following:
  
xs:complexType name="OntSearchResponseType"
 xs:sequence
   xs:element name="id" type="ifis:SearchIdType"/
   xs:element name="result" type="ifis:OntResultType"/
 /xs:sequence
/xs:complexType
  
xs:simpleType name="SearchIdType"
 xs:annotation
  xs:documentationPer provider unique search
id./xs:documentation
 /xs:annotation
 xs:restriction base="xs:positiveInteger"/
/xs:simpleType
  
When I run WSDL2Java under 1.1 a SearchIdType object is created but
under Axis 1.2 it is not. 
  
In my test I have my client still running under Axis 1.1 with the Axis
1.1 WSDL2Java generated objects (can't convert the client just yet
because other modules are out of my control). I have two servers
running. One is running the Axis 1.1 stuff and the other server is
running Axis 1.2 with the Axis 1.2 WSDL2Java generated objects.
  
When I make a web service call from my client to the Axis 1.1
server the SOAP body being returned is:
  
soapenv:Body
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="id-30999846" 
 searchResponse xmlns="urn:ifis-wsdl" 
 id xmlns=""1/id 
 result xmlns=""
xmlns:ns1="http://www.dod.mil/ifis/1.0/ifis#"
ns1:isStillProcessing="false"
ns1:timestamp="2005-06-22T12:45:52.020Z"/ 
 /searchResponse 
 /soapenv:Body
  
When I make a web service call from my client to the Axis 1.2 server
the SOAP body being returned is:
  
soapenv:Body
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="id-1132857"
 searchResponse xmlns="urn:ifis-wsdl"
 id xmlns=""
xsi:type="xsd:positiveInteger"1/id
 result xmlns=""
xmlns:ns1="http://www.dod.mil/ifis/1.0/ifis#"
ns1:isStillProcessing="false"
ns1:timestamp="2005-06-22T12:54:28.191Z"/
 /searchResponse
 /soapenv:Body
  
You can see that the Axis 1.2 server returned a slightly different
version of the "id" element. When hitting the Axis 1.2 server, my
client ends up throwing an "IllegalArgumentException: argument type
mismatch" error. My thought is that when Axis (1.1) deserializes
the SOAP Body on my client, it is having problems with this new version
of the "id" element. 
  
Can anyone verify that this is what is causing the error?
  
Thanks - Peter
  
  
  
  
  
  
  





IncompatibleClassChangeError usign Axis 1.2?????

2005-06-09 Thread Peter Len

Hello,

We are trying to upgrade from Axis 1.1 to Axis 1.2.  The service that is 
running has the new Axis 1.2 libraries and the new WSDL2Java objects 
(using the 1.2 libraries) have been built, compiled, and installed.  
When I try to make a web service call, however, I get an 
IncompatibleClassChangeError.  Part of the stack trace is below:


INFO [14:07:07] (AxisServlet.java:logException:400) - Exception:
java.lang.IncompatibleClassChangeError
   at 
org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1387)

   at org.apache.axis.message.SOAPHandler.addTextNode(SOAPHandler.java:148)
   at org.apache.axis.message.SOAPHandler.endElement(SOAPHandler.java:112)
   at 
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
   at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)
   at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown 
Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 
Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)

   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
   at javax.xml.parsers.SAXParser.parse(Unknown Source)
   at 
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)

   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
   at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
   at 
mil.dia.nces.security.validators.WSSecSignatureValidator.validate(WSSecSignatureValidator.java:117)
   at 
mil.dia.nces.security.util.NCESMessageValidator.validate(NCESMessageValidator.java:251)
   at 
mil.dia.nces.security.axis.handler.NCESBasicHandler.validate(NCESBasicHandler.java:259)
   at 
mil.dia.nces.security.axis.handler.NCESServerHandler.requestFlow(NCESServerHandler.java:99)
   at 
mil.dia.nces.security.axis.handler.NCESServerHandler.invoke(NCESServerHandler.java:59)
   at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32).


Something that is wierd is that when I call a bogus service under the 
webapp that Axis is running I still get the IncompatibleClassChangeError:

   https://myserver:8445/onto-ws/services/NotAService

When I call an older version (Axis 1.1) that does not throw the 
IncompatibleClassChangeError and call the bogus service I get the 
typical error:

   The AXIS engine could not find a target service to invoke!

That makes me think that is whatever is causing this 
IncompatibleClassChangeError is happening before the service is called.  
I don't know the Axis routing so I am unsure where to look.  It seems 
that the WSDL (via 
http://myserver:8090/onto-ws/services/Post2Ontology?wsdl) looks fine and 
the service seemed to load properly via the server-config.wsdd file.  I 
also verified that I don't have multiple axis JAR files.


Does anyone have a thought on this type of error?

Thanks - Peter Len