Hi,

Sorry for the late answer, I, have involved in other (urgent) tasks.

I have not said I did not like the XML mediation approach only that we would have prefer to consider a direct connection first. Anyway, thanks to the code you sent to me, Ant, I have ironed out the problem of the translator web service (RPC-encoded) that I succeded to connect to.

But now, as I have said in my previous mail, I am considering other web services that seems to be "doc literal encoded". I began to try the direct connection to them but I did not succeed.

As these web services are not public ones, I have done a try on a simple (helloworrd) public one without success. Depending, on the binding way (uri, wsdlElement and promoted or not promoted reference) I get different exceptions (some are indicated - within a comment - in the composite files).
So, what is wrong ?

I have opened a JIRA and attached the code I wrote; please, would you mind to verify (and correct if necessary) it or send me an equivalent example that works because I need to make it work rapidly now.


Thanks,
Marina.



Le 21 avr. 08 à 09:45, ant elder a écrit :

You can tell if a wsdl is rpc-encoded by looking for style="rpc" and
use="encoded" in the  <operation> element on the binding. Thats an
old-fashioned way of doing web services, its not compliant with modern
standards, and many WS stacks no longer support it.

Tuscany uses Apache Axis2 for WS support and Axis2 does not support
rpc-encoded. There has been some talk on the Axis2 mailing lists about
adding that support so if that happens Tuscany will pick it up, but I doubt
it will get done in the very near future.

Why don't you like the XML mediation component approach? Even if we did have
support for rpc-encoded there probably would be a manual code-gen step
required so is having to write a mediation component so much different?

   ...ant

On Fri, Apr 18, 2008 at 2:59 PM, Marina Deslaugiers <
[EMAIL PROTECTED]> wrote:

Hi,

Thank you very much to everyone for your answers and contributions.

Despite, it is not really a good news regarding the Translator web
service, we should get some alternative as we have to consider other
external web services. I hope that among them, we will find at least one
using "doc literal encoding";

       by this way, how can I be sure the WSDL use the doc literal
encoding ?

We had a discussion with my colleagues as to decide the best work
direction to choose. Let me try to explain as clearly as possible what we must necessarily succeed to show in our experiment using SCA and Tuscany SCA
Java. We should be able to demonstrate:

         - how to manage in a declarative manner (SCA, SCDL say
.Composite) a ws binding together with various policies (among which
security by authentication) to legacy external web services. "Legacy" means
already existing and already deployed.

         - how it can be achieved successfully using Tuscany.

So, for the moment, we put the interesting proposition (mediation
component ) by Ant aside for possible later use as we wish to go on with
direct external connection - if achievable.

To this end, as I did not succeeded yet in trying your external ws
connection example, I would appreciate if I can send you my code for
verification in case I do not succeed in my tests on another web service. Simon proposed me to send it via a JIRA session but which type of issue do I
choose ? "test", "improvement" ?

Of course, we are still greatly interested in a Tuscany solution to the
RPC-encoded wsdl if it is to come.

Regards,
Marina.


Le 18 avr. 08 à 11:21, ant elder a écrit :

On Fri, Apr 18, 2008 at 9:12 AM, Simon Laws <[EMAIL PROTECTED]>
wrote:

On Thu, Apr 17, 2008 at 7:00 PM, ant elder <[EMAIL PROTECTED]> wrote:

We might not have RPC-encoded support with the Tuscany data binding
framework yet but we do support components using plain XML so isn't
this
exactly the type of situation where thats useful? There could be a
mediation
component with a reference to that remote service which uses Axiom
OMElements or even JavaScript/E4X to invoke the service and
providing a
service interface with the de-XMLed parameters for the web service.
I

can

try coding something like that up later on today for you Marina if
that
would help?

 ...ant

On Thu, Apr 17, 2008 at 6:37 PM, Raymond Feng <[EMAIL PROTECTED]>

wrote:

To echo what Simon Laws said, we don't have support for RPC- encoded

WSDL

operations in Tuscany yet.

 Thanks,
 Raymond
 --------------------------------------------------
 From: "Simon Laws" <[EMAIL PROTECTED]>
 Sent: Thursday, April 17, 2008 10:26 AM
 To: <tuscany-user@ws.apache.org>
 Subject: Re: Need urgent help on binding to external web service

within

Tuscany




 On Thu, Apr 17, 2008 at 5:44 PM, Marina Deslaugiers <
[EMAIL PROTECTED]> wrote:


 Hi,

Thanks for the answer by Simon Laws and his proposition to
open a

JIRA

for

providing my code there.

Before doing so, would you please test the following links of
the

external

web service I try to connect to :

http://159.217.144.79/webservices/Translator.asmx
http://159.217.144.79/webservices/Translator.asmx?WSDL

It seems to be publicly available.

Thanks.

Regards,
Marina.


Le 17 avr. 08 à 13:37, Simon Laws a écrit :

 On Thu, Apr 17, 2008 at 11:02 AM, Marina Deslaugiers <
[EMAIL PROTECTED]> wrote:

 Hi,


Yes I had looked to that demo example and did not succeded
in

making

it
work due to an execution error (which is the same as
below) ;
furthermore, I
noticed the web service was oflline.

I download the new version you indicate to me in your
answer

 say



https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/demos/

xml-bigbank/
but it does not work:

- first, Ant fails because the "build-dependency.xml" file
is



missing;

 -> I do not know whether it is correct but I have used the

one

provided
in the previous version of the xml-bigbank
- after that I get the following execution error:

=======================
ant runBuildfile: build.xml
run:
     [java] Exception in thread "main"
javax.xml.stream.FactoryConfigurationError: Provider
com.bea.xml.stream.MXParserFactory not found
  [java]     at

javax.xml.stream.FactoryFinder.newInstance (FactoryFinder.java:72)

  [java]     at

javax.xml.stream.FactoryFinder.find(FactoryFinder.java:176)
  [java]     at
javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92)
  [java]     at

javax.xml.stream.XMLInputFactory.newInstance (XMLInputFactory.java:136)

  [java]     at





org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntimeBuilde r.createContributionService(ReallySmallRuntimeBuilder.java:181)

  [java]     at





org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime.start (ReallySmallRuntime.java:129)

  [java]     at





org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>( DefaultSCADomain.java:99)

  [java]     at





org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance (SCADomain.java:230)

  [java]     at





org.apache.tuscany.sca.host.embedded.SCADomain.newInstance (SCADomain.java:69)

  [java]     at

bigbank.BigBankClient.main(BigBankClient.java:30)

  [java] Java Result: 1

BUILD SUCCESSFUL
Total time: 2 seconds
=======================

So I cannot go forward on my problem with connecting to
the

external

web
service. Can you still help please; I can send you my
coding

if

it

helps.

In your answer, you mentionned "the trunk"; what and where
is

it

?


Regards,
Marina.


Le 15 avr. 08 à 18:37, Luciano Resende a écrit :

 Have you looked in the XML BigBank demo application ?
This

utilizes

a


 external stock quote web services. Note that the 1.1
service

that

was
in use has gone offline, and the trunk or 1.2 version of
the
application should work for you, as we changed the
service

in

use.


[1]


https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/

demos/xml-bigbank/

On Tue, Apr 15, 2008 at 9:30 AM, Marina Deslaugiers
<[EMAIL PROTECTED]> wrote:

 Hello,


 I have began to work on SCA and Tuscany SCA Java a
few

time

ago

and I
would
greetly need your help as I have been asked to
urgently >




contribute

to
an
experimentation using SCA and Tuscany Java. This

experimentation

especially
involves already existing and deployed business web

services.


 I have read various documents on SCA and in
particular

the

very

nice
article "Introducing SCA" by David Chappell &
Associates.

Reading

this
paper
- in particular, the section "putting together:

illustrating

an

SCA
application and the corresponding figure - I was
convinced

that

it

was
possible to use binding.ws to connect from a SCA
domain to

a

non-SCA
web
service as well as from a SCA domain to a web service
in

another

SCA
domain
- say invoke an external non-SCA web service or an > >


extra-SCAdomain

web
service.

 However, after installing and experiencing with
tuscany-sca-1.1-incubating
I did not succeeded once on invoking an external SOAP

(asmx)

web

service,
whatever I use binding.ws uri= ... or
binding.wswsdlElement



 etc..

Depending
on the description of binding.ws in the composite
file, I

get
a

different
execution exception (service not found in WSDL,
reflect.UndeclaredThrowableException, ClassCast
Exception

...)


 Moreover, I do not see any corresponding examples in

Tuscany

Java.

 So my question is : does this work in Tuscany SCA
Java

1.1

?
If

the
answer
is yes, would you please provide me with an
corresponding

working

example
(because in that case, I obvioulsy have made a mistake

somewhere

in
the code
or composite description )? If the answer is no, is
there

another

already
available version in which that is working  or a
planned

version

within a
few months ?

 Thanks very much.

 Regards,
 Marina.






--
Luciano Resende
Apache Tuscany Committer

http://people.apache.org/~lresende<http:// people.apache.org/%7Elresende>
<http://people.apache.org/%7Elresende>

<http://people.apache.org/%7Elresende>

<http://people.apache.org/%7Elresende>

<http://people.apache.org/%7Elresende>

http://lresende.blogspot.com/



------------------------------------------------------------ ---------

To unsubscribe, e-mail:

[EMAIL PROTECTED]

For additional commands, e-mail:

[EMAIL PROTECTED]





------------------------------------------------------------- --------

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:

[EMAIL PROTECTED]


Hi Marina


If you can send you sample that shows the problem and the
WSDL

for

the

external service you are trying to contact then one of us and

give

it

a

go
and see what is going on. Is the external service publicly

available

on

the
internet?

If you are able to do this the best thing to do is to open a

JIRA

(

http://issues.apache.org/jira/browse/TUSCANY) and attach the

code


there.

Attachments to posts to the mailing list are often removed by

the

mail

infrastructure.


As a bit of backgroun, in SCA the way that you would talk to
an


 external

web
service is by configuring binding.ws with the WSDL for the

external

service
as part of a component reference. So, for example, you would

expect
to

see a
.composite file along the following lines  (I took this from
the


 Tuscany

sample helloworld-ws-reference).


  <component name="HelloTuscanyServiceComponent">
    <implementation.java
class="helloworld.HelloWorldServiceComponent"/>
    <reference name="helloWorldService">
      <binding.ws wsdlElement="


http://helloworld#wsdl.port(HelloWorldService/ HelloWorldSoapPort)<http://helloworld#wsdl.port% 28HelloWorldService/HelloWorldSoapPort%29>
<http://helloworld#wsdl.port%28HelloWorldService/
HelloWorldSoapPort%29>

<http://helloworld#wsdl.port%28HelloWorldService/ HelloWorldSoapPort
%29>

<
http://helloworld#wsdl.port%28HelloWorldService/HelloWorldSoapPort
%29>

"/>
    </reference>
  </component>

The component implementation

(helloworld.HelloWorldServiceComponent)

would
be something like.

public class HelloWorldServiceComponent implements

HelloWorldService
{


  @Reference
  HelloWorldService helloWorldService;

  public String getGreetings(String name) {
      System.out.println("Called getGreetings");
      return helloWorldService.getGreetings(name);
  }
}

So you can see that all that the SCA service component needs
to

do

is

use
the reference proxy that is automatically injected into it.
The

details

of
this reference proxy are of course worked out by the runtime

using

the

information gained from the <binding.ws wsdlElement="


http://helloworld#wsdl.port(HelloWorldService/ HelloWorldSoapPort)<http://helloworld#wsdl.port% 28HelloWorldService/HelloWorldSoapPort%29>
<http://helloworld#wsdl.port%28HelloWorldService/
HelloWorldSoapPort%29>

<http://helloworld#wsdl.port%28HelloWorldService/ HelloWorldSoapPort
%29>

<
http://helloworld#wsdl.port%28HelloWorldService/HelloWorldSoapPort
%29>

"/>
element. In this case the binding and service from the  WSDL

look

something
like.

....
  <wsdl:binding name="HelloWorldSoapJmsBinding"

type="tns:HelloWorld">

      <wsdlsoap:binding style="document" transport="
http://schemas.xmlsoap.org/soap/jms"/>
      <wsdl:operation name="getGreetings">
          <wsdlsoap:operation soapAction=""/>
          <wsdl:input name="getGreetingsRequest">
              <wsdlsoap:body use="literal"/>
          </wsdl:input>
          <wsdl:output name="getGreetingsResponse">
              <wsdlsoap:body use="literal"/>
          </wsdl:output>
      </wsdl:operation>
  </wsdl:binding>

  <wsdl:service name="HelloWorldService">
      <wsdl:port binding="tns:HelloWorldSoapBinding"
name="HelloWorldSoapPort">
          <wsdlsoap:address location="
http://localhost:8085/HelloWorldService"/>
      </wsdl:port>
  </wsdl:service>

</wsdl:definitions>

So the reference should target the service at the location

defined

by

the
<wsdlsoap:address location="

http://localhost:8085/HelloWorldService
"/>

element. In your case there maybe some feature of the WSDL that

is

upsetting
the runtime and that we haven;t taken account of. The only
way

to


really

tell is if we can try the WSDL.

Hope this helps.

Simon




--------------------------------------------------------------- ------

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]

OK, thanks Marina. I can see that endpoint. There is a problem
in

the

way


 that Tuscany interprets the style of this WSDL as I don't
believe we

have

done any testing with web services that are not using doc literal

wrapped

encoding. I'm sure someone will jump in here and correct me if I'm

wrong.

We

need to look at the code and see what it thinks it's dong when
it

encounters

rpc-encoded.

Thanks

Simon




----------------------------------------------------------------- ----
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 Ant

That sounds plausible and actually a kind of neat example of the value
of
mediation components. I note there was a JIRA for rpc encoded support
(
http://issues.apache.org/jira/browse/TUSCANY-88) that was closed a
while
back. I'm of a mind to open another one as the Web Service binding
spec
says
all options supported in the WSDL binding should be supported.

Simon


Ok, i've reopened that now.

  ...ant



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to