Thread: Apache Axis2 webservice wsdl Error

Forum : Problem Solving   7 Days ago
User Image
Hemanth18

Newbie

Joined: 7 Sep, 2018

Points: 100

Threads: 4

Posts: 8

Apache Axis2 webservice wsdl Error

| Quote Date : 10 Jan, 2019    Views:51    

D:\Designpatternworkspace\apacheAxis2webservice>wsdl2java -S src -R src\META-INF -s -ss -sd -d jaxbri -g -ssi -uri wsdl\RechargeNow.wsdl
Using AXIS2_HOME:   C:\axis2-1.7.9
Using JAVA_HOME:   C:\Program Files\Java\jdk1.8.0_181
Retrieving document at 'wsdl\RechargeNow.wsdl'.
log4j:WARN No appenders could be found for logger (org.apache.axiom.locator.DefaultOMMetaFactoryLocator).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:177)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:50)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.AxisFault
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
        at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:408)
        at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:171)
        ... 2 more
Caused by: java.lang.NullPointerException
        at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.findBinding(WSDL11ToAxisServiceBuilder.java:1082)
        at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:332)

        ... 4 more


REFERENCE WSDL:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:frs="http://www.freecharge.in/RechargeNow/service";
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"; name="RechargeNow"
  targetNamespace="http://www.freecharge.in/RechargeNow/service";
  xmlns:frd="http://www.freecharge.in/RechargeNow/types">;
  <wsdl:types>
    <xsd:schema targetNamespace="http://www.freecharge.in/RechargeNow/types">;
      <xsd:element name="recharge">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="mobileNo" type="xsd:string"></xsd:element>
            <xsd:element name="plan" type="xsd:string"></xsd:element>
            <xsd:element name="amount" type="xsd:float"></xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="invoice">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="status" type="xsd:string"></xsd:element>
            <xsd:element name="transactionId" type="xsd:string"></xsd:element>
            <xsd:element name="comment" type="xsd:string"></xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="MobileRecharge_track">
    <wsdl:part element="frd:recharge" name="in"/>
  </wsdl:message>
  <wsdl:message name="MobileRecharge_trackResponse">
    <wsdl:part element="frd:status" name="out"/>
  </wsdl:message>
  <wsdl:portType name="Freecharge">
    <wsdl:operation name="goRecharge">
      <wsdl:input message="frs:MobileRecharge_track"/>
      <wsdl:output message="frs:MobileRecharge_trackResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="FreechargeSOAPBinding" type="frs:Freecharge">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>;
    <wsdl:operation name="goRecharge">
      <soap:operation soapAction="http://www.freecharge.in/RechargeNow/service/goRecharge"/>;
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="Freechargeservice">
    <wsdl:port binding="frs:freechargeSOAPBinding" name="FreechargeSOAP">
      <soap:address location="http://www.freecharge.in/"/>;
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


Load More

No More Comments