Binding[] bindings = CodeGenUtils.getBindings( m_service );
for ( int i = 0; i < bindings.length; i++ )
{
Binding binding = bindings[i];
BindingEntry bEntry = m_symTable.getBindingEntry( binding.getQName( ) );
if ( bEntry == null )
{
throw new IOException( Messages.getMessage( "emitFailNoBindingEntry01",
new String[]
{
binding.getQName( ).toString( )
} ) );
}
PortTypeEntry ptEntry = m_symTable.getPortTypeEntry( binding.getPortType( ).getQName( ) );
if ( ptEntry == null )
{
throw new IOException( Messages.getMessage( "emitFailNoPortType01",
new String[]
{
binding.getPortType( ).getQName( ).toString( )
} ) );
}
// If this isn't a SOAP binding, skip it
if ( bEntry.getBindingType( ) != BindingEntry.TYPE_SOAP )
{
LOG.info( MSG.getMessage( Keys.NOT_SOAP_BINDING,
bEntry.getName( ) ) );
continue;
}
// if we have not generated the required management code yet, see if we
// should do it now
if ( !generatedRequiredCode )
{
// check to see if the port type has a WS-RP resource properties
QName rpQName = discoverResourcePropertiesDocumentQName( ptEntry );
// if the port type has the WS-RP resource properties document
// attribute, generate the required code to support WS-RP
if ( rpQName != null )
{
LOG.info( MSG.getMessage( Keys.FOUND_WSRP_DOC, rpQName ) );
writeRequiredCode( pw, m_service, ptEntry, rpQName );
generatedRequiredCode = true;
}
}
// generate the code for each operation in the port type
List operations = binding.getBindingOperations( );
for ( int j = 0; j < operations.size( ); j++ )
{
BindingOperation opBinding = (BindingOperation) operations.get( j );
Operation op = opBinding.getOperation( );
OperationType opType = op.getStyle( );
Parameters parameters = bEntry.getParameters( opBinding.getOperation( ) );
// These operation types are not supported. The signature will be a string stating that fact.
if ( ( opType == OperationType.NOTIFICATION ) || ( opType == OperationType.SOLICIT_RESPONSE ) )
{
pw.println( parameters.signature );