axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorge Fernandez <informaticu007-...@yahoo.es>
Subject Re: Issue with ADB and parsing a response message (namespaces)
Date Mon, 23 Apr 2007 00:40:39 GMT
Hi,

I couldn't reproduce the error again. If you want I can open a JIRA but I can't attach any
code. 

I had found another problem related with ADB parsing when there is some hierarchy and I raised
JIRA 2578. 

Regards,

Jorge Fernández

Anne Thomas Manes <atmanes@gmail.com> escribió: Please file a JIRA.

On 4/20/07, Jorge Fernandez  wrote:
> Hi all,
>
>
> I'm having problems with the namespaces of a response message like this:
>
>  
> xmlns:ns3="http://op_messages.medici_link/xsd">
>             
> xmlns:ns0="http://external.communication_data_model.medici_link/xsd"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="ns0:extConfiguration">
>         ..................................
>                
> xsi:type="ns0:extAbstractParameterDesc">
>         ..................................
>                
>         ..................................
>                
> xsi:type="ns0:extPrimitiveParameterDesc">
>         .................................
>                
>         ..................................
>             
>          
>       
>    
>
>
> I have this exception when parsing the first element
> (ns0:abstractParameters):
>
> java.lang.RuntimeException: java.lang.RuntimeException: Unsupported type
> null extPrimitiveParameterDesc
>     at client.Medici_LinkStub.fromOM(Medici_LinkStub.java:5210)
>     at
> client.Medici_LinkStub.getDetailedMonitoringStages(Medici_LinkStub.java:1945)
>     at
> client.ClientUtilities.getDetailedMonitoringStagesTest(ClientUtilities.java:244)
>     at client.Client.main(Client.java:53)
> Caused by: java.lang.RuntimeException: Unsupported type null
> extPrimitiveParameterDesc
>     at
> medici_link.op_messages.xsd.ExtensionMapper.getTypeObject(ExtensionMapper.java:181)
>     at
> medici_link.communication_data_model.external.xsd.ExtParameterDesc$Factory.parse(ExtParameterDesc.java:1171)
>     at
> medici_link.communication_data_model.external.xsd.ExtAbstractParameterDesc$Factory.parse(ExtAbstractParameterDesc.java:1311)
>     at
> medici_link.communication_data_model.external.xsd.ExtConfiguration$Factory.parse(ExtConfiguration.java:923)
>     at
> medici_link.communication_data_model.external.xsd.ExtStage$Factory.parse(ExtStage.java:650)
>     at
> medici_link.op_messages.xsd.GetDetailedMonitoringStagesResponse$Factory.parse(GetDetailedMonitoringStagesResponse.java:424)
>     at client.Medici_LinkStub.fromOM(Medici_LinkStub.java:4833)
>     ... 3 more
>
> I have a hierachy of classes:
>
> ExtAbstractParameterDesc and ExtPrimitiveParameterDesc that extend
> ExtParameterDesc.
>
> I've been diving in my code that was created with WSDL2Java and ADB (Axis
> 1.1.1) and I could see that for that element, it enters
> the parse Method of ExtAbstractParameterDesc, then it reaches this:
>
>  if
> ("true".equals(reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"))){
>     list9.add(null);
>     reader.next();
> } else {
>
> list9.add(medici_link.communication_data_model.external.xsd.ExtParameterDesc.Factory.parse(reader));
> }
>
> And goes to the else statement. So it enters the parse method of
> ExtParameterDesc (it's father class).
>
> When it's inside that method, variable type gets the value
> "ExtPrimitiveParameterDesc" (I don't know if it should be
> ExtAbstractParameterDesc but I made that change and it threw an exception in
> other place) and finally it tries to get the namespace uri of prefix ns0 and
> it gets null.
> this is the snippet:
>
> java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
>  if (!"extParameterDesc".equals(type)){
>      //find namespace for the prefix
>      java.lang.String nsUri =
> reader.getNamespaceContext().getNamespaceURI("ns0");
>
> nsUri="http://external.communication_data_model.medici_link/xsd";
>      return
> (ExtParameterDesc)medici_link.op_messages.xsd.ExtensionMapper.getTypeObject(nsUri,type,reader);
>  }
>
>
> As you can see in the message, it is
> "http://external.communication_data_model.medici_link/xsd".
> So the exception is thrown because it can't get de typeObject.
>
> I added the line
> nsUri="http://external.communication_data_model.medici_link/xsd";
> just before getTypeObject is called and it works.
>
> With XMLBeans, it works perfectly.
>
> Regards,
>
> Jorge Fernández
>
>
>
>  ________________________________
>
> LLama Gratis a cualquier PC del Mundo.
> Llamadas a fijos y móviles desde 1 céntimo por minuto.
> http://es.voice.yahoo.com
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org



       
---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
Mime
View raw message