You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mirae-user@ws.apache.org by Kawai Takanao <ca...@yahoo.co.jp> on 2005/10/25 04:51:07 UTC

Doesn't wsdl2ws_j2me support "simpleType"?

Hello. I am Takanao Kawai.

I am tring to use wsdl2ws_j2me to get client stub from my
WSDL file.
But I have a problem on my work.

I modified arrwapper.wsdl, which is include in MIRAE as a
sample, to the following.

% cat arrwapper.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:ArrayCalc"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="urn:ArrayCalc" xmlns:intf="urn:ArrayCalc"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns2="http://DefaultNamespace"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <wsdl:types>
  <schema targetNamespace="http://DefaultNamespace"
xmlns="http://www.w3.org/2001/XMLSchema">
   <import
namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="Point">
    <sequence/>
   </complexType>
  </schema>
  <schema targetNamespace="urn:ArrayCalc"
xmlns="http://www.w3.org/2001/XMLSchema">
   <import
namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="ArrayOf_tns2_Point">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType"
wsdl:arrayType="tns2:Point[]"/>
     </restriction>
    </complexContent>
   </complexType>
<!-- added by Kawai from here -->
   <simpleType name="urn:Coordinate">
     <restriction base="xsd:string">
       <xsd:enumeration value="x"/>
       <xsd:enumeration value="y"/>
     </restriction>
   </simpleType>
<!-- added by Kawai -->
  </schema>
 </wsdl:types>
.....(not modified from here)

When I try to generate stub code from the above file,
following exception is occurred.

1
############## the type found
={urn:ArrayCalc}ArrayOf_tns2_Point
############## the type found
={http://DefaultNamespace}Point
############## the type found
={urn:ArrayCalc}urn:Coordinate
Exception in thread "main" java.lang.NullPointerException
        at
org.apache.axis.wsdl.toJava.Utils.getEnumerationBaseAndValues(Utils.j
ava:327)
        at
org.apache.mirae.wsdl2ws.WSDL2Ws.createTypeInfo(WSDL2Ws.java:370)
        at
org.apache.mirae.wsdl2ws.WSDL2Ws.getTypeInfo(WSDL2Ws.java:252)
        at
org.apache.mirae.wsdl2ws.WSDL2Ws.genarateWrappers(WSDL2Ws.java:277)
        at
org.apache.mirae.wsdl2ws.WSDL2Ws.main(WSDL2Ws.java:540)

But when I modify the added part to the following, any
exceptions are not occured and acquire stub codes
successfully.

   <complexType name="urn:Coordinate">
    <simpleContent>
     <restriction base="xsd:string">
       <xsd:enumeration value="x"/>
       <xsd:enumeration value="y"/>
     </restriction>
    </simpleContent>
   </complexType>

I think that the differences between them are "simpleType"
and "complexType".
Doesn't wsdl2ws_j2me support "simpleType"?

Please advise me.

Thanks,
Takanao Kawai

--------------------------------------
Know more about Breast Cancer
http://pr.mail.yahoo.co.jp/pinkribbon/


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