xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorge Fernández (JIRA) <xmlbeans-...@xml.apache.org>
Subject [jira] Commented: (XMLBEANS-329) Problems with ADB Client and XMLBeans Service
Date Sat, 05 May 2007 14:38:15 GMT

    [ https://issues.apache.org/jira/browse/XMLBEANS-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493881
] 

Jorge Fernández commented on XMLBEANS-329:
------------------------------------------

Jacob,

This is the exception:

java.lang.RuntimeException: java.lang.RuntimeException: Unexpected subelement units
	at api.APIAPISOAP12PortStub.fromOM(APIAPISOAP12PortStub.java:392)
	at api.APIAPISOAP12PortStub.getDetailedMonitoringStages(APIAPISOAP12PortStub.java:162)
	at api.Client.main(Client.java:34)
Caused by: java.lang.RuntimeException: Unexpected subelement units
	at api.xsd.Parameter$Factory.parse(Parameter.java:949)
	at api.xsd.AbstractParameter$Factory.parse(AbstractParameter.java:792)
	at api.xsd.Configuration$Factory.parse(Configuration.java:686)
	at api.xsd.Stage$Factory.parse(Stage.java:617)
	at api.op_messages.xsd.GetDetailedMonitoringStagesResponse$Factory.parse(GetDetailedMonitoringStagesResponse.java:464)
	at api.APIAPISOAP12PortStub.fromOM(APIAPISOAP12PortStub.java:386)
	... 2 more


This is the message I can see with TCPMon (I'm noticing where I get the error with -------------):

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: Sat, 05 May 2007 14:12:35 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:A377C5C444942782681178374354805</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

When I use ADB in the service I can see the xsi:type attribute that apparently resolves the
problem as Amila said (in spite of being not well formed) for ADB but, this is missing when
I use XMLBeans.

I'm using the XMLBeans librarys that come with Axis2 1.2 (version 2.2.0)

As you can see the error happens when parsing and that's the only validation I do; the one
which is carried out by the code generated by ADB

I don't know why the default package is api.opMessages.xsd and I have never used the scomp
command. I edited the WSDL and I put api.op_messages.xsd.

I think you can get all the necessary source from the axis JIRA but the generated code. The
client and Skeleton source for both ADB and XMLBeans is there. I get the problem  only when
I use xmlbeans at the service, generating the xml message and when ADB is parsing it at the
clientl

Do you 

Maybe you can have more information on this here: 
http://marc.info/?t=117710454500008&r=1&w=2

> Problems with ADB Client and XMLBeans Service
> ---------------------------------------------
>
>                 Key: XMLBEANS-329
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-329
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: Binding
>    Affects Versions: Version 2.2
>         Environment: Windows XP SP2, Axis 2 1.2, Java 1.6
>            Reporter: Jorge Fernández
>         Attachments: API.wsdl, ClientXmlBeans.java
>
>
> This JIRA is related with the message from the axis-user mailing list "Issue with ADB
and parsing a response message (namespaces)"
> I couldn't reproduce the problem I described in that email but when I fixed that problem
I found another one and this is which I'm reporting.
> First, some introduction.
> In my response message there is an array of  Stages which have one or more Configurations.
Each Configuration has AbstractParameters and PrimitiveParameters (that inherit from Parameter).
Also each Parameter may depend on other so the class Parameter has an array of Parameter called
dependencies.
> My problem happens only if I have ADB at client side and XMLBeans at service side. Any
other combination works perfectly. (I attach the wsdl and client and service for both databindings).
> When my ADB client parses the response message, it enters Stage.Factory.parse method,
then it enters, Configuration.Factory.parse method. Next, AbstractParameter.Factory.parse
method (because the first parameter is abstract) and later it want to parse the dependencies
of this parameter so it enters Parameter.Factory.parse method. Here, there is a PrimitiveParameter
with no dependencies on oher parameters so it enters Signal.Factory.parse method for getting
signal dependencies. It returns ok
> Finally, the problem comes out when after getting SignalDependencies from this PrimitiveParameter,
it gets the Type element which is in the Parameter class and now there is the gain element
that is part of PrimitiveParameter and not of his parent. so it throws an exception because
it didn't expect it.
> Hope this explanation could be useful but if not, the wsdl could be.
> I refer you to JIRA: https://issues.apache.org/jira/browse/AXIS2-2578 
> That JIRA is the same as this one. I reported it as an ADB bug but as you can see there,
finally the problem seems to be xmlbeans. You can also find there the files to reproduce the
JIRA.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


Mime
View raw message