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 22:25:11 GMT
Hi Martin,

I don't know why is that there and if it's incorrect. I had just installed axis2 1.2 RC-2
and did no changes to the configuration. So I don't know what should I do to get it working.

Saludos,

Jorge Fernández

Martin Gainty <mgainty@hotmail.com> escribió:       Jorge--
 
Have you checked the  xmlns:wsa="http://www.w3.org/2005/08/addressing"
 I did however  see a working ws:schema definition  located at
 http://www.w3.org/2006/03/addressing/ws-addr.xsd
  
 Saludos
M--
 This email message and any files transmitted with it contain  confidential
information intended only for the person(s) to whom this email  message is
addressed.  If you have received this email message in error,  please notify
the sender immediately by telephone or email and destroy the  original
message without making a copy.  Thank you.

    ----- Original Message ----- 
   From:    Jorge Fernandez 
   To: axis-user@ws.apache.org ; amilasuriarachchi@gmail.com    
   Sent: Monday, April 23, 2007 5:33  PM
   Subject: Re: Issue with ADB and parsing a    response message (namespaces)
   

Hi Amila,

I tried to do it with the new release and for    the moment I get this exception:

Could you help me with it?? It's on    the client. The response message sent from the service
is    below

org.apache.axis2.AxisFault: A header representing a Message    Addressing Property is not
valid and the message cannot be    processed
    at    org.apache.axis2.addressing.AddressingFaultsHelper.triggerAddressingFault(AddressingFaultsHelper.java:150)
       at    org.apache.axis2.addressing.AddressingFaultsHelper.triggerActionMismatchFault(AddressingFaultsHelper.java:81)
       at    org.apache.axis2.handlers.addressing.AddressingInHandler.extractActionInformation(AddressingInHandler.java:276)
       at    org.apache.axis2.handlers.addressing.AddressingInHandler.extractAddressingInformation(AddressingInHandler.java:159)
       at    org.apache.axis2.handlers.addressing.AddressingInHandler.invoke(AddressingInHandler.java:95)
       at org.apache.axis2.engine.Phase.invoke(Phase.java:383)
       at    org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:203)
       at    org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:131)
       at    org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:378)
       at    org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
       at    api.APIStub.getDetailedMonitoringStages(APIStub.java:154)
       at api.Client.main(Client.java:35)


HTTP/1.1 200 OK
Server:    Apache-Coyote/1.1
Content-Type: application/soap+xml;    action="http://api/APIPortType/getDetailedMonitoringStagesResponse";charset=UTF-8
Transfer-Encoding:    chunked
Date: Mon, 23 Apr 2007 20:12:46 GMT

1c30
<?xml    version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope    xmlns:wsa="http://www.w3.org/2005/08/addressing"    xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
         <soapenv:Header>
            <wsa:Action>http://api/APIPortType/getDetailedMonitoringStagesResponse</wsa:Action>
            <wsa:RelatesTo>urn:uuid:398A7A6CF14E62B7611177359166024</wsa:RelatesTo>
         </soapenv:Header>
         <soapenv:Body>
            <getDetailedMonitoringStagesResponse    xmlns="http://op_messages.api/xsd">
               <return>
                  <stageID    xmlns="http://api/xsd">0</stageID>
                  <configurations    xmlns="http://api/xsd">
                     <abstractParameters>
                        <name>abstract0</name>
                        <parameterDependencies>
                           <name>primitive0</name>
                           <signalDependencies>
                              <name>signal0</name>
                           </signalDependencies>
                           <signalDependencies>
                              <name>signal1</name>
                           </signalDependencies>
                           <type>primitiveType0</type>
                           <units>units0</units>
                           <max>2</max>
                           <min>1</min>
                        </parameterDependencies>
                        <parameterDependencies>
                           <name>abstract1</name>
                           <signalDependencies>
                              <name>signal0</name>
                           </signalDependencies>
                           <signalDependencies>
                              <name>signal1</name>
                           </signalDependencies>
                           <type>abstractType1</type>
                           <values>value0</values>
                           <values>value1</values>
                        </parameterDependencies>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>abstractType0</type>
                        <values>value0</values>
                        <values>value1</values>
                     </abstractParameters>
                     <abstractParameters>
                        <name>abstract1</name>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>abstractType1</type>
                        <values>value0</values>
                        <values>value1</values>
                     </abstractParameters>
                     <id>0</id>
                     <primitiveParameters>
                        <name>primitive0</name>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>primitiveType0</type>
                        <units>units0</units>
                        <max>2</max>
                        <min>1</min>
                     </primitiveParameters>
                     <primitiveParameters>
                        <name>primitive1</name>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>primitiveType1</type>
                        <units>units1</units>
                        <max>2</max>
                        <min>1</min>
                     </primitiveParameters>
                  </configurations>
                  <configurations    xmlns="http://api/xsd">
                     <abstractParameters>
                        <name>abstract0</name>
                        <parameterDependencies>
                           <name>primitive0</name>
                           <signalDependencies>
                              <name>signal0</name>
                           </signalDependencies>
                           <signalDependencies>
                              <name>signal1</name>
                           </signalDependencies>
                           <type>primitiveType0</type>
                           <units>units0</units>
                           <max>2</max>
                           <min>1</min>
                        </parameterDependencies>
                        <parameterDependencies>
                           <name>abstract1</name>
                           <signalDependencies>
                              <name>signal0</name>
                           </signalDependencies>
                           <signalDependencies>
                              <name>signal1</name>
                           </signalDependencies>
                           <type>abstractType1</type>
                           <values>value0</values>
                           <values>value1</values>
                        </parameterDependencies>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>abstractType0</type>
                        <values>value0</values>
                        <values>value1</values>
                     </abstractParameters>
                     <abstractParameters>
                        <name>abstract1</name>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>abstractType1</type>
                        <values>value0</values>
                        <values>value1</values>
                     </abstractParameters>
                     <id>1</id>
                     <primitiveParameters>
                        <name>primitive0</name>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>primitiveType0</type>
                        <units>units0</units>
                        <max>2</max>
                        <min>1</min>
                     </primitiveParameters>
                     <primitiveParameters>
                        <name>primitive1</name>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>primitiveType1</type>
                        <units>units1</units>
                        <max>2</max>
                        <min>1</min>
                     </primitiveParameters>
                  </configurations>
                  <type    xmlns="http://api/xsd">type0</type>
               </return>
               <return>
                  <stageID    xmlns="http://api/xsd">1</stageID>
                  <configurations    xmlns="http://api/xsd">
                     <abstractParameters>
                        <name>abstract0</name>
                        <parameterDependencies>
                           <name>primitive0</name>
                           <signalDependencies>
                              <name>signal0</name>
                           </signalDependencies>
                           <signalDependencies>
                              <name>signal1</name>
                           </signalDependencies>
                           <type>primitiveType0</type>
                           <units>units0</units>
                           <max>2</max>
                           <min>1</min>
                        </parameterDependencies>
                        <parameterDependencies>
                           <name>abstract1</name>
                           <signalDependencies>
                              <name>signal0</name>
                           </signalDependencies>
                           <signalDependencies>
                              <name>signal1</name>
                           </signalDependencies>
                           <type>abstractType1</type>
                           <values>value0</values>
                           <values>value1</values>
                        </parameterDependencies>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>abstractType0</type>
                        <values>value0</values>
                        <values>value1</values>
                     </abstractParameters>
                     <abstractParameters>
                        <name>abstract1</name>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>abstractType1</type>
                        <values>value0</values>
                        <values>value1</values>
                     </abstractParameters>
                     <id>0</id>
                     <primitiveParameters>
                        <name>primitive0</name>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>primitiveType0</type>
                        <units>units0</units>
                        <max>2</max>
                        <min>1</min>
                     </primitiveParameters>
                     <primitiveParameters>
                        <name>primitive1</name>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>primitiveType1</type>
                        <units>units1</units>
                        <max>2</max>
                        <min>1</min>
                     </primitiveParameters>
                  </configurations>
                  <configurations    xmlns="http://api/xsd">
                     <abstractParameters>
                        <name>abstract0</name>
                        <parameterDependencies>
                           <name>primitive0</name>
                           <signalDependencies>
                              <name>signal0</name>
                           </signalDependencies>
                           <signalDependencies>
                              <name>signal1</name>
                           </signalDependencies>
                           <type>primitiveType0</type>
                           <units>units0</units>
                           <max>2</max>
                           <min>1</min>
                        </parameterDependencies>
                        <parameterDependencies>
                           <name>abstract1</name>
                           <signalDependencies>
                              <name>signal0</name>
                           </signalDependencies>
                           <signalDependencies>
                              <name>signal1</name>
                           </signalDependencies>
                           <type>abstractType1</type>
                           <values>value0</values>
                           <values>value1</values>
                        </parameterDependencies>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>abstractType0</type>
                        <values>value0</values>
                        <values>value1</values>
                     </abstractParameters>
                     <abstractParameters>
                        <name>abstract1</name>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>abstractType1</type>
                        <values>value0</values>
                        <values>value1</values>
                     </abstractParameters>
                     <id>1</id>
                     <primitiveParameters>
                        <name>primitive0</name>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>primitiveType0</type>
                        <units>units0</units>
                        <max>2</max>
                        <min>1</min>
                     </primitiveParameters>
                     <primitiveParameters>
                        <name>primitive1</name>
                        <signalDependencies>
                           <name>signal0</name>
                        </signalDependencies>
                        <signalDependencies>
                           <name>signal1</name>
                        </signalDependencies>
                        <type>primitiveType1</type>
                        <units>units1</units>
                        <max>2</max>
                        <min>1</min>
                     </primitiveParameters>
                  </configurations>
                  <type    xmlns="http://api/xsd">type1</type>
               </return>
            </getDetailedMonitoringStagesResponse>
         </soapenv:Body>
      </soapenv:Envelope>0




Amila Suriarachchi    <amilasuriarachchi@gmail.com> escribió:   We      had a similar
kind of problem, when parsing the responses which have      declared namespaces in inner elements
of the soap body element.

eg.      
<ns3:getDetailedMonitoringStag     esResponse        xmlns:ns3="http://op_messages.medici_link/xsd">
                   <ns3:return xmlns:ns0=" http://external.communication_data_model.medici_link/xsd"
       xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"        xsi:type="ns0:extConfiguration">
               ..................................
                      <ns0:abstractParameters        xsi:type="ns0:extAbstractParameterDesc">
                      ..................................
                      </ns0:abstractParameters>      
here  xmlns:ns0="http://external.communication_data_model.medici_link/xsd "      is declared
in an inner element.
this is an AXIOM bug and have fixed with      the latest AXIOM release.

Please have a look with the RC2 and the      latest AXIOM version. or next RC which will release
     soon.





     On 4/21/07, Jorge      Fernandez <informaticu007-pfc@yahoo.es>      wrote:    
Hi        all,


I'm having problems with the namespaces of a response        message like        this:

 <ns3:getDetailedMonitoringStagesResponse        xmlns:ns3="        http://op_messages.medici_link/xsd">
                   <ns3:return xmlns:ns0="        http://external.communication_data_model.medici_link/xsd"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "        xsi:type="ns0:extConfiguration">
               ..................................
                      <ns0:abstractParameters        xsi:type="ns0:extAbstractParameterDesc">
               ..................................        
                      </ns0:abstractParameters>
               ..................................
                      <ns0:primitiveParameters        xsi:type="ns0:extPrimitiveParameterDesc">
                      .................................
                      </ns0:primitiveParameters> 
               ..................................
                   </ns3:return>
                </ns3:getDetailedMonitoringStagesResponse>
             </soapenv:Body>
          </soapenv:Envelope>


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(ExtensionMapperjava
       :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       




-- 
Amila      Suriarachchi,
WSO2 Inc. 
      

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

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

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