You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Marina Deslaugiers <ma...@orange-ftgroup.com> on 2008/06/10 18:10:46 UTC

Re: URGENT - CONTINUED Need help again on binding to external web service with login authentication within Tuscany

Hi,

Yesterday, I put a message as well as two attachement files on the  
JIRA issue I have created tuscany-2355 but I did not realize it was  
not posted on the user-list. So below it is.

Thanks for your answer (even if I feel you are very busy)

Regards,
Marina.


> Hi,
>
> Following your indications, Simon, I change my composite file to  
> take interface details from the WSDL file into account (adding the  
> <interface.wsdl interface= ... />".
>
> We proceeded again testing with the person responsible of web  
> service "Nursery" support to users.
>
> But, I still get the same error on the namespace:
>  " the namespaces used in SOAP BODY are not in conformity with the  
> WSDL. Indeed, one can find the value "http://translatewithsms"  as  
> the "pseudo"  namespace _ns_. Replacing that value with the one  
> defined in the WSDL say "http://com.osa.mdsp.enabler.sei/SMSEnabler/ 
> V2_0/SMSSenderSEI", the SOAP frame works"
>
> If any, what mistake have I done ? Can you give me a correction,  
> please.
> I attach my modified Composite file and the WSDL file to this post.
>
> Thanks for your help


Le 2 juin 08 à 16:22, Marina Deslaugiers a écrit :

> Hi Simon,
>
> Thank you very much for your help. I will try to understand your  
> explanations and to integrate the changes.
> Unfortunately at the moment I am very busy on other staff so I am  
> not sure I will get the time required to do that before thursday  
> evening.
> BUT I do want to keep in contact with you.
>
> Regarding the HTTP Basic authentication do you plan to add such a  
> definition into Tuscany ?
> This type of authentication is MANDATORY for (and the only one  
> handled by) the nursery web services we must consider in our  
> evaluation.
>>> To do HTTP basic authentication we need a new a new policy  
>>> definition. I don't think we have done this yet so I'll
>>> be interested to see if anyone posts here to contradict me.
>
>
>
> Regards,
> Marina.
>
>
> Le 2 juin 08 à 15:44, Simon Laws a écrit :
>
>> On Mon, Jun 2, 2008 at 1:15 PM, Simon Laws  
>> <si...@googlemail.com>
>> wrote:
>>
>>> Hi Marina
>>>
>>> I've just been looking at this so some comments in line...
>>>
>>> Simon
>>>
>>>
>>>>
>>>>>>      1) the namespaces used in SOAP BODY are not in conformity  
>>>>>> with the
>>>>>> WSDL. Indeed, one can find the value "http:// 
>>>>>> translatewithsms"  as the
>>>>>> "pseudo"  namespace _ns_. Replacing that value with the one  
>>>>>> defined in
>>>>>> the
>>>>>> WSDL say "http://com.osa.mdsp.enabler.sei/SMSEnabler/V2_0/
>>>>>> SMSSenderSEI",
>>>>>> the SOAP frame works
>>>>>>
>>>>>> Note that I realized that "translatewithsms" is the package  
>>>>>> name of my
>>>>>> Eclipse project (containing in particular java client,  
>>>>>> interfaces etc.
>>>>>> files).
>>>>>
>>>>>
>>> A. How did you generate the Java interface that you are using to  
>>> type the
>>> component reference that refers to this remote service?
>>> B. How do you define the interface of the reference that refers  
>>> to the
>>> remote service. Do you use interface.wsdl?
>>>
>>> If you have generated your java interface into the package
>>> "translatewithsms" and you use this to describe the reference  
>>> interface (or
>>> is defaults to this) then it will invent the message namespace  
>>> based on the
>>> package name I believe.
>>>
>>>
>>>>
>>>>>>
>>>>>>      2) at HTTP level, the web service in the Nursery is  
>>>>>> protected by
>>>>>> "Basic Authentication" ; but the "Authorization" header is not  
>>>>>> sent by
>>>>>> Tuscany
>>>>>>
>>>>>>       (NB: at the current state, we cannot know whether it is  
>>>>>> actually a
>>>>>> problem EXCEPT if Tuscany uses pre-emptive authentication  
>>>>>> mecanisms
>>>>>>
>>>>>
>>> Yes. You definitions.xml file turns on the WSSecurity  
>>> authorization using
>>> the <tuscany:wsConfigParam> element. To do HTTP basic  
>>> authentication we need
>>> a new a new policy definition. I don't think we have done this  
>>> yet so I'll
>>> be interested to see if anyone posts here to contradict me.
>>>
>>>
>>>
>>>>>>      3) Note that Tuscany sends the authentication
>>>>>> credentials(user/password) using WS-Security that is not taken  
>>>>>> into
>>>>>> account
>>>>>> by the Nursery platform.  This is not a problem however,  
>>>>>> credentials are
>>>>>> not
>>>>>>  operate.
>>>>>>
>>>>>> NB:  tcpdump files can be opened with WireShark http://
>>>>>> www.wireshark.org/download.html
>>>>>>
>>>>>>
>>> I see. This comes back to replacing wssecurity based  
>>> authentication with
>>> HTTP basic authentication.
>>>
>>>
>>>>>>
>>>>>>  I might be responsible for these problems as I have probably  
>>>>>> made
>>>>>> mistakes
>>>>>> in coding (at least regarding the policy expression). Please  
>>>>>> can you
>>>>>> help me
>>>>>> in correcting.
>>>>>>
>>>>>> Thanks you very much.
>>>>>>
>>>>>> Regards,
>>>>>> Marina.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>> Marina
>>
>> I tried a test to help clarrify what I'm talking about in terms of  
>> getting
>> the namespace right. I changed a calculator sample I'm using for  
>> some other
>> testing to take the namespace from a manually altered WSDL file.  
>> This is how
>> I set up the composite.
>>
>>     <component name="CalculatorServiceComponent">
>>         <implementation.java  
>> class="calculator.CalculatorServiceImpl"/>
>>         <reference name="addService">
>>            <interface.wsdl interface="
>> http://calculator2#wsdl.interface(AddService)"/>
>>            <binding.ws uri="http://localhost:8085/AddService"
>> requires="authentication" />
>>         </reference>
>>         <reference name="subtractService"
>> target="SubtractServiceComponent"/>
>>         <reference name="multiplyService"
>> target="MultiplyServiceComponent"/>
>>         <reference name="divideService"  
>> target="DivideServiceComponent"/>
>>     </component>
>>
>>     <component name="AddServiceComponent">
>>         <implementation.java class="calculator.AddServiceImpl"/>
>>         <service name="AddService">
>>              <interface.wsdl interface="
>> http://calculator2#wsdl.interface(AddService)" />
>>              <binding.ws uri="http://localhost:8085/AddService"
>> requires="authentication"/>
>>         </service>
>>     </component>
>>
>> The WSDL sits alongside the composite file in the contribution and is
>> automatically parsed by the runtime. Note that I'm telling the  
>> reference to
>> take the interface details from the WSDL file with the line
>>
>> <interface.wsdl interface="http://calculator2#wsdl.interface 
>> (AddService)"/>
>>
>> This won't fix your HTTP basic authentication problem but should  
>> correct the
>> namespace issue.
>>
>> Regards
>>
>> Simon
>