Hi Lenni, I think you're only chance is to configure your own ResourceDescriptor. I am using this approach to load the correct WSDL for my environment. As such its pretty easy to change element values etc in DOM before any defaults get loaded.
I've found that SimpleResourceDescriptor can be used as a base and by overriding the getWsdlOperations (via copy and paste :-) you can intercept the wsdl document before anything is read from it. hth Chris -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, November 26, 2007 7:04 PM To: [email protected] Subject: using public interface InitializationParameters Hi guys To overcome a problem I need to update the parameters specified in the WSDL of the service before I instantiate the WsResource, and I was hoping to use the InitializationParameters interface. But I can't seem to access the variables that I need to set (the initialization step uses the default hardcoded ones in stead). Have anyone utilized this interfase yet? And/or any good ideas? Sincerely Lenni *** code from the factory that instantiates the WsResource *** public EndpointReference create(int matchId) throws Exception { String ResourceType = "Watcher"; ResourceManager manager = getResource().getResourceManager(); EndpointReference epr = null; Map InitParams = new HashMap(); InitParams.put("_matchId", matchId); try { Resource next = manager.createResource(ResourceType); epr = next.getEndpointReference(); next.setEndpointReference(changeResourceId(epr, Integer.toString(matchId))); next.setInitializationParameters(InitParams); next.initialize(); manager.addResource(epr, next); } catch (Throwable error){ error.printStackTrace(); } return epr; } // <wsa:EndpointReference> // <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://hostId/Wrapper/s ervices/Wrapper</wsa:Address> // <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing"> // <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">WatcherId</muse-ws a:ResourceId> // </wsa:ReferenceParameters> // </wsa:EndpointReference> private EndpointReference changeResourceId(EndpointReference epr, String matchId) throws IOException, TransformerException { QName resourceIdQName = new QName("http://ws.apache.org/muse/addressing", "ResourceId", "muse-wsa"); // System.out.println("epr: "+XmlUtils.toString(epr.toXML(),false)); epr.getParameter(resourceIdQName).setTextContent(matchId); // System.out.println("epr: "+XmlUtils.toString(epr.toXML(),false)); return epr; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
