cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CXF-3626) Unable to set a SOAP header in output message
Date Wed, 14 Sep 2011 16:45:09 GMT

     [ https://issues.apache.org/jira/browse/CXF-3626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp updated CXF-3626:
-----------------------------

    Description: 
If I set a soap header in the output of an operation, I get the following error (I've unlocked
trace of ToolException to find the real source) :

{code}
org.apache.cxf.javascript.UnsupportedConstruct: Operation {http://www.example.or
g/UserManager/}key has more than one output part.
        at org.apache.cxf.javascript.service.ServiceJavascriptBuilder.unsupporte
dConstruct(ServiceJavascriptBuilder.java:912)
        at org.apache.cxf.javascript.service.ServiceJavascriptBuilder.createResp
onseDeserializer(ServiceJavascriptBuilder.java:511)
        at org.apache.cxf.javascript.service.ServiceJavascriptBuilder.end(Servic
eJavascriptBuilder.java:269)
        at org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.j
ava:76)
        at org.apache.cxf.tools.wsdlto.javascript.WSDLToJavaScriptProcessor.proc
ess(WSDLToJavaScriptProcessor.java:93)
        at org.apache.cxf.tools.wsdlto.javascript.JavaScriptContainer.execute(Ja
vaScriptContainer.java:144)
        at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon
tainer.java:283)
        at org.apache.cxf.tools.wsdlto.javascript.JavaScriptContainer.execute(Ja
vaScriptContainer.java:151)
        at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.ja
va:103)
        at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.ja
va:67)
        at org.apache.cxf.tools.wsdlto.javascript.WSDLToJavaScript.run(WSDLToJav
aScript.java:60)
        at org.apache.cxf.tools.wsdlto.javascript.WSDLToJavaScript.main(WSDLToJa
vaScript.java:97)
{code}


Here my wsdl :

{code}
<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions
	name="MyManager"
	targetNamespace="http://www.example.org/MyManager/"
	xmlns:tns="http://www.example.org/MyManager/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:message name="header">
    <wsdl:part type="xsd:string" name="header"/>
  </wsdl:message>
  <wsdl:message name="key">
    <wsdl:part type="xsd:string" name="key"/>
  </wsdl:message>
  <wsdl:message name="data">
    <wsdl:part type="xsd:string" name="data"/>
  </wsdl:message>
  <wsdl:message name="fault">
  	<wsdl:part name="fault" type="xsd:string" />
  </wsdl:message>
<wsdl:portType name="MyPortType">
    <wsdl:operation name="getKey">
      <wsdl:input message="tns:data"/>
      <wsdl:output message="tns:key"/>
    </wsdl:operation>
  </wsdl:portType>
<wsdl:binding name="MyBinding" type="tns:MyPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getKey">
      <soap:operation soapAction="http://www.example.org/MyManager/getKey"/>
      <wsdl:input>
      	<soap:header namespace="http://www.example.org/MyManager/" part="header" message="tns:header"
use="literal" />
        <soap:body namespace="http://www.example.org/MyManager/" parts="data" use="literal"
/>
      </wsdl:input>
      <wsdl:output>
      	<soap:header namespace="http://www.example.org/MyManager/" part="header" message="tns:header"
use="literal" />
        <soap:body namespace="http://www.example.org/MyManager/" parts="key" use="literal"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="MyManager">
    <wsdl:port binding="tns:MyBinding" name="MyManager">
      <soap:address location="http://www.example.org/index.php?module=MyManager"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
{code}

  was:
If I set a soap header in the output of an operation, I get the following error (I've unlocked
trace of ToolException to find the real source) :

org.apache.cxf.javascript.UnsupportedConstruct: Operation {http://www.example.or
g/UserManager/}key has more than one output part.
        at org.apache.cxf.javascript.service.ServiceJavascriptBuilder.unsupporte
dConstruct(ServiceJavascriptBuilder.java:912)
        at org.apache.cxf.javascript.service.ServiceJavascriptBuilder.createResp
onseDeserializer(ServiceJavascriptBuilder.java:511)
        at org.apache.cxf.javascript.service.ServiceJavascriptBuilder.end(Servic
eJavascriptBuilder.java:269)
        at org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.j
ava:76)
        at org.apache.cxf.tools.wsdlto.javascript.WSDLToJavaScriptProcessor.proc
ess(WSDLToJavaScriptProcessor.java:93)
        at org.apache.cxf.tools.wsdlto.javascript.JavaScriptContainer.execute(Ja
vaScriptContainer.java:144)
        at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon
tainer.java:283)
        at org.apache.cxf.tools.wsdlto.javascript.JavaScriptContainer.execute(Ja
vaScriptContainer.java:151)
        at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.ja
va:103)
        at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.ja
va:67)
        at org.apache.cxf.tools.wsdlto.javascript.WSDLToJavaScript.run(WSDLToJav
aScript.java:60)
        at org.apache.cxf.tools.wsdlto.javascript.WSDLToJavaScript.main(WSDLToJa
vaScript.java:97)



Here my wsdl :


<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions
	name="MyManager"
	targetNamespace="http://www.example.org/MyManager/"
	xmlns:tns="http://www.example.org/MyManager/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:message name="header">
    <wsdl:part type="xsd:string" name="header"/>
  </wsdl:message>
  <wsdl:message name="key">
    <wsdl:part type="xsd:string" name="key"/>
  </wsdl:message>
  <wsdl:message name="data">
    <wsdl:part type="xsd:string" name="data"/>
  </wsdl:message>
  <wsdl:message name="fault">
  	<wsdl:part name="fault" type="xsd:string" />
  </wsdl:message>
<wsdl:portType name="MyPortType">
    <wsdl:operation name="getKey">
      <wsdl:input message="tns:data"/>
      <wsdl:output message="tns:key"/>
    </wsdl:operation>
  </wsdl:portType>
<wsdl:binding name="MyBinding" type="tns:MyPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getKey">
      <soap:operation soapAction="http://www.example.org/MyManager/getKey"/>
      <wsdl:input>
      	<soap:header namespace="http://www.example.org/MyManager/" part="header" message="tns:header"
use="literal" />
        <soap:body namespace="http://www.example.org/MyManager/" parts="data" use="literal"
/>
      </wsdl:input>
      <wsdl:output>
      	<soap:header namespace="http://www.example.org/MyManager/" part="header" message="tns:header"
use="literal" />
        <soap:body namespace="http://www.example.org/MyManager/" parts="key" use="literal"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="MyManager">
    <wsdl:port binding="tns:MyBinding" name="MyManager">
      <soap:address location="http://www.example.org/index.php?module=MyManager"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>



> Unable to set a SOAP header in output message
> ---------------------------------------------
>
>                 Key: CXF-3626
>                 URL: https://issues.apache.org/jira/browse/CXF-3626
>             Project: CXF
>          Issue Type: Bug
>          Components: JavaScript Client
>    Affects Versions: 2.4.1
>         Environment: Windows XP, JDK 1.6.0_23
>            Reporter: Nag
>            Priority: Minor
>              Labels: javascript, unsupported, wsdl, wsdl2js
>
> If I set a soap header in the output of an operation, I get the following error (I've
unlocked trace of ToolException to find the real source) :
> {code}
> org.apache.cxf.javascript.UnsupportedConstruct: Operation {http://www.example.or
> g/UserManager/}key has more than one output part.
>         at org.apache.cxf.javascript.service.ServiceJavascriptBuilder.unsupporte
> dConstruct(ServiceJavascriptBuilder.java:912)
>         at org.apache.cxf.javascript.service.ServiceJavascriptBuilder.createResp
> onseDeserializer(ServiceJavascriptBuilder.java:511)
>         at org.apache.cxf.javascript.service.ServiceJavascriptBuilder.end(Servic
> eJavascriptBuilder.java:269)
>         at org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.j
> ava:76)
>         at org.apache.cxf.tools.wsdlto.javascript.WSDLToJavaScriptProcessor.proc
> ess(WSDLToJavaScriptProcessor.java:93)
>         at org.apache.cxf.tools.wsdlto.javascript.JavaScriptContainer.execute(Ja
> vaScriptContainer.java:144)
>         at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon
> tainer.java:283)
>         at org.apache.cxf.tools.wsdlto.javascript.JavaScriptContainer.execute(Ja
> vaScriptContainer.java:151)
>         at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.ja
> va:103)
>         at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.ja
> va:67)
>         at org.apache.cxf.tools.wsdlto.javascript.WSDLToJavaScript.run(WSDLToJav
> aScript.java:60)
>         at org.apache.cxf.tools.wsdlto.javascript.WSDLToJavaScript.main(WSDLToJa
> vaScript.java:97)
> {code}
> Here my wsdl :
> {code}
> <?xml version="1.0" encoding="UTF-8"?><wsdl:definitions
> 	name="MyManager"
> 	targetNamespace="http://www.example.org/MyManager/"
> 	xmlns:tns="http://www.example.org/MyManager/"
> 	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> 	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> 	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> 	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>   <wsdl:message name="header">
>     <wsdl:part type="xsd:string" name="header"/>
>   </wsdl:message>
>   <wsdl:message name="key">
>     <wsdl:part type="xsd:string" name="key"/>
>   </wsdl:message>
>   <wsdl:message name="data">
>     <wsdl:part type="xsd:string" name="data"/>
>   </wsdl:message>
>   <wsdl:message name="fault">
>   	<wsdl:part name="fault" type="xsd:string" />
>   </wsdl:message>
> <wsdl:portType name="MyPortType">
>     <wsdl:operation name="getKey">
>       <wsdl:input message="tns:data"/>
>       <wsdl:output message="tns:key"/>
>     </wsdl:operation>
>   </wsdl:portType>
> <wsdl:binding name="MyBinding" type="tns:MyPortType">
>     <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
>     <wsdl:operation name="getKey">
>       <soap:operation soapAction="http://www.example.org/MyManager/getKey"/>
>       <wsdl:input>
>       	<soap:header namespace="http://www.example.org/MyManager/" part="header" message="tns:header"
use="literal" />
>         <soap:body namespace="http://www.example.org/MyManager/" parts="data" use="literal"
/>
>       </wsdl:input>
>       <wsdl:output>
>       	<soap:header namespace="http://www.example.org/MyManager/" part="header" message="tns:header"
use="literal" />
>         <soap:body namespace="http://www.example.org/MyManager/" parts="key" use="literal"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="MyManager">
>     <wsdl:port binding="tns:MyBinding" name="MyManager">
>       <soap:address location="http://www.example.org/index.php?module=MyManager"/>
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message