List Info

Thread: SOAP encoding not picked up by wsdl2Java?




SOAP encoding not picked up by wsdl2Java?
user name
2006-03-16 10:57:24
SOAP encoding not picked up by wsdl2Java?<wbr>

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:
 &nbsp;  [mkdir] Created dir: C:\wsrf-1.1\webapps\wsrf\_tmp_
 &nbsp; &nbsp; [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] &nbsp; &nbsp; at org.apache.ws.util.OperationInfo.<init&gt;(OperationInfo.java:71)
[wsdl2Java] &nbsp; &nbsp; at org.apache.ws.resource.tool.GenerationUtils.getOperationInfoMap(GenerationUtils.java:61)
[wsdl2Java] &nbsp; &nbsp; at org.apache.ws.resource.tool.Wsdl2Java.buildServiceProperties(Wsdl2Java.java:323)
[wsdl2Java] &nbsp; &nbsp; at org.apache.ws.resource.tool.Wsdl2Java.processTemplates(Wsdl2Java.java:487)
[wsdl2Java] &nbsp; &nbsp; at org.apache.ws.resource.tool.Wsdl2Java.processWsdlFile(Wsdl2Java.java:971)
[wsdl2Java] &nbsp; &nbsp; at org.apache.ws.resource.tool.Wsdl2Java.generate(Wsdl2Java.java:185)
[wsdl2Java] &nbsp; &nbsp; at org.apache.ws.resource.tool.Wsdl2JavaTask.execute(Wsdl2JavaTask.java:228)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.Task.perform(Task.java:364)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.Target.execute(Target.java:301)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.Target.performTasks(Target.java:328)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.Main.runBuild(Main.java:632)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.Main.startAnt(Main.java:183)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)


Here is the wsdl i'm using:

<?xml version="1.0&quot; encoding="UTF-8"?>
<wsdl:definitions
&nbsp;   ; &nbsp;  targetNamespace="http://webservices&quot;
&nbsp; &nbsp; &nbsp;   xmlns:impl="http://webservices&quot;
&nbsp; &nbsp; &nbsp;   xmlns:intf="http://webservices&quot;
&nbsp; &nbsp; &nbsp;   xmlns:apachesoap="http://xml.apache.org/xml-soap&quot;
 &nbsp;   ; &nbsp; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
 &nbsp;   ; &nbsp; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/&quot;
 &nbsp;   ; &nbsp; xmlnssd="http://www.w3.org/2001/XMLSchema"
 &nbsp;   ; &nbsp; xmlns:tns1="http://rpc.xml.coldfusion"
 &nbsp;   ; &nbsp; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 &nbsp;   ; &nbsp; xmlns="http://schemas.xmlsoap.org/wsdl/">
&nbsp; &nbsp;   <wsdl:types>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;  <schema
  ; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  xmlns="http://www.w3.org/2001/XMLSchema"
  ; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  targetNamespace="http://rpc.xml.coldfusion">
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  <import namespace="http://schemas.xmlsoap.org/soap/encoding/&quot;/>
&nbsp;   ; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  <complexType name="CFCInvocationException&quot;>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  <sequence/>
&nbsp;   ; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  </complexType>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;  </schema>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;  <schema
  ; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  xmlns="http://www.w3.org/2001/XMLSchema"
 &nbsp;   ; &nbsp;  &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  targetNamespace="http://xml.apache.org/xml-soap&quot;>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  <import namespace="http://schemas.xmlsoap.org/soap/encoding/&quot;/>
&nbsp;   ; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  <complexType name="mapItem">
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  <sequence>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  <element name="key&quot; nillable="true" type="xsd:string";/>
&nbsp;   ; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  <element name="value" nillable="true" type="xsd:string";/>
&nbsp;   ; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  </sequence>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  </complexType>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  <complexType name="Map&quot;>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  <sequence>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  <element name="item" minOccurs="0&quot; maxOccurs="unbounded" type="apachesoap:mapItem"/>

  ; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  </sequence>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  </complexType>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;  </schema>
&nbsp; &nbsp;   </wsdl:types>
  <wsdl:message name="updateLogonToUnsecureResponse">
 &nbsp;  <wsdl:part name="updateLogonToUnsecureReturn" type="xsd:boolean&quot;/>
  </wsdl:message>
  <wsdl:message name="getDatasourcesRequest";>
  </wsdl:message>
  <wsdl:message name="isLoggedInSecureResponse&quot;>
 &nbsp;  <wsdl:part name="isLoggedInSecureReturn&quot; type="xsd:boolean&quot;/>
  </wsdl:message>
  <wsdl:message name="isLoggedInSecureRequest&quot;>
 &nbsp;  <wsdl:part name="serverName"; type="xsd:string";/>
 &nbsp;  <wsdl:part name="domainKey" type="xsd:string";/>
 &nbsp;  <wsdl:part name="IETLogonSessionID" type="xsd:string";/>
 &nbsp;  <wsdl:part name="IP&quot; type="xsd:string";/>
 &nbsp;  <wsdl:part name="userAgent" type="xsd:string";/>
  </wsdl:message>
  <wsdl:message name="CFCInvocationException&quot;>
 &nbsp;  <wsdl:part name="fault" type="tns1:CFCInvocationException"/>
  </wsdl:message>
  <wsdl:message name="setDatasourcesRequest";>
 &nbsp;  <wsdl:part name="datasources&quot; type="apachesoap:Map&quot;/>
  </wsdl:message>
  <wsdl:message name="isLoggedInResponse">
 &nbsp;  <wsdl:part name="isLoggedInReturn" type="xsd:boolean&quot;/>
  </wsdl:message>
  <wsdl:message name="setDatasourcesResponse&quot;>
  </wsdl:message>
  <wsdl:message name="getDatasourcesResponse&quot;>
 &nbsp;  <wsdl:part name="getDatasourcesReturn" type="apachesoap:Map&quot;/>
  </wsdl:message>
  <wsdl:message name="isLoggedInRequest">
 &nbsp;  <wsdl:part name="serverName&q

SOAP encoding not picked up by wsdl2Java?
user name
2006-03-16 11:40:58
Why are you using wsrf to generate that service instead of the standard Axis framework? I don't see any resource property or stardard wsrf operation in your wsdl nor wsrf schema import in it.

On 3/16/06, Martin Dixon <magus.co.uk">martin.dixonmagus.co.uk > wrote:

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:
 &nbsp;  [mkdir] Created dir: C:\wsrf-1.1\webapps\wsrf\_tmp_
 &nbsp; &nbsp; [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] &nbsp; &nbsp; at org.apache.ws.util.OperationInfo.<init&gt;(OperationInfo.java:71)
[wsdl2Java] &nbsp; &nbsp; at org.apache.ws.resource.tool.GenerationUtils.getOperationInfoMap(GenerationUtils.java:61)
[wsdl2Java] &nbsp; &nbsp; at org.apache.ws.resource.tool.Wsdl2Java.buildServiceProperties(Wsdl2Java.java:323)
[wsdl2Java] &nbsp; &nbsp; at org.apache.ws.resource.tool.Wsdl2Java.processTemplates(Wsdl2Java.java:487)
[wsdl2Java] &nbsp; &nbsp; at org.apache.ws.resource.tool.Wsdl2Java.processWsdlFile(Wsdl2Java.java:971)
[wsdl2Java] &nbsp; &nbsp; at org.apache.ws.resource.tool.Wsdl2Java.generate(Wsdl2Java.java:185)
[wsdl2Java] &nbsp; &nbsp; at org.apache.ws.resource.tool.Wsdl2JavaTask.execute(Wsdl2JavaTask.java:228)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.Task.perform(Task.java:364)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.Target.execute(Target.java:301)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.Target.performTasks(Target.java:328)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.Main.runBuild(Main.java:632)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.Main.startAnt(Main.java:183)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
[wsdl2Java] &nbsp; &nbsp; at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)


Here is the wsdl i'm using:

<?xml version ="1.0&quot; encoding= "UTF-8"?>
<wsdl:definitions
&nbsp;   ; &nbsp;  targetNamespace=" http://webservices&quot;
&nbsp; &nbsp;   xmlns:impl=" http://webservices&quot;
&nbsp; &nbsp;   xmlns:intf=" http://webservices&quot;
&nbsp; &nbsp;   xmlns:apachesoap=" http://xml.apache.org/xml-soap"
 &nbsp;   ; &nbsp; xmlns:wsdlsoap=" http://schemas.xmlsoap.org/wsdl/soap/&quot;
 &nbsp;   ; &nbsp; xmlns:soapenc=" http://schemas.xmlsoap.org/soap/encoding/"
 &nbsp;   ; &nbsp; xmlnssd=" http://www.w3.org/2001/XMLSchema"
 &nbsp;   ; &nbsp; xmlns:tns1=" http://rpc.xml.coldfusion";
 &nbsp;   ; &nbsp; xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/"
 &nbsp;   ; &nbsp; xmlns=" http://schemas.xmlsoap.org/wsdl/">
&nbsp; &nbsp;   <wsdl:types>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;  <schema
  ; &nbsp; &nbsp;  &nbsp;   ; &nbsp;  &nbsp; &nbsp;   xmlns=" http://www.w3.org/2001/XMLSchema"
 &nbsp; &nbsp; &nbsp;    ; &nbsp; &nbsp;  &nbsp;   ; &nbsp;  targetNamespace=" http://rpc.xml.coldfusion";>
&nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; <import namespace ="http://schemas.xmlsoap.org/soap/encoding/ "/>
&nbsp;   ; &nbsp;  &nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   <complexType name ="CFCInvocationException&quot;>
&nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp;  ; &nbsp; &nbsp; &nbsp; <sequence/>
&nbsp;   ; &nbsp;  &nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   </complexType>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;  </schema>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;  <schema
  ; &nbsp; &nbsp;  &nbsp;   ; &nbsp;  &nbsp; &nbsp;   xmlns=" http://www.w3.org/2001/XMLSchema"
 &nbsp;   ; &nbsp;  &nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;  targetNamespace=" http://xml.apache.org/xml-soap">
&nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; <import namespace ="http://schemas.xmlsoap.org/soap/encoding/ "/>
&nbsp;   ; &nbsp;  &nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   <complexType name ="mapItem">
&nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp;  ; &nbsp; &nbsp; &nbsp; <sequence>
&nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp;  ; &nbsp; &nbsp; &nbsp;    ; &nbsp; &nbsp; <element name ="key&quot; nillable= "true" type="xsd:string"; />
&nbsp;   ; &nbsp;  &nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp;  ; &nbsp; &nbsp; &nbsp; <element name ="value" nillable= "true" type="xsd:string"; />
&nbsp;   ; &nbsp;  &nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; </sequence>
&nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; </complexType>
&nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; <complexType name ="Map&quot;>
&nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp;  ; &nbsp; &nbsp; &nbsp; <sequence>
&nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp;  ; &nbsp; &nbsp; &nbsp;    ; &nbsp; &nbsp; <element name ="item" minOccurs= "0&quot; maxOccurs="unbounded" type="apachesoap:mapItem" />

 &nbsp; &nbsp; &nbsp;    ; &nbsp; &nbsp;  &nbsp;   ; &nbsp;  &nbsp; &nbsp;   </sequence>
&nbsp; &nbsp;   ;  &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; </complexType>
&nbsp; &nbsp;   ;   &nbsp; &nbsp; &nbsp;  </schema>
&nbsp; &nbsp;   </wsdl:types>
  <wsdl:message name="updateLogonToUnsecureResponse">
 &nbsp;  <wsdl:part name="updateLogonToUnsecureReturn" type ="xsd:boolean&quot;/>
  </wsdl:message >
  <wsdl:message name="getDatasourcesRequest";>
  </wsdl:message >
  <wsdl:message name="isLoggedInSecureResponse&quot;>
 &nbsp;  <wsdl:part name="isLoggedInSecureReturn&quot; type ="xsd:boolean&quot;/>
  </wsdl:message >
  <wsdl:message name="isLoggedInSecureRequest&quot;>
 &nbsp;  <wsdl:part name="serverName"; type ="xsd:string";/>
 &nbsp;  <wsdl:part name="domainKey" type ="xsd:string";/>
 &nbsp;  <wsdl:part name="IETLogonSessionID" type ="xsd:string";/>
 &nbsp;  <wsdl:part name="IP&quot; type ="xsd:string";/>
 &nbsp;  <wsdl:part name="userAgent" type ="xsd:string";/>
  </wsdl:message >
  <wsdl:message name="CFCInvocationException&quot;>
 &nbsp;  <wsdl:part name="fault" type ="tns1:CFCInvocationException"/>
  </wsdl:message >
  <wsdl:message name="setDatasourcesRequest";>
 &nbsp;  <wsdl:part name="datasources&quot; type ="apachesoap:Map&quot;/>
  </wsdl:message >
  <wsdl:message name="isLoggedInResponse">
 &nbsp;  <wsdl:part name="isLoggedInReturn" type ="xsd:boolean&quot;/>
  </wsdl:message >
  <wsdl:message name="setDatasourcesResponse&quot;>
  </wsdl:message >
  <wsdl:message name="getDatasourcesResponse&quot;>
 &nbsp;  <wsdl:part name="getDatasourcesReturn" type ="apachesoap:Map&quot;/>
  </wsdl:message >
  <wsdl:message name="isLoggedInRequest">
 &nbsp;  <wsdl:part name="serverName"; type ="xsd:string";/>
 &nbsp;  <wsdl:part name="domainKey" type ="xsd:string";/>
 &nbsp;  <wsdl:part name="IETLogonSessionID" type ="xsd:string";/>
 &nbsp;  <wsdl:part name="IP&quot; type ="xsd:string";/>
 &nbsp;  <wsdl:part name="userAgent" type ="xsd:string";/>
  </wsdl:message >
  <wsdl:message name="updateLogonToUnsecureRequest">
 &nbsp;  <wsdl:part name="serverName"; type ="xsd:string";/>
 &nbsp;  <wsdl:part name="domainkey" type ="xsd:string";/>
 &nbsp;  <wsdl:part name="IETLogonSessionID" type

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )