> -----Original Message-----
> From: Simon Nash [mailto:n...@apache.org]
> Sent: Tuesday, December 06, 2011 2:13 PM
> To: user@tuscany.apache.org
> Subject: Re: Dynamic service references ?
>
> Millies, Sebastian wrote:
> >> -----Original Message-----
> >> From: Simon Nash [mailto:n...@apache.org]
> >> Sent: Sunday, December 04, 2011 7:27 PM
> >> To: user@tuscany.apache.org
> >> Subject: Re: Dynamic service references ?
> >>
> >
[snip]
> > 1. When I specify the uri attribute on the binding.ws instead of the
> wsdlElem,
> > that gets replaced by the wsdlElem in the serialized form. Is that
> intentional?
> >
> I tried doing this and I didn't see what you are describing.  The
> serialized
> XML contained the URI and no wsdlElement, and everything worked fine.

sorry, my bad, I modified the wrong reference in my test case.

> > 2. What is the intended behaviour when I specify BOTH the wsdlElem
> and uri
> > attributes? Shouldn't the explicit uri override the uri retrieved
> from the wsdl?
> > However, that is not what seems to happen.
> >
> According to the SCA 1.0 spec, if there is an explicit URI specified by
> the WSDL,
> the URI in the WSDL takes precedence.  The solution is to use
> wsdl.binding when
> you are specifying a uri attribute.  It doesn't matter if the
> referenced WSDL
> contains a service/port, as these will be ignored if you refer to the
> WSDL using
> wsdl.binding.  I tried doing this with serialization and it worked.
>
[snip]

That is definitely not what I am seeing. With the following composite
file fragment, which contains an URI attribute pointing nowhere,
the service call over the (de)serialized reference still works (apparently
using the wsdl definition). I attach the serialized form of the reference.

<sca:reference name="bapiCostcenterGetList" requires="sca:authentication">
<sca:interface.wsdl
  
interface="urn:sap-com:document:sap:rfc:functions#wsdl.interface(ZWS_BAPI_COSTCENTER_GETLIST)"
 />
  <sca:binding.ws
    
wsdlElement="urn:sap-com:document:sap:rfc:functions#wsdl.port(ZWS_BAPI_COSTCENTER_GETLISTService/ZWS_BAPI_COSTCENTER_GETLIST_D01)"
    uri="foobaz" />
</sca:reference>

Or perhaps I am using the wrong binding. When you say "wsdl.binding" do you mean
the same as "binding.ws" ? I searched for "wsdl.binding" in the spec and the 
book,
but did not find the term. Must I refer to the wsdl in some other way?

-- Sebastian




IDS Scheer Consulting GmbH
Geschäftsführer/Managing Directors: Kamyar Niroumand, Ivo Totev
Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken, Germany - 
Registergericht/Commercial register: Saarbrücken HRB 19681
http://www.softwareag.com

<?xml version='1.0' encoding='utf-8'?>
<composite targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0";
           name="default"
           local="true"
           xmlns="http://www.osoa.org/xmlns/sca/1.0";>
    <component name="default"
               uri="bapicomponent">
        <reference name="bapiCostcenterGetList"
                   requires="authentication">
            <interface.wsdl interface="urn:sap-com:document:sap:rfc:functions#wsdl.interface(ZWS_BAPI_COSTCENTER_GETLIST)" />
            <binding.ws requires="authentication"
                        xmlns:ns1="http://ps.softwareag.com/server-composite/";
                        policySets="ns1:BasicAuthenticationPolicySet"
                        name="bapiCostcenterGetList"
                        uri="foobaz"
                        wsdlElement="urn:sap-com:document:sap:rfc:functions#wsdl.port(ZWS_BAPI_COSTCENTER_GETLISTService/ZWS_BAPI_COSTCENTER_GETLIST_D01)" />
            <callback requires="authentication authentication" />
            <tuscany:businessInterface xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0";
                                       interface="bapi.costcentergetlist.ZWSBAPICOSTCENTERGETLIST" />
            <tuscany:businessInterface xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0";
                                       interface="bapi.costcentergetlist.ZWSBAPICOSTCENTERGETLIST" />
            <tuscany:referenceParameters xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"; />
        </reference>
    </component>
</composite>

Reply via email to