Hello,

I'm trying to generate Java code from WSDL with WSDL2Java. Everything works 
fine until I try to generate SOAP-Headers in the Input Message. WSDL2Java does 
not complain, however the generated file xxxStub.java contains references to 
"param4", which is not defined. The buggy code looks like that (beginning with 
line 124)


                                        // add the children only if the 
parameter is not null
                                        if (param4!=null){
                                        env.getHeader().addChild(toOM(param4, 
optimizeContent(new javax.xml.namespace.QName("", "RequestSecurityToken"))));
                                        }


I'm using Axis2 Version 1.0 and JDK1.5.0_6. Below you find an example WSDL.

Is this an error within WSDL2Java or withing my WSDL file? How can I fix the 
problem?

Thanks a lot,

Thomas



---
<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="http://localhost:7777";
                        xmlns:tns="http://localhost:7777";
                        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
                        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
                        
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
                        xmlns="http://schemas.xmlsoap.org/wsdl/";>
        
<message name="SecurityTokenInput">
<part name="testInput" type="xsd:string"/>
<part name="headerInput" type="xsd:string"/>
</message>

<message name="SecurityTokenOutput">
<part name="testOutput" type="xsd:string"/>
</message> 
        
<portType name="SecurityTokenPortType">
<operation name="RequestSecurityToken">      
<input message="tns:SecurityTokenInput"/>      
<output message="tns:SecurityTokenOutput"/>  
</operation>
</portType>
        
<binding name="SecurityTokenBinding" type="tns:SecurityTokenPortType" >
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"; 
/>
<operation name="RequestSecurityToken">
<soap:operation soapAction="" />
<input>
<soap:header message="tns:SecurityTokenInput" part="headerInput" use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>      
<soap:body parts="testInput" use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>              
</input>
<output>
<soap:body parts="testOutput" use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
        
<service name="SecurityTokenService">
<port binding="tns:SecurityTokenBinding">
<soap:address location="http://localhost:7777/STS"/>
</port>
</service>      

</definitions>



_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to