SOAP encoding not picked up by wsdl2Java?
Hello,
I am trying to generate Java stubs from a soap encoded wsdl - i am using wsrf-1.1 and running wsdl2Java from inside an ant script. I believe the wsdl is valid, but when i run wsdl2Java i get the following error:
generate:
[mkdir] Created dir: C:\wsrf-1.1\webapps\wsrf\_tmp_
[copy] Copying 1 file to C:\wsrf-1.1\webapps\wsrf\_tmp_
[wsdl2Java] Processing WSDL file "C:\wsrf-1.1\webapps\wsrf\_tmp_\wsuser.wsdl"...
[wsdl2Java] Retrieving document at 'C:\wsrf-1.1\webapps\wsrf\_tmp_\wsuser.wsdl'.
[wsdl2Java] Generating XMLBeans for WSDL file "C:\wsrf-1.1\webapps\wsrf\_tmp_\wsuser.wsdl"...
[wsdl2Java] C:\wsrf-1.1\webapps\wsrf\_tmp_\wsuser.wsdl:0: warning: The WSDL C:\wsrf-1.1\webapps\wsrf\_tmp_\wsuser.wsdl uses SOAP encoding. SOAP encoding is not compatible with literal XML Schema.
[wsdl2Java] Loading wsdl file C:\wsrf-1.1\webapps\wsrf\_tmp_\wsuser.wsdl
[wsdl2Java] Processing 2 schema(s) in C:\wsrf-1.1\webapps\wsrf\_tmp_\wsuser.wsdl
[wsdl2Java] Processing WSRF WSDL port "wsuser.cfc"...
[wsdl2Java] java.lang.RuntimeException: WSDL input message named {http://webservices}isLoggedInRequest has more than one part - input messages must h
ve at most one part.
[wsdl2Java] at org.apache.ws.util.OperationInfo.<init>(OperationInfo.java:71)
[wsdl2Java] at org.apache.ws.resource.tool.GenerationUtils.getOperationInfoMap(GenerationUtils.java:61)
[wsdl2Java] at org.apache.ws.resource.tool.Wsdl2Java.buildServiceProperties(Wsdl2Java.java:323)
[wsdl2Java] at org.apache.ws.resource.tool.Wsdl2Java.processTemplates(Wsdl2Java.java:487)
[wsdl2Java] at org.apache.ws.resource.tool.Wsdl2Java.processWsdlFile(Wsdl2Java.java:971)
[wsdl2Java] at org.apache.ws.resource.tool.Wsdl2Java.generate(Wsdl2Java.java:185)
[wsdl2Java] at org.apache.ws.resource.tool.Wsdl2JavaTask.execute(Wsdl2JavaTask.java:228)
[wsdl2Java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[wsdl2Java] at org.apache.tools.ant.Task.perform(Task.java:364)
[wsdl2Java] at org.apache.tools.ant.Target.execute(Target.java:301)
[wsdl2Java] at org.apache.tools.ant.Target.performTasks(Target.java:328)
[wsdl2Java] at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[wsdl2Java] at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[wsdl2Java] at org.apache.tools.ant.Main.runBuild(Main.java:632)
[wsdl2Java] at org.apache.tools.ant.Main.startAnt(Main.java:183)
[wsdl2Java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
[wsdl2Java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
Here is the wsdl i'm using:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://webservices"
xmlns:impl="http://webservices"
xmlns:intf="http://webservices"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns sd="http://www.w3.org/2001/XMLSchema"
xmlns:tns1="http://rpc.xml.coldfusion"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://rpc.xml.coldfusion">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="CFCInvocationException">
<sequence/>
</complexType>
</schema>
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://xml.apache.org/xml-soap">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="mapItem">
<sequence>
<element name="key" nillable="true" type="xsd:string"/>
<element name="value" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
  |