You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Laws (JIRA)" <de...@tuscany.apache.org> on 2008/06/20 17:07:45 UTC

[jira] Commented: (TUSCANY-2355) CONTINUED Need help again on binding to external web service with login authentication

    [ https://issues.apache.org/jira/browse/TUSCANY-2355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606794#action_12606794 ] 

Simon Laws commented on TUSCANY-2355:
-------------------------------------

Hi Marina

I've been playing around with this scenario a little to see if I can work out what is going on... The first approach I took seems to work OK but it this is a very basic first approach. This is what I did...

1. Took your WSDL and ran is through the JDK JAXWS tooling to generate the appropriate Java interfaces. Here's the command I used...

c:\tools\j2sdk6.0-ibm\bin\wsimport.exe -d target -s src/main/java -keep -verbose src/main/resources/MDSP-SMSSenderEnablerSEI-V2_0.wsdl

2. I used the resulting interfaces (which has lots of JAXWS annotations specifying what the namespaces should be) to create a service component and to create a reference in my test reference component

3. Created a composite that had reference and service components talk to one another over web services. 

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
           targetNamespace="http://test"
           xmlns:sample="http://test"
           name="marina">

    <component name="ReferenceComponent">
        <implementation.java class="marina.ReferenceComponentImpl"/>
        <reference name="serviceComponent" >
            <binding.ws uri="http://localhost:8081/SMSSenderEnablerRemoteV20"/>
        </reference>
    </component>
    
    <component name="ServiceComponent">
		<implementation.java class="marina.ServiceComponentImpl"/>
        <service name="SMSSenderEnablerRemoteV20">
            <binding.ws uri="http://localhost:8080/SMSSenderEnablerRemoteV20"/>
        </service>
    </component>

</composite>

4 I trapped the soap message passing between reference and service and this is what I saw...

POST /SMSSenderEnablerRemoteV20 HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
User-Agent: Axis2
Host: L3AW203:8081
Content-Length: 1108

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <sendSMS xmlns:ns4="http://com.osa.mdsp.enabler.sei.exception/SMSEnabler/V2_0" 
             xmlns:ns3="http://com.osa.mdsp.enabler.sei.eto/SMSEnabler/V2_0" 
             xmlns:ns2="http://com.osa.mdsp.enabler.ecf" 
             xmlns="http://com.osa.mdsp.enabler.sei/SMSEnabler/V2_0/SMSSenderSEI">
      <ctx />
      <sms>
        <ns3:content>Some message</ns3:content>
        <ns3:earliestDeliveryTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
        <ns3:expiryDate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
        <ns3:priority xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
        <ns3:recipient xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
        <ns3:senderAddress xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
        <ns3:contentSentEncoding xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
        <ns3:flash xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
      </sms>
   </sendSMS>
  </soapenv:Body>
</soapenv:Envelope>

I'll now try some wsdl.element combinations in the reference binding as you are and I'll report what happens. It may though be that I'm getting an advantage of having JAXWS annotations in my service interface. 

Simon

> CONTINUED Need help again on binding to external web  service with login authentication
> ---------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2355
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2355
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Axis Binding Extension
>    Affects Versions: Java-SCA-1.1
>         Environment: Windows XP, Eclipse 3.3.2 , tuscany incubating 1.1 , java 6
>            Reporter: Marina Deslaugiers
>         Attachments: Aspen.tcpdump, MDSP-SMSSenderEnablerSEI-V2_0.wsdl, Support.tcpdump, WSmediawebtranslatorwebsms.composite
>
>
> Hi,
> As planned this morning, we have made directly test with the person
> responsible of web service "Nursery" support to users.
> We have detected various problems.
> I attach (I hope joined files will actually be sent otherwise please let me
> know) two "sniff" files at the TCP level on communication with the web
> server "Nursery":
>        - The first one (see Aspen.tcpdump) corresponds to TCP frames sent
> by Tuscany that does not work
>        - The second one (see Support.tcpdump) corresponds to TCP frames
> sent by the Nursery support -after modification (correction) of the Tuscany
> frames- that does work
> Following are the differences and explanations reported by the person
> responsible for the Nursery WS support:
>       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).
>       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
>       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 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.