axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas" <dava...@gmail.com>
Subject [WSDL4J] Complicated imports causing problems in WSDL4J 1.6.1
Date Fri, 03 Nov 2006 00:53:52 GMT
Hi John/Folks,

Can we get some help fixing this problem? We are getting bad
information in a porttype which is deep inside imported wsdl (2 levels
deep).

JIRA Issue in Axis2:
http://issues.apache.org/jira/browse/AXIS2-1556

Zip file with WSDL/XSD:
http://issues.apache.org/jira/secure/attachment/12344019/SimpleService.zip

Code Snippet:

import javax.wsdl.Definition;
import javax.wsdl.Port;
import javax.wsdl.Service;
import javax.wsdl.factory.WSDLFactory;
import javax.wsdl.xml.WSDLReader;
public class TestImports {

    public static void main(String[] args) throws Exception {
        WSDLFactory wsdlFactory = WSDLFactory.newInstance();
        WSDLReader reader = wsdlFactory.newWSDLReader();
        reader.setFeature("javax.wsdl.importDocuments", true);
        reader.setFeature("javax.wsdl.verbose", true);
        Definition definition = reader.readWSDL(args[0]);
        Service service = (Service)
definition.getServices().values().iterator().next();
        Port port = (Port) service.getPorts().values().iterator().next();
        System.out.println(port.getBinding().getPortType());
    }
}

Output on screen:
PortType: name={urn:mycompany.com:web-services:port-types:draft:10-2006}SimpleServicePortType
Operation: name=createSimpleXXX
Input: name=:none
Output: name=:none

Actual PortType snippet from WSDL:
  <portType name="SimpleServicePortType">
    <operation name="createSimpleXXX">
      <input message="tns:createSimpleXXXRequest"
wsaddr:Action="urn:createSimpleXXX">
    </input>
      <output message="tns:createSimpleXXXResponse">
    </output>
    </operation>
  </portType>

Thanks,
dims

-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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


Mime
View raw message