WSDLs created by Axis2 services cannot be read by SoapUI or WSDL2Java

I am converting some services from Apache SOAP to Axis2, so Java service classes already exist. I created a new project in Eclipse, imported the source, made sure that the edges of the Axis2 project were set, and that the properties of the Axis2 emitter were correct. Then, in Eclipse, I selected the service class and chose Create Web Service by selecting the Axis2 runtime. The service works and works on my PC, and when I add "? Wsdl" to the service path, I really get the WSDL, which I save locally. Trying to import this into SoapUI to create a client gives an error:

ERROR:org.apache.xmlbeans.XmlException: C:\projects\soapUI\Axis2\DALService.wsdl:0: error: src-resolve: type 'SOAPException@http://www.w3.org/2001/XMLSchema' not found.

The type to which it refers (SOAPException) is a delay from Apache SOAP services, and in the service code I changed all the "import" links in the service code (and not WSDL) from org.apache.soap.SOAPException(old Apache SOAP) to javax.xml.soap.SOAPException(Axis2 location). The code compiles and runs as soon as I can access it, but I cannot access it without creating a client. Any thoughts on why changing the namespace of the object will contain the generated WSDL files in the correct namespace references?

+3
source share
2 answers

, , , , , , . - SOAPException, . , SoapUI XML, .

SOAPException:

    <xs:schema xmlns:test="http://service.PROJECT.DEPARTMENT.COMPANY.com" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://DEPARTMENT.COMPANY.com/xsd">
        <xs:import namespace="http://service.PROJECT.DEPARTMENT.COMPANY.com"/>
        <xs:complexType name="SOAPException">
            <xs:complexContent>
                <xs:extension base="ns:Exception">
                    <xs:sequence/>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:schema>

-, wsdl: :

xmlns:im="http://DEPARTMENT.COMPANY.com/xsd"

-, , SOAPException (fron ns to im ), :

    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service.ims.im.sa.homedepot.com/xsd">
        <xs:complexType name="SOAPLocatorException">
            <xs:complexContent>
                <xs:extension base="im:SOAPException">
                    <xs:sequence>
                        <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="messageCode" nillable="true" type="xs:string"/>
                    </xs:sequence>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:schema>

XML - XMLSpy, - , (, , Soap11 Soap12, HTTP-).

, , :

  • Axis2 SOAPException ( , ), xs:schema?
  • , ?
  • DEPARTMENT.COMPANY.com Axis2 , ?
0

URL- "xxx? wsdl", WSDL SOAP, , XSD, WSDL, SOAP UI, , org.apache.soap.SOAPException javax.xml.soap.SOAPException, .

URL- .

0

Source: https://habr.com/ru/post/1737408/


All Articles