You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Timour Mouratov <mt...@gmail.com> on 2005/03/17 23:58:43 UTC

Handler to webservice bridge.

Hello, 

Each SOAP request that comes to my web service contains user
credentials (name and password) within SOAP header. I'm using it to
authenticate a request and after user is authenticated I drop  the
header. Now  web service itself needs these parameters (user name and
password) for it is own business logic  but I don't want to
expose/introduce them in WSDL.

Is there a possibility to pass simple objects from handler to service
within the same request/response flaw ?

Thanks in advance.

Re: Handler to webservice bridge.

Posted by Timour Mouratov <mt...@gmail.com>.
Thanks Robert.

On Mon, 21 Mar 2005 02:38:43 +0100, Robert Gombotz
<ro...@gmail.com> wrote:
> Hi.
> 
> just posted a question of the same kind and got a response.
> in your WS you can get the soap message using
> org.apache.axis.MessageContext.getCurrentContext() which gives you an
> object of type MessageContext. that you can use just like in your
> handlers, so just retrieve user and pwd again in the WS
> implementation.
> 
> hope that helps.
> 
> Rob
> 
> 
> On Thu, 17 Mar 2005 17:58:43 -0500, Timour Mouratov <mt...@gmail.com> wrote:
> > Hello,
> >
> > Each SOAP request that comes to my web service contains user
> > credentials (name and password) within SOAP header. I'm using it to
> > authenticate a request and after user is authenticated I drop  the
> > header. Now  web service itself needs these parameters (user name and
> > password) for it is own business logic  but I don't want to
> > expose/introduce them in WSDL.
> >
> > Is there a possibility to pass simple objects from handler to service
> > within the same request/response flaw ?
> >
> > Thanks in advance.
> >
>

Re: Handler to webservice bridge.

Posted by Robert Gombotz <ro...@gmail.com>.
Hi.

just posted a question of the same kind and got a response.
in your WS you can get the soap message using 
org.apache.axis.MessageContext.getCurrentContext() which gives you an
object of type MessageContext. that you can use just like in your
handlers, so just retrieve user and pwd again in the WS
implementation.

hope that helps.

Rob


On Thu, 17 Mar 2005 17:58:43 -0500, Timour Mouratov <mt...@gmail.com> wrote:
> Hello,
> 
> Each SOAP request that comes to my web service contains user
> credentials (name and password) within SOAP header. I'm using it to
> authenticate a request and after user is authenticated I drop  the
> header. Now  web service itself needs these parameters (user name and
> password) for it is own business logic  but I don't want to
> expose/introduce them in WSDL.
> 
> Is there a possibility to pass simple objects from handler to service
> within the same request/response flaw ?
> 
> Thanks in advance.
>

Re: 1.2rc2 (Wrapped) Document/Literal soap response for array items xmlns set to ""

Posted by Anne Thomas Manes <at...@gmail.com>.
As a quick workaround, add elementFormDefault="qualified" to your schema: 

<schema xmlns="http://www.w3.org/2001/XMLSchema" 
    targetNamespace="http://xmlns.mycompany.com/ws"
    elementFormDefault="qualified" >

Anne


On Fri, 18 Mar 2005 03:08:07 +0000, M S <mj...@hotmail.com> wrote:
> 
> 
> Hi, 
> 
> It looks like AXIS 1.2 RC2 is sometimes incorrectly setting/including  the
> xmlns="" attribute for child "item"s of array elements when using
> Document/Literal (Wrapped). 
> 
> My .NET cilent cannot deserialize the requestedAttributes (NamedValue[])
> section of complex type Item correctly, yet can correctly deserialize the
> top-level loginReturn (which is also NamedValue[]). 
> 
> Is this bug http://issues.apache.org/jira/browse/AXIS-1547 
> 
> thanks, 
> 
> Matt. 
> 
> SOAP (Respone) Body Contents: 
> 
> <loginResponse xmlns="http://xmlns.mycompany.com/ws">
>   <loginReturn>
>     <name>LOGIN_USER</name> 
>     <value xsi:type="ns1:Item" xmlns:ns1="http://xmlns.mycompany.com/ws">
>       <id>6678</id> 
>       <name>sancho</name> 
>       <requestedAttributes>
>         <item xmlns="">
>           <name>EMAIL_ADDRESS</name> 
>           <value xsi:type="xsd:string">sancho@company.com</value> 
>         </item>
>         <item xmlns="">
>           <name>PERSONAL_WORKSPACE:NAME</name> 
>           <value xsi:type="xsd:string">sancho</value> 
>         </item>
>       </requestedAttributes
>       <type>USER</type> 
>     </value>
>   </loginReturn>
> <loginResponse> 
> 
>   
> 
> Relevant WSDL Sections: 
> 
> <complexType name="Item">
>   <sequence>
>     <element name="id" type="xsd:long" /> 
>     <element name="name" nillable="true" type="xsd:string" /> 
>     <element name="requestedAttributes" nillable="true"
> type="impl:ArrayOfNamedValue" /> 
>     <element name="type" nillable="true" type="xsd:string" /> 
>   </sequence>
> </complexType> 
> 
> <complexType name="ArrayOfNamedValue">
>   <sequence>
>     <element name="item" type="impl:NamedValue" minOccurs="0"
> maxOccurs="unbounded" />
>   </sequence>
> </complexType> 
> 
> <complexType name="NamedValue">
>   <sequence>
>     <element name="name" nillable="true" type="xsd:string" /> 
>     <element name="value" nillable="true" type="xsd:anyType" /> 
>   </sequence>
> </complexType> 
> 
> <element name="loginResponse">
>   <complexType>
>     <sequence>
>       <element name="loginReturn" type="impl:NamedValue"
> maxOccurs="unbounded" /> 
>     </sequence>
>   </complexType>
> </element> 
> 
> <wsdl:message name="loginResponse">
>   <wsdl:part name="parameters" element="impl:loginResponse" /> 
> </wsdl:message>
> 
> ________________________________
>  Find just what you're after with the new, more precise MSN Search - try it
> now!