axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaume Catarineu <ja...@nobainfo.net>
Subject NullPointerException using WSDL2Java (Axis 1.4)
Date Sat, 07 Oct 2006 10:44:56 GMT
Hi all,

I've found some problems when trying to generate java classes from a
WSDL file. I'm using Axis 1.4

------COMMAND-----------------------------------------
$ java -classpath ../axis/lib/axis.jar: ../axis/lib/saaj.jar:
../axis/lib/commons-logging-1.0.4.jar: ../axis/lib/wsdl4j-1.5.1.jar:
../axis/lib/commons-discovery-0.2.jar: ../axis/lib/jaxrpc.jar:
../axis/lib/wsdl4j-1.5.1.jar: ../xerces-2_8_1/xercesImpl.jar:
../xerces-2_8_1/xml-apis.jar: ../xerces-2_8_1/resolver.jar:
 org.apache.axis.wsdl.WSDL2Java wsPM_AU.wsdl

------RESULT-----------------------------------------
07/10/2006 12:30:52 org.apache.axis.utils.JavaUtils isAttachmentSupported
WARNING: Unable to find required classes (javax.activation.DataHandler
and javax.mail.internet.MimeMultipart). Attachment support is disabled.
java.lang.NullPointerException
  at
org.apache.axis.wsdl.toJava.JavaBeanHelperWriter.getAsFieldName(JavaBeanHelperWriter.java:435)
  at
org.apache.axis.wsdl.toJava.JavaBeanHelperWriter.writeMetaData(JavaBeanHelperWriter.java:325)
  at
org.apache.axis.wsdl.toJava.JavaBeanHelperWriter.writeFileBody(JavaBeanHelperWriter.java:183)
  at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
  at
org.apache.axis.wsdl.toJava.JavaBeanWriter.writeFileBody(JavaBeanWriter.java:257)
  at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
  at
org.apache.axis.wsdl.toJava.JavaBeanWriter.generate(JavaBeanWriter.java:1405)
  at
org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(JavaTypeWriter.java:113)
  at
org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
  at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:547)
  at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:432)
  at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
  at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
  at java.lang.Thread.run(Thread.java:595)
------------------------------------------------

And in the current directory an empty file appears at the end of a
reshly new directory structure. The file is named
net/petro/ca/wsPM_AU_nsmap/Order.java

Here follows the WSDL file:
---WSDL.----------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="wsPM_AU"
 targetNamespace="http://petro.net/ca/wsAU.wsdl"
 xmlns:tns="http://petro.net/ca/wsAU.wsdl"
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:nsPM="http://tempuri.org/nsPM.xsd"
 xmlns:wsPM-AU="http://petro.net/ca/wsPM_AU.nsmap"
 xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
 xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
 xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
 xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
 xmlns="http://schemas.xmlsoap.org/wsdl/">

<types>

 <schema targetNamespace="http://tempuri.org/nsPM.xsd"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:nsPM="http://tempuri.org/nsPM.xsd"
  xmlns:wsPM-AU="http://petro.net/ca/wsPM_AU.nsmap"
  xmlns="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="unqualified"
  attributeFormDefault="unqualified">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
  <simpleType name="ORDER">
   <restriction base="wsPM-AU:order">
   </restriction>
  </simpleType>
  <simpleType name="TOPER">
   <restriction base="wsPM-AU:toper">
   </restriction>
  </simpleType>
  <simpleType name="PETIC">
   <restriction base="wsPM-AU:petic">
   </restriction>
  </simpleType>
  <simpleType name="ERROR">
   <restriction base="wsPM-AU:error">
   </restriction>
  </simpleType>
  <complexType name="IM-SESSION">
   <sequence>
     <element name="tip-oper" type="nsPM:TOPER" minOccurs="1"
maxOccurs="1"/>
     <element name="datetime" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
     <element name="id-operari" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
     <element name="id-estacio" type="xsd:int" minOccurs="1" maxOccurs="1"/>
     <element name="id-terminal" type="xsd:int" minOccurs="1"
maxOccurs="1"/>
     <element name="id-torn" type="xsd:int" minOccurs="1" maxOccurs="1"/>
     <element name="id-firmware" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
     <element name="id-PAI" type="xsd:long" minOccurs="1" maxOccurs="1"/>
   </sequence>
  </complexType>
  <complexType name="IM-CARD">
   <sequence>
     <element name="track1" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
     <element name="track2" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
     <element name="track3" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
     <element name="pin" type="xsd:int" minOccurs="1" maxOccurs="1"/>
   </sequence>
  </complexType>
  <complexType name="IM-CREDIPET">
   <sequence>
     <element name="maxcredit" type="xsd:float" minOccurs="1"
maxOccurs="1"/>
     <element name="moneda" type="xsd:int" minOccurs="1" maxOccurs="1"/>
     <element name="maxlitres" type="xsd:float" minOccurs="1"
maxOccurs="1"/>
     <element name="produc" type="xsd:int" minOccurs="1" maxOccurs="1"/>
     <element name="pumpprice" type="xsd:float" minOccurs="1"
maxOccurs="1"/>
   </sequence>
  </complexType>
  <complexType name="IM-REPOST">
   <sequence>
     <element name="cpet" type="nsPM:IM-CREDIPET" minOccurs="1"
maxOccurs="1"/>
     <element name="ticket" type="xsd:int" minOccurs="1" maxOccurs="1"/>
     <element name="punts" type="xsd:float" minOccurs="1" maxOccurs="1"/>
     <element name="sortidor" type="xsd:int" minOccurs="1" maxOccurs="1"/>
     <element name="km" type="xsd:float" minOccurs="1" maxOccurs="1"/>
     <element name="conductor" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
     <element name="altres" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
   </sequence>
  </complexType>
  <complexType name="IM-ORDER">
   <sequence>
     <element name="passwd" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
     <element name="order" type="nsPM:ORDER" minOccurs="1" maxOccurs="1"/>
     <element name="param-1" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
     <element name="param-2" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
   </sequence>
  </complexType>
  <complexType name="RM-TRESULT">
   <sequence>
     <element name="errnum" type="nsPM:ERROR" minOccurs="1" maxOccurs="1"/>
     <element name="errtxt" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
   </sequence>
  </complexType>
  <complexType name="RM-INFO">
   <sequence>
     <element name="pan" type="xsd:string" minOccurs="0" maxOccurs="1"
nillable="true"/>
     <element name="caduc" type="xsd:string" minOccurs="0" maxOccurs="1"
nillable="true"/>
     <element name="peticions" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
     <element name="prods-auth" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
     <element name="matricula" type="xsd:string" minOccurs="0"
maxOccurs="1" nillable="true"/>
     <element name="nom" type="xsd:string" minOccurs="0" maxOccurs="1"
nillable="true"/>
   </sequence>
  </complexType>
  <complexType name="RM-CARDATA">
   <sequence>
     <element name="info" type="nsPM:RM-INFO" minOccurs="1" maxOccurs="1"/>
     <element name="result" type="nsPM:RM-TRESULT" minOccurs="1"
maxOccurs="1"/>
   </sequence>
  </complexType>
  <complexType name="IM-VPAN">
   <sequence>
     <element name="pan" type="xsd:string" minOccurs="0" maxOccurs="1"
nillable="true"/>
   </sequence>
  </complexType>
 </schema>

 <schema targetNamespace="http://petro.net/ca/wsPM_AU.nsmap"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:nsPM="http://tempuri.org/nsPM.xsd"
  xmlns:wsPM-AU="http://petro.net/ca/wsPM_AU.nsmap"
  xmlns="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="unqualified"
  attributeFormDefault="unqualified">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
  <simpleType name="order">
   <restriction base="xsd:string">
    <enumeration value="PM-ORDER-RELOAD"/>
    <enumeration value="PM-ORDER-EXIT"/>
    <enumeration value="PM-ORDER-STATUS"/>
   </restriction>
  </simpleType>
  <simpleType name="toper">
   <restriction base="xsd:string">
    <enumeration value="PM-OPER-CONSULTA"/>
    <enumeration value="PM-OPER-PREAUTH"/>
    <enumeration value="PM-OPER-CONFIRMA"/>
    <enumeration value="PM-OPER-AUTH"/>
    <enumeration value="PM-OPER-DEVOLUCIO"/>
   </restriction>
  </simpleType>
  <simpleType name="petic">
   <restriction base="xsd:string">
    <enumeration value="PM-PETI-PIN"/>
    <enumeration value="PM-PETI-KM"/>
   </restriction>
  </simpleType>
  <simpleType name="error">
   <restriction base="xsd:string">
    <enumeration value="PM-ERR-OK"/>
    <enumeration value="PM-ERR-INTERN"/>
    <enumeration value="PM-ERR-LIMLIT"/>
   </restriction>
  </simpleType>
 </schema>

</types>

<message name="voiceCredit">
 <part name="pan" type="nsPM:IM-VPAN"/>
</message>

<message name="RM-VSALDO">
 <part name="result" type="nsPM:RM-TRESULT"/>
 <part name="id-ticket" type="xsd:long"/>
 <part name="datetime" type="xsd:string"/>
 <part name="saldo" type="xsd:float"/>
 <part name="pan" type="xsd:string"/>
</message>

<message name="Consulta">
 <part name="session" type="nsPM:IM-SESSION"/>
 <part name="card" type="nsPM:IM-CARD"/>
 <part name="cpet" type="nsPM:IM-CREDIPET"/>
</message>

<message name="RM-SALDO">
 <part name="id-ticket" type="xsd:long"/>
 <part name="datetime" type="xsd:string"/>
 <part name="id-auth" type="xsd:long"/>
 <part name="result" type="nsPM:RM-TRESULT"/>
 <part name="credit" type="nsPM:IM-CREDIPET"/>
 <part name="info" type="nsPM:RM-INFO"/>
</message>

<message name="Autoritza">
 <part name="session" type="nsPM:IM-SESSION"/>
 <part name="card" type="nsPM:IM-CARD"/>
 <part name="repost" type="nsPM:IM-REPOST"/>
</message>

<message name="Cancela">
 <part name="ses" type="nsPM:IM-SESSION"/>
 <part name="card" type="nsPM:IM-CARD"/>
 <part name="repost" type="nsPM:IM-REPOST"/>
</message>

<message name="infoService">
 <part name="service" type="nsPM:IM-REPOST"/>
</message>

<message name="RM-RESULT">
 <part name="result" type="nsPM:RM-TRESULT"/>
</message>

<message name="sysControl">
 <part name="order" type="nsPM:IM-ORDER"/>
</message>

<portType name="wsPM_AUPortType">
 <operation name="voiceCredit">
  <documentation>Service definition of function
wsPM_AU__voiceCredit</documentation>
  <input message="tns:voiceCredit"/>
  <output message="tns:RM-VSALDO"/>
 </operation>
 <operation name="Consulta">
  <documentation>Service definition of function
wsPM_AU__Consulta</documentation>
  <input message="tns:Consulta"/>
  <output message="tns:RM-SALDO"/>
 </operation>
 <operation name="Autoritza">
  <documentation>Service definition of function
wsPM_AU__Autoritza</documentation>
  <input message="tns:Autoritza"/>
  <output message="tns:RM-SALDO"/>
 </operation>
 <operation name="Cancela">
  <documentation>Service definition of function
wsPM_AU__Cancela</documentation>
  <input message="tns:Cancela"/>
  <output message="tns:RM-SALDO"/>
 </operation>
 <operation name="infoService">
  <documentation>Service definition of function
wsPM_AU__infoService</documentation>
  <input message="tns:infoService"/>
  <output message="tns:RM-RESULT"/>
 </operation>
 <operation name="sysControl">
  <documentation>Service definition of function
wsPM_AU__sysControl</documentation>
  <input message="tns:sysControl"/>
  <output message="tns:RM-RESULT"/>
 </operation>
</portType>

<binding name="wsPM_AU" type="tns:wsPM_AUPortType">
 <SOAP:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
 <operation name="voiceCredit">
  <SOAP:operation style="rpc" soapAction=""/>
  <input>
     <SOAP:body use="encoded"
namespace="http://petro.net/ca/wsPM_AU.nsmap"
encodingStyle="http://schemas.xmlsoap.org/soap/enco
ding/"/>
  </input>
  <output>
     <SOAP:body use="encoded"
namespace="http://petro.net/ca/wsPM_AU.nsmap"
encodingStyle="http://schemas.xmlsoap.org/soap/enco
ding/"/>
  </output>
 </operation>
 <operation name="Consulta">
  <SOAP:operation style="rpc" soapAction=""/>
  <input>
     <SOAP:body use="encoded"
namespace="http://petro.net/ca/wsPM_AU.nsmap"
encodingStyle="http://schemas.xmlsoap.org/soap/enco
ding/"/>
  </input>
  <output>
     <SOAP:body use="encoded"
namespace="http://petro.net/ca/wsPM_AU.nsmap"
encodingStyle="http://schemas.xmlsoap.org/soap/enco
ding/"/>
  </output>
 </operation>
 <operation name="Autoritza">
  <SOAP:operation style="rpc" soapAction=""/>
  <input>
     <SOAP:body use="encoded"
namespace="http://petro.net/ca/wsPM_AU.nsmap"
encodingStyle="http://schemas.xmlsoap.org/soap/enco
ding/"/>
  </input>
  <output>
     <SOAP:body use="encoded"
namespace="http://petro.net/ca/wsPM_AU.nsmap"
encodingStyle="http://schemas.xmlsoap.org/soap/enco
ding/"/>
  </output>
 </operation>
 <operation name="Cancela">
  <SOAP:operation style="rpc" soapAction=""/>
  <input>
     <SOAP:body use="encoded"
namespace="http://petro.net/ca/wsPM_AU.nsmap"
encodingStyle="http://schemas.xmlsoap.org/soap/enco
ding/"/>
  </input>
  <output>
     <SOAP:body use="encoded"
namespace="http://petro.net/ca/wsPM_AU.nsmap"
encodingStyle="http://schemas.xmlsoap.org/soap/enco
ding/"/>
  </output>
 </operation>
 <operation name="infoService">
  <SOAP:operation style="rpc" soapAction=""/>
  <input>
     <SOAP:body use="encoded"
namespace="http://petro.net/ca/wsPM_AU.nsmap"
encodingStyle="http://schemas.xmlsoap.org/soap/enco
ding/"/>
  </input>
  <output>
     <SOAP:body use="encoded"
namespace="http://petro.net/ca/wsPM_AU.nsmap"
encodingStyle="http://schemas.xmlsoap.org/soap/enco
ding/"/>
  </output>
 </operation>
 <operation name="sysControl">
  <SOAP:operation style="rpc" soapAction=""/>
  <input>
     <SOAP:body use="encoded"
namespace="http://petro.net/ca/wsPM_AU.nsmap"
encodingStyle="http://schemas.xmlsoap.org/soap/enco
ding/"/>
  </input>
  <output>
     <SOAP:body use="encoded"
namespace="http://petro.net/ca/wsPM_AU.nsmap"
encodingStyle="http://schemas.xmlsoap.org/soap/enco
ding/"/>
  </output>
 </operation>
</binding>

<service name="wsPM_AU">
 <documentation>API d'autorització de Petro</documentation>
 <port name="wsPM_AU" binding="tns:wsPM_AU">
  <SOAP:address location="http://xxxxxxxxx"/>
 </port>
</service>

</definitions>

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

Why does it happends?
Many thanks,

-- 
  Jaume Catarineu
  Noba Informatica, SL

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


Mime
View raw message