I am using JWSDP. It generates a Impl and Stub class. Some people do a explicit cast when using the _Impl class, to get the reference to the Stub, to set the properties we need. I chose to extend the Impl class in this way: public com.irisel.oms.ws.client.OMBrowserEndpoint getOMBrowserEndpointPort(String url) { | String[] roles = new String[] {}; | HandlerChainImpl handlerChain = new HandlerChainImpl(getHandlerRegistry().getHandlerChain(new QName("http://com.irisel.oms.ws", "OMBrowserEndpointPort"))); | handlerChain.setRoles(roles); | com.irisel.oms.ws.client.OMBrowserEndpoint_Stub stub = new com.irisel.oms.ws.client.OMBrowserEndpoint_Stub(handlerChain); | try { | stub._initialize(super.internalTypeRegistry); | stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, url); | } catch (JAXRPCException e) { | throw e; | } catch (Exception e) { | throw new JAXRPCException(e.getMessage(), e); | } | return stub; | } | public com.irisel.oms.ws.client.OMBrowserEndpoint getOMBrowserEndpointPort(String url,String user,String pwd) { | OMBrowserEndpoint_Stub stub = (OMBrowserEndpoint_Stub) this.getOMBrowserEndpointPort(url); | stub._setProperty(Stub.USERNAME_PROPERTY,user); | stub._setProperty(Stub.PASSWORD_PROPERTY,pwd); | return stub; | } |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934153#3934153 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3934153 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user