Thanks Tom... am i posting this in the right place?... Hope so. The method segnature for my web service looks like this...
public InventoryAvailabilityResponseBean getAvailability(InventoryAvailabilityRequestBean aInventoryAvailabilityRequestBean) throws Throwable ... so, as you can see, the method doesn't require username, password and usertype. However, they are required by our authenticationHandler, which extends org.apache.axis.handlers.BasicHandler Here is the method that authenticates the credentials passed in the header... public void authenticate(MessageContext aMessageContext) throws AxisFault { String userType = ""; String user = ""; String password = ""; try { userType = aMessageContext.getCurrentMessage().getSOAPEnvelope().getHeaderByName(Consta nts.AUTHENTICATE_SERVICE, Constants.PARAMETER_USER_TYPE).getAsDOM().getFirstChild().getNodeValue(); if (userType == null) { userType = Constants.PROVIDER_DATABASE; } user = aMessageContext.getCurrentMessage().getSOAPEnvelope().getHeaderByName(Consta nts.AUTHENTICATE_SERVICE, Constants.PARAMETER_USER).getAsDOM().getFirstChild().getNodeValue(); if (user == null) { user = "sc"; } password = aMessageContext.getCurrentMessage().getSOAPEnvelope().getHeaderByName(Consta nts.AUTHENTICATE_SERVICE, Constants.PARAMETER_PASSWORD).getAsDOM().getFirstChild().getNodeValue(); if (password == null) { password = "sc"; } } catch (Throwable t) { mlog.error("authenticate() : Error while authenticating user ["+user+"].", t); throw new AxisFault("Invalid UserType or UserName or Password."); } mlog.debug("authenticate() : UserType=["+userType+"], User=["+user+"], Password=["+password+"]"); try { AuthenticatedUser au = null; SecurityProvider securityProvider = null; try { securityProvider = SecurityProviderFactory.getInstance().getSecurityProvider(userType); } catch (UnSupportedProviderException e) { mlog.error("authenticate() : Error while authenticating user '"+user+"'.", e); } if (securityProvider != null) { au = securityProvider.authenticate(user,password); if (au == null) { throw new AxisFault(user+" is not authenticated. Please try again later."); } } else { throw new AxisFault(user+" is not authenticated. Please try again later."); } } catch (Throwable t) { mlog.error("authenticate() : Error while authenticating user '"+user+"'.", t); throw new AxisFault(t.getMessage()); } } So, essentially, the handler expects 3 nodes in the header, but the WSDL doesn't describe them. WSDL is attached... Continued thanks for your continued insight. -----Original Message----- From: TMG [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 3:31 PM To: axis-dev@ws.apache.org Subject: Re: I need help... please Steven, Using header elements in the operation works for Axis 1.2. I use them with doc/lit services that are interoperable with .net clients. You may be doing something that is different (aka better :) ) than what I have done, and it may not work, but I (we) can't tell by what you have posted. To resolve the problem you are having, the user's list would need to see the wsdl and the failure notice you are receiving. Tom Gordon Hill, Steven wrote: >Thanks, I tried that and I got failure notice. > >-----Original Message----- >From: TMG [mailto:[EMAIL PROTECTED] >Sent: Thursday, December 23, 2004 3:12 PM >To: axis-dev@ws.apache.org >Subject: Re: I need help... please > > >Steven, > >This question should be posted on the user list ([EMAIL PROTECTED]). > >The simple answer is to use a header in the input of the binding (e.g. >in the wsdl). > >If you repost your question, and provide your wsdl to the user's list, >you will probably get more details, etc. > >Tom Gordon > > >Hill, Steven wrote: > > > >>I have a webservice, deployed into AXIS. My service will be called from a >>.NET client. The problem that I am having is that my service requeires 3 >>headers for authentication, but they are not described in the WSDL. So, >>when the .NET proxy class is generated, it creates no means for the client >>to pass the information via the header that my service is expecting. Does >>anyone have any ideas? My WSDD is listed below... >> >><deployment xmlns="http://xml.apache.org/axis/wsdd/" >>xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> >> <service name="InventoryAvailabilityService" provider="java:RPC"> >> <requestFlow> >> <handler >>type="java:com.cooperindustries.server.handlers.authenticate.Authenticatio n >> >> >H > > >>andler"/> >> </requestFlow> >> <parameter name="className" >>value="com.cooperindustries.server.services.inventoryavailability.Inventor y >> >> >A > > >>vailabilityServiceProvider"/> >> <parameter name="allowedMethods" value="getAvailability"/> >> <!-- Bean Mappings --> >> <beanMapping >>languageSpecificType="java:com.cooperindustries.beans.request.inventoryava i >> >> >l > > >>ability.InventoryAvailabilityRequestBean" >>qname="ns1:InventoryAvailabilityRequestBean" >>xmlns:ns1="http://inventoryavailability.request.beans.cooperindustries.com " >> >> >/ > > >> >> >> <beanMapping >>languageSpecificType="java:com.cooperindustries.beans.response.inventoryav a >> >> >i > > >>lability.InventoryAvailabilityResponseBean" >>qname="ns2:InventoryAvailabilityResponseBean" >>xmlns:ns2="http://inventoryavailability.response.beans.cooperindustries.co m >> >> >" > > >>/> >> <beanMapping >>languageSpecificType="java:com.cooperindustries.beans.inventoryavailabilit y >> >> >. > > >>InventoryAvailabilityDetailBean" >> >> >qname="ns3:InventoryAvailabilityDetailBean" > > >>xmlns:ns3="http://inventoryavailability.beans.cooperindustries.com"/> >> <beanMapping >>languageSpecificType="java:com.cooperindustries.beans.inventoryavailabilit y >> >> >. > > >>InventoryAvailabilityDistributionCenterBean" >>qname="ns4:InventoryAvailabilityDistributionCenterBean" >>xmlns:ns4="http://inventoryavailability.beans.cooperindustries.com"/> >> <beanMapping >>languageSpecificType="java:com.cooperindustries.message.Messages" >>qname="ns5:Messages" xmlns:ns5="http://message.cooperindustries.com"/> >> <beanMapping >>languageSpecificType="java:com.cooperindustries.message.Message" >>qname="ns6:Message" xmlns:ns6="http://message.cooperindustries.com"/> >> </service> >></deployment> >> >>Steven Hill >>Project Leader - Sales, Marketing and eBusiness Systems >>Cooper Lighting >>1121 Highway 74 South >>Peachtree City, GA, 30269 >>Email: [EMAIL PROTECTED] >>Office: (770) 486-4068 >>Cell: (678) 472-6510 >> >> >> >> >> > > >
InventoryAvailability.wsdl
Description: Binary data