[prev in list] [next in list] [prev in thread] [next in thread] 

List:       axis-user
Subject:    RE: ADBException: Unexpected subelement Code
From:       "Erwin Reinhoud" <Erwin.Reinhoud () ictu ! nl>
Date:       2007-09-20 14:46:26
Message-ID: F83D04037559194E9EC68B63D7422B8208D304F4 () IGW01 ! dh24 ! ictu ! nl
[Download RAW message or body]

Hello Amila,
 
Thanks for that info. It still mystifies me that i cant get it to work though. I took \
your generated code ran the included ant build file and added the aar to my clean \
axis2 1.3 web app service location. I got a the same error as before i.e. \
soapenv:Server faultstring:unknown.  
For the moment we're going to use the axis 1.4 version, but i hope to solve this \
problem with axis2. However considering the last test i can see only the environment \
i used as the source of this problem (which is windows XP and tomcat 5.5-0.23.  
Once again thanks for the help.
 
Kind regards,
Erwin

-----Oorspronkelijk bericht-----
Van: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Verzonden: donderdag 20 september 2007 11:24
Aan: axis-user@ws.apache.org
Onderwerp: Re: ADBException: Unexpected subelement Code


for -p option you have to give a package name.

I used the wsdl2java.sh tool with current trunk code base. it should be ok with Axis2 \
1.3 wsdl2java.sh -uri <wsdl path> -ss -sd -g -u -o <out put path>

Amila


On 9/20/07, Erwin Reinhoud < Erwin.Reinhoud@ictu.nl> wrote: 

Dear Amila,
 
Once again thanks for your time and good to hear axis2 has no problem with this wsdl. \
Keeps me wondering what is wrong, probably the build script which i used succesfully \
for other services. I'll post it again. How does your build script look like? What \
version of axis2 (i used 1.3)? Any ideas on what i might be doing wrong? I will \
compare your generated code with mine.  
<target depends="prepare.repo" name="generate.service">
                 <java classname="org.apache.axis2.wsdl.WSDL2Java">
                        <arg value="-uri" />
                        <arg value="wsdl\test.wsdl" />
                        <arg value="-ss" />
                        <arg value="-sd" />
                        <arg value="-uw" />
                          <arg value="-g"/>
                        <arg value="-p" />
                        <arg value="-o" />
                        <arg value="${service.dir}" />
                        <classpath refid="axis2.class.path" />
                </java>
    </target>
 
 
Once again thanks very much.
 
Kind regards,
Erwin
 
 
 
 

-----Oorspronkelijk bericht-----
Van: Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com]
Verzonden: donderdag 20 september 2007 10:10 

Aan: axis-user@ws.apache.org
Onderwerp: Re: ADBException: Unexpected subelement Code


please see the attached file where I could invoke the service correctly.
I have attached request and response messages.

Amila.


On 9/19/07, Erwin Reinhoud < Erwin.Reinhoud@ictu.nl> wrote: 

Dear Amila,
 
Could you let me know if my infromation was of any use? I succesfully used the wsdl \
to generate a service using axis 1.4, but am hoping to be able to do the same with \
axis2.  
Kind regards,
Erwin

-----Oorspronkelijk bericht-----
Van: Erwin Reinhoud 
Verzonden: dinsdag 18 september 2007 14:58
Aan: axis-user@ws.apache.org
Onderwerp: RE: ADBException: Unexpected subelement Code



Dear Amila,
 
Thanks for the time. I added the complete wsdl and log, response and request as \
attachment. Mind you, the fault of this service differs from before, but i still have \
trouble creating a working service of this ws-i compliant wsdl. Hope you can help. \
Thanks in advance.  
Kind regards,
Erwin  
 
 

-----Oorspronkelijk bericht-----
Van: Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com]
Verzonden: maandag 17 september 2007 13:02
Aan: axis-user@ws.apache.org
Onderwerp: Re: ADBException: Unexpected subelement Code




On 9/17/07, Erwin Reinhoud < Erwin.Reinhoud@ictu.nl> wrote: 

Dear users,
 
I am using axis2 1.3 and an ant script to generate a service. However i keep getting \
the "Unexpected subelement" exception as soon as i add for example the "Metadata" \
element being a complex type (see additions below). I renamed some stuff for this \
post so please disregard any possible errors (the wsdl+schema is validated). I also \
added the"-uw" argument to the wsdl2java but does not seem to help. The question is \
what is wrong with the ant target or wsdl, assuming that the soapui generated request \
is correct?


Can you try to access the axis2 service with the Axis2 client and see? 

Can you send a valid complete wsdl file which shows the problem? 

Amila.



Thanks in advance.
Kind regards,
Erwin
 
Server response:
 
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/  \
<http://schemas.xmlsoap.org/soap/envelope/> ">  <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>org.apache.axis2.databinding.ADBException: Unexpected \
subelement Code2</faultstring>  <detail/>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>
 
 
 
SOAPUI request based on wsdl:
 
<soapenv:Envelope xmlns:soapenv="  <http://schemas.xmlsoap.org/soap/envelope/> \
http://schemas.xmlsoap.org/soap/envelope/"  xmlns:v0="  \
<http://localhost/schemas/v0.2> http://localhost/schemas/v0.2">  <soapenv:Header/>
   <soapenv:Body>
      <v0:Send>
         <v0:Metadata>
            <v0:Code2 >?</v0:Code2  >
         </v0:Metadata>
         <!--Optional:-->
         <v0:Data>?</v0:Data>
      </v0:Send>
   </soapenv:Body>
</soape 
 
 
ANT WSDL2JAVA target:
 
 <target name="generate.service" depends="prepare.repo">
                 <java classname="org.apache.axis2.wsdl.WSDL2Java">
                        <arg value="-uri" />
                        <arg value="wsdl\DataService_v0.2.wsdl" />
                        <arg value="-ss" />
                        <arg value="-uw" />
                        <arg value="-sd" />
                          <arg value="-g"/>
                        <arg value="-p" />
                        <arg value="-o" />
                        <arg value="${gen.service.dir}" />
                        <classpath refid="axis2.class.path" />
                </java>
                
              
          </target>
 
 
 
 
The schema:
 
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd=" http://www.w3.org/2001/XMLSchema  \
<http://www.w3.org/2001/XMLSchema> "  xmlns:xmime=" \
http://www.w3.org/2005/05/xmlmime"  xmlns:tns="  <http://localhost/schemas/v0.2> \
http://localhost/schemas/v0.2"  targetNamespace=" http://localhost/schemas/v0.2 " \
elementFormDefault="qualified"> <xsd:import namespace=" \
http://www.w3.org/2005/05/xmlmime  <http://www.w3.org/2005/05/xmlmime> " \
schemaLocation="xmlmime.xml"/>   
<xsd:element name="Send">
  <xsd:complexType>
   <xsd:sequence>
    <xsd:element name="Metadata" type="tns:Metadata"/>
    <xsd:element name="Data" type="xsd:string" minOccurs="0"/>
   </xsd:sequence>
  </xsd:complexType>
 </xsd:element>
 <xsd:element name="SendResponse">
  <xsd:complexType>
   <xsd:sequence>
    <xsd:element name="berichtUit" type="tns:Status" nillable="true" minOccurs="0"/>
   </xsd:sequence>
  </xsd:complexType>
 </xsd:element>
 <xsd:complexType name="Status">
  <xsd:sequence>
   <xsd:element name="Code" type="xsd:string"/>
   <xsd:element name="Melding" type="xsd:string" minOccurs="0"/>
  </xsd:sequence>
 </xsd:complexType>
  <xsd:complexType name="Metadata">
  <xsd:sequence>
   <xsd:element name="Code2" type="xsd:string"/>
 </xsd:sequence>
 </xsd:complexType>
 
 
 
 
</xsd:schema>





-- 
Amila Suriarachchi, 
WSO2 Inc. 




-- 
Amila Suriarachchi,
WSO2 Inc. 




-- 
Amila Suriarachchi,
WSO2 Inc. 


[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2800.1595" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=485242814-20092007><FONT face=Arial color=#0000ff size=2>Hello 
Amila,</FONT></SPAN></DIV>
<DIV><SPAN class=485242814-20092007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=485242814-20092007><FONT face=Arial color=#0000ff size=2>Thanks 
for that info. It still mystifies me that i cant get it to work though. I took 
your generated code ran the included ant build file and added the aar to my 
clean axis2 1.3 web app service location. I got a&nbsp;the same error as before 
i.e. soapenv:Server faultstring:unknown.</FONT></SPAN></DIV>
<DIV><SPAN class=485242814-20092007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=485242814-20092007><FONT face=Arial color=#0000ff size=2>For 
the moment we're going to use the axis 1.4 version, but i hope&nbsp;to 
solve&nbsp;this problem with axis2. However considering the last test i can see 
only the&nbsp;environment i used as the source of this problem (which is windows 
XP and tomcat 5.5-0.23.</FONT></SPAN></DIV>
<DIV><SPAN class=485242814-20092007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=485242814-20092007><FONT face=Arial color=#0000ff size=2>Once 
again thanks for the help.</FONT></SPAN></DIV>
<DIV><SPAN class=485242814-20092007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=485242814-20092007><FONT face=Arial color=#0000ff size=2>Kind 
regards,</FONT></SPAN></DIV>
<DIV><SPAN class=485242814-20092007><FONT face=Arial color=#0000ff 
size=2>Erwin</FONT></SPAN></DIV>
<BLOCKQUOTE>
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Oorspronkelijk bericht-----<BR><B>Van:</B> Amila Suriarachchi 
  [mailto:amilasuriarachchi@gmail.com]<BR><B>Verzonden:</B> donderdag 20 
  september 2007 11:24<BR><B>Aan:</B> 
  axis-user@ws.apache.org<BR><B>Onderwerp:</B> Re: ADBException: Unexpected 
  subelement Code<BR><BR></FONT></DIV>for -p option you have to give a package 
  name.<BR><BR>I used the wsdl2java.sh tool with current trunk code base. it 
  should be ok with Axis2 1.3<BR>wsdl2java.sh -uri &lt;wsdl path&gt; -ss -sd -g 
  -u -o &lt;out put path&gt;<BR><BR>Amila<BR><BR>
  <DIV><SPAN class=gmail_quote>On 9/20/07, <B class=gmail_sendername>Erwin 
  Reinhoud</B> &lt;<A 
  href="mailto:Erwin.Reinhoud@ictu.nl">Erwin.Reinhoud@ictu.nl</A>&gt; 
  wrote:</SPAN>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) \
1px solid">  <DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2>Dear 
    Amila,</FONT></SPAN></DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2>Once again thanks for your 
    time and good to hear axis2 has no problem with this wsdl. Keeps me 
    wondering what is wrong, probably the build script which i used succesfully 
    for other services. I'll post it again. How does your build script look 
    like? What version of axis2 (i used 1.3)? Any ideas on&nbsp;what i might be 
    doing wrong? I will compare your generated code with 
    mine.</FONT></SPAN></DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2>&lt;target 
    depends="prepare.repo" name="generate.service"&gt;<SPAN 
    class=q><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;java 
    classname="org.apache.axis2.wsdl.WSDL2Java"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& \
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="-uri" 
    /&gt;<BR></SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="wsdl\test.wsdl" 
    /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="-ss" 
    /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="-sd" /&gt;</FONT></SPAN></DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff 
    size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="-uw" /&gt;<SPAN 
    class=q><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg 
    value="-g"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="-p" 
    /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="-o" 
    /&gt;<BR></SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="${service.dir}" /&gt;<SPAN 
    class=q><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;classpath refid="axis2.class.path" 
    /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;/java&gt;<BR>&nbsp;&nbsp;&nbsp; 
    &lt;/target&gt;</SPAN></FONT></SPAN></DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2>Once again thanks very 
    much.</FONT></SPAN></DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2>Kind 
    regards,</FONT></SPAN></DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2>Erwin</FONT></SPAN></DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
    <BLOCKQUOTE>
      <DIV dir=ltr align=left><FONT face=Tahoma size=2><SPAN 
      class=q>-----Oorspronkelijk bericht-----<BR><B>Van:</B> Amila Suriarachchi 
      [mailto:<A onclick="return top.js.OpenExtLink(window,event,this)" 
      href="mailto:amilasuriarachchi@gmail.com" 
      target=_blank>amilasuriarachchi@gmail.com</A>]<BR></SPAN><B>Verzonden:</B> 
      donderdag 20 september 2007 10:10</FONT>
      <DIV><SPAN class=e id=q_1152232d152dc122_9><FONT face=Tahoma 
      size=2><BR><B>Aan:</B> <A 
      onclick="return top.js.OpenExtLink(window,event,this)" 
      href="mailto:axis-user@ws.apache.org" 
      target=_blank>axis-user@ws.apache.org</A><BR><B>Onderwerp:</B> Re: 
      ADBException: Unexpected subelement Code<BR><BR></FONT></SPAN></DIV></DIV>
      <DIV><SPAN class=e id=q_1152232d152dc122_11>please see the attached file 
      where I could invoke the service correctly.<BR>I have attached request and 
      response messages.<BR><BR>Amila.<BR><BR>
      <DIV><SPAN class=gmail_quote>On 9/19/07, <B class=gmail_sendername>Erwin 
      Reinhoud </B>&lt;<A onclick="return top.js.OpenExtLink(window,event,this)" 
      href="mailto:Erwin.Reinhoud@ictu.nl" 
      target=_blank>Erwin.Reinhoud@ictu.nl</A>&gt; wrote:</SPAN> 
      <BLOCKQUOTE class=gmail_quote 
      style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: \
rgb(204,204,204) 1px solid">  <DIV>
        <DIV>
        <DIV><SPAN><FONT face=Arial color=#0000ff size=2>Dear 
        Amila,</FONT></SPAN></DIV>
        <DIV><SPAN><FONT face=Arial color=#0000ff 
        size=2></FONT></SPAN>&nbsp;</DIV>
        <DIV><SPAN><SPAN><FONT face=Arial color=#0000ff size=2>Could you let me 
        know if my infromation was of any use? I succesfully used the wsdl to 
        generate a service using axis 1.4, but am hoping to be able to do the 
        same with axis2.</FONT></SPAN></SPAN></DIV>
        <DIV><SPAN><SPAN><FONT face=Arial color=#0000ff 
        size=2></FONT></SPAN></SPAN>&nbsp;</DIV>
        <DIV><SPAN><SPAN><FONT face=Arial color=#0000ff size=2>Kind 
        regards,</FONT></SPAN></SPAN></DIV>
        <DIV><SPAN><SPAN><FONT face=Arial color=#0000ff 
        size=2>Erwin</FONT></SPAN></SPAN></DIV></DIV>
        <BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
          <DIV dir=ltr align=left><FONT face=Tahoma size=2>-----Oorspronkelijk 
          bericht-----<BR><B>Van:</B> Erwin Reinhoud <BR><B>Verzonden:</B> 
          dinsdag 18 september 2007 14:58<SPAN><BR><B>Aan:</B> <A 
          onclick="return top.js.OpenExtLink(window,event,this)" 
          href="mailto:axis-user@ws.apache.org" 
          target=_blank>axis-user@ws.apache.org</A><BR></SPAN><B>Onderwerp:</B> 
          RE: ADBException: Unexpected subelement Code<BR><BR></FONT></DIV>
          <DIV><SPAN>
          <DIV><SPAN><FONT face=Arial color=#0000ff size=2>Dear 
          Amila,</FONT></SPAN></DIV>
          <DIV><SPAN><FONT face=Arial color=#0000ff 
          size=2></FONT></SPAN>&nbsp;</DIV>
          <DIV><SPAN><FONT face=Arial color=#0000ff size=2>Thanks for the time. 
          I added the complete wsdl and log, response and request as attachment. 
          Mind you, the fault of this service differs from before, but i still 
          have trouble creating a working service of this ws-i compliant wsdl. 
          Hope you can help. Thanks in advance.</FONT></SPAN></DIV>
          <DIV><SPAN><FONT face=Arial color=#0000ff 
          size=2></FONT></SPAN>&nbsp;</DIV>
          <DIV><SPAN><FONT face=Arial color=#0000ff size=2>Kind 
          regards,</FONT></SPAN></DIV>
          <DIV><SPAN><FONT face=Arial color=#0000ff 
          size=2>Erwin&nbsp;</FONT>&nbsp;</SPAN></DIV>
          <DIV><SPAN><FONT face=Arial color=#0000ff 
          size=2></FONT></SPAN>&nbsp;</DIV>
          <DIV><SPAN></SPAN>&nbsp;</DIV>
          <BLOCKQUOTE>
            <DIV dir=ltr align=left><FONT face=Tahoma size=2>-----Oorspronkelijk 
            bericht-----<BR><B>Van:</B> Amila Suriarachchi [mailto:<A 
            onclick="return top.js.OpenExtLink(window,event,this)" 
            href="mailto:amilasuriarachchi@gmail.com" 
            target=_blank>amilasuriarachchi@gmail.com</A>]<BR><B>Verzonden: 
            </B>maandag 17 september 2007 13:02<BR><B>Aan:</B> <A 
            onclick="return top.js.OpenExtLink(window,event,this)" 
            href="mailto:axis-user@ws.apache.org" 
            target=_blank>axis-user@ws.apache.org</A><BR><B>Onderwerp:</B> Re: 
            ADBException: Unexpected subelement 
Code<BR><BR></FONT></DIV><BR><BR>
            <DIV><SPAN class=gmail_quote>On 9/17/07, <B 
            class=gmail_sendername>Erwin Reinhoud</B> &lt;<A 
            onclick="return top.js.OpenExtLink(window,event,this)" 
            href="mailto:Erwin.Reinhoud@ictu.nl" 
            target=_blank>Erwin.Reinhoud@ictu.nl</A>&gt; wrote:</SPAN> 
            <BLOCKQUOTE class=gmail_quote 
            style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: \
rgb(204,204,204) 1px solid">  <DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff size=2>Dear 
              users,</FONT></SPAN></DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff size=2>I am using axis2 
              1.3 and an ant script to generate a service. However i keep 
              getting the "Unexpected subelement" exception as soon as i add for 
              example the "Metadata" element being a complex type (see additions 
              below). I renamed some stuff for this post so please disregard any 
              possible errors (the wsdl+schema is validated). I also added 
              the"-uw" argument to the wsdl2java but does not seem to help. The 
              question is what is wrong with the ant target or wsdl, assuming 
              that the soapui generated request is 
              correct?</FONT></SPAN></DIV></DIV></BLOCKQUOTE>
            <DIV><BR>Can you try to access the axis2 service with the Axis2 
            client and see? <BR><BR>Can you send a valid complete wsdl file 
            which shows the problem? <BR><BR>Amila.<BR></DIV><BR>
            <BLOCKQUOTE class=gmail_quote 
            style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: \
rgb(204,204,204) 1px solid">  <DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff size=2>Thanks in 
              advance.</FONT></SPAN></DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff size=2>Kind 
              regards,</FONT></SPAN></DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2>Erwin</FONT></SPAN></DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff size=2>Server 
              response:</FONT></SPAN></DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2>&lt;soapenv:Envelope xmlns:soapenv="<A 
              onclick="return top.js.OpenExtLink(window,event,this)" 
              href="http://schemas.xmlsoap.org/soap/envelope/" 
              target=_blank>http://schemas.xmlsoap.org/soap/envelope/ 
              </A>"&gt;<BR>&nbsp;&nbsp; 
              &lt;soapenv:Body&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
              &lt;soapenv:Fault&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
                
              &lt;faultcode&gt;soapenv:Server&lt;/faultcode&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
                
              &lt;faultstring&gt;org.apache.axis2.databinding.ADBException: 
              Unexpected subelement 
              Code2&lt;/faultstring&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;detail/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
              &lt;/soapenv:Fault&gt;<BR>&nbsp;&nbsp; 
              &lt;/soapenv:Body&gt;<BR>&lt;/soapenv:Envelope&gt;</FONT></SPAN></DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff size=2>SOAPUI request 
              based on wsdl:</FONT></SPAN></DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV><FONT face=Arial color=#0000ff 
              size=2>&lt;soapenv:Envelope xmlns:soapenv="</FONT><A 
              onclick="return top.js.OpenExtLink(window,event,this)" 
              href="http://schemas.xmlsoap.org/soap/envelope/" target=_blank> 
              <FONT face=Arial 
              size=2>http://schemas.xmlsoap.org/soap/envelope/</FONT></A><FONT 
              face=Arial color=#0000ff size=2>" <BR>xmlns:v0="</FONT><A 
              onclick="return top.js.OpenExtLink(window,event,this)" 
              href="http://localhost/schemas/v0.2" target=_blank> <FONT 
              face=Arial size=2>http://localhost/schemas/v0.2</FONT></A><FONT 
              face=Arial color=#0000ff size=2>"&gt;<BR>&nbsp;&nbsp; 
              &lt;soapenv:Header/&gt;<BR>&nbsp;&nbsp; 
              &lt;soapenv:Body&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
              &lt;v0:Send&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
              &lt;v0:Metadata&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
                
              &lt;v0:Code<SPAN>2&nbsp;</SPAN>&gt;?&lt;/v0:Code<SPAN>2&nbsp;</SPAN><SPAN>&nbsp;</SPAN>&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
                
              &lt;/v0:Metadata&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
                
              &lt;!--Optional:--&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
                
              &lt;v0:Data&gt;?&lt;/v0:Data&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
              &lt;/v0:Send&gt;<BR>&nbsp;&nbsp; 
              &lt;/soapenv:Body&gt;<BR>&lt;/soape</FONT> 
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff size=2>ANT WSDL2JAVA 
              target:</FONT></SPAN></DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff size=2>&nbsp;&lt;target 
              name="generate.service" 
              depends="prepare.repo"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;java 
              classname="org.apache.axis2.wsdl.WSDL2Java"&gt;<BR>&nbsp;&nbsp;&nbsp;&nb \
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="-uri" 
              /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="wsdl\DataService_v0.2.wsdl" 
              /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="-ss" 
              /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="-uw" 
              /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="-sd" 
              /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb \
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg 
              value="-g"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp \
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="-p" 
              /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="-o" 
              /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;arg value="${gen.service.dir}" 
              /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  &lt;classpath refid="axis2.class.path" 
              /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
                
              &lt;/java&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
                
              <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
              &lt;/target&gt;</FONT></SPAN></DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff size=2>The 
              schema:</FONT></SPAN></DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff 
              size=2></FONT></SPAN>&nbsp;</DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff size=2>&lt;?xml 
              version="1.0" encoding="UTF-8"?&gt;<BR>&lt;xsd:schema 
              xmlns:xsd="<A 
              onclick="return top.js.OpenExtLink(window,event,this)" 
              href="http://www.w3.org/2001/XMLSchema" 
              target=_blank>http://www.w3.org/2001/XMLSchema </A>" 
              <BR>xmlns:xmime="<A 
              onclick="return top.js.OpenExtLink(window,event,this)" 
              href="http://www.w3.org/2005/05/xmlmime" 
              target=_blank>http://www.w3.org/2005/05/xmlmime</A>" 
              <BR>xmlns:tns="<A 
              onclick="return top.js.OpenExtLink(window,event,this)" 
              href="http://localhost/schemas/v0.2" target=_blank> 
              http://localhost/schemas/v0.2</A>" <BR>targetNamespace="<A 
              onclick="return top.js.OpenExtLink(window,event,this)" 
              href="http://localhost/schemas/v0.2" 
              target=_blank>http://localhost/schemas/v0.2</A> " 
              elementFormDefault="qualified"&gt;<BR>&lt;xsd:import namespace="<A 
              onclick="return top.js.OpenExtLink(window,event,this)" 
              href="http://www.w3.org/2005/05/xmlmime" 
              target=_blank>http://www.w3.org/2005/05/xmlmime </A>" 
              schemaLocation="xmlmime.xml"/&gt;&nbsp;<BR>&nbsp;</FONT></SPAN></DIV>
              <DIV><SPAN><FONT face=Arial color=#0000ff size=2>&lt;xsd:element 
              name="Send"&gt;<BR>&nbsp;&nbsp;&lt;xsd:complexType&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;xsd:sequence&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsd:element \
  name="Metadata" 
              type="tns:Metadata"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsd:element 
              name="Data" type="xsd:string" 
              minOccurs="0"/&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;/xsd:sequence&gt;<BR>&nbsp;& \
                nbsp;&lt;/xsd:complexType&gt;<BR>&nbsp;&lt;/xsd:element&gt;<BR>&nbsp;&lt;xsd:element \
                
              name="SendResponse"&gt;<BR>&nbsp;&nbsp;&lt;xsd:complexType&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;xsd:sequence&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;xsd:element \
  name="berichtUit" type="tns:Status" nillable="true" 
              minOccurs="0"/&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;/xsd:sequence&gt;<BR>&nbsp;& \
nbsp;&lt;/xsd:complexType&gt;<BR>&nbsp;&lt;/xsd:element&gt;<BR>&nbsp;&lt;xsd:complexType \
                
              name="Status"&gt;<BR>&nbsp;&nbsp;&lt;xsd:sequence&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;xsd:element \
  name="Code" 
              type="xsd:string"/&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;xsd:element 
              name="Melding" type="xsd:string" 
              minOccurs="0"/&gt;<BR>&nbsp;&nbsp;&lt;/xsd:sequence&gt;<BR>&nbsp;&lt;/xsd:complexType&gt;<BR>&nbsp;&nbsp;&lt;xsd:complexType \
                
              name="Metadata"&gt;<BR>&nbsp;&nbsp;&lt;xsd:sequence&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;xsd:element \
  name="Code2" 
              type="xsd:string"/&gt;<BR>&nbsp;&lt;/xsd:sequence&gt;<BR>&nbsp;&lt;/xsd: \
complexType&gt;<BR>&nbsp;<BR>&nbsp;<BR>&nbsp;<BR>&nbsp;<BR>&lt;/xsd:schema&gt;<BR></FONT></SPAN></DIV></DIV></BLOCKQUOTE></DIV><BR><BR \
  clear=all><BR>-- <BR>Amila Suriarachchi, <BR>WSO2 Inc. 
          </BLOCKQUOTE></SPAN></DIV></BLOCKQUOTE></DIV></BLOCKQUOTE></DIV><BR><BR 
      clear=all><BR>-- <BR>Amila Suriarachchi,<BR>WSO2 Inc. 
    </SPAN></DIV></BLOCKQUOTE></DIV></BLOCKQUOTE></DIV><BR><BR clear=all><BR>-- 
  <BR>Amila Suriarachchi,<BR>WSO2 Inc. </BLOCKQUOTE></BODY></HTML>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic