private Message doMessageToTypeJoin(Message msg) throws SAXException {
        for (int i = 0; i < msg.messageParts.length; i++) {
            Type schemaType = null;
            String nsprefix = null;
            String partTypeLocalName = null;
            StringTokenizer st =
                    new StringTokenizer(msg.messageParts[i].partTypeName, ":");
            if (st.hasMoreTokens()) {
                nsprefix = st.nextToken();
                partTypeLocalName = st.nextToken();
            } else {
                partTypeLocalName = msg.messageParts[i].partTypeName;
            }
            // FIXIT!! Test whether null nsprefix makes this bag.
            if (nsprefix
                    .equalsIgnoreCase((String) nsPrefixMap.get(XML_XSD.uri))) {
                msg.messageParts[i].partBaseTypeNamespaceURI = XML_XSD.uri;
                msg.messageParts[i].partBaseTypeLocalName = partTypeLocalName;
            }
            // If the part is not an XSD base type, then we assume it is a type defined
            // in the schema definition section of THIS WSDL document (i.e., either
            // a simpleType or a complexType).  NOTE that complexType not currently supported
            // by Fedora.  Also, note that if the part type is not found it the type table
            // (wsdlTypeTbl was created from parsing the schema types section of the WSDL),
            // then an exception will be thrown.  This means that Fedora only supports WSDL
            // whose message parts are either XSD base types or simpleTypes defined in the WSDL document.
            else if ((schemaType = (Type) wsdlTypeTbl.get(partTypeLocalName)) != null) {
                if (schemaType
                        .getClass()
                        .getName()
                        .equalsIgnoreCase("org.fcrepo.server.storage.service.SimpleType")) {
                    msg.messageParts[i].partBaseTypeNamespaceURI =
                            schemaType.baseTypeNamespaceURI;
                    msg.messageParts[i].partBaseTypeLocalName =
                            schemaType.baseTypeLocalName;
                    msg.messageParts[i].enumerationOfValues =
                            ((SimpleType) schemaType).enumerationOfValues;
                    // FIXIT!! Do we want to put more information in the Part object??
                }
            } else {
                throw new SAXException("WSDLParser: message part type must be XSD type or defined in WSDL as simpleType"
                        + msg.messageParts[i].partTypeName);
            }
        }
        return msg;
    }
private Message doMessageToTypeJoin ( Message msg ) throws SAXException { for ( int i = 0 ; i < msg . messageParts . length ; i ++ ) { Type schemaType = null ; String nsprefix = null ; String partTypeLocalName = null ; StringTokenizer st = new StringTokenizer ( msg . messageParts [ i ] . partTypeName , ":" ) ; if ( st . hasMoreTokens ( ) ) { nsprefix = st . nextToken ( ) ; partTypeLocalName = st . nextToken ( ) ; } else { partTypeLocalName = msg . messageParts [ i ] . partTypeName ; } if ( nsprefix . equalsIgnoreCase ( ( String ) nsPrefixMap . get ( XML_XSD . uri ) ) ) { msg . messageParts [ i ] . partBaseTypeNamespaceURI = XML_XSD . uri ; msg . messageParts [ i ] . partBaseTypeLocalName = partTypeLocalName ; } else if ( ( schemaType = ( Type ) wsdlTypeTbl . get ( partTypeLocalName ) ) != null ) { if ( schemaType . getClass ( ) . getName ( ) . equalsIgnoreCase ( "org.fcrepo.server.storage.service.SimpleType" ) ) { msg . messageParts [ i ] . partBaseTypeNamespaceURI = schemaType . baseTypeNamespaceURI ; msg . messageParts [ i ] . partBaseTypeLocalName = schemaType . baseTypeLocalName ; msg . messageParts [ i ] . enumerationOfValues = ( ( SimpleType ) schemaType ) . enumerationOfValues ; } } else { throw new SAXException ( "WSDLParser: message part type must be XSD type or defined in WSDL as simpleType" + msg . messageParts [ i ] . partTypeName ) ; } } return msg ; }
For each Message, iterate through Message Parts. For each MessagePart,
get partTypeName and break into ns/localName. Lookup to wsdlTypeTbl to
get type info for parts.