Hi, Marina.
I managed to run the sample successfully with a few tweaks:
1) Make sure we use the correct port name in <binding.ws
wsdlElement="http://tempuri.org/#wsdl.port(HelloWorld/HelloWorldSoap)"/>.
The port name was wrong in the attached test case (HelloWorldSoapPort).
2) I need to comment out the HTTP proxy system properties
With 1 & 2, I run into the NPE as you see. The problem here is that the java
interface is not compatible with the WSDL operation. sayHello() should
return a String instead of void.
3) I change the sayHello() to return String.
With 1, 2 and 3, everything works fine.
I think we should do a better job in detecting the interface
incompatibility. We can open a JIRA to track that.
Thanks,
Raymond
--------------------------------------------------
From: "Marina Deslaugiers" <[EMAIL PROTECTED]>
Sent: Thursday, April 24, 2008 6:37 AM
To: "ant elder (JIRA)" <[EMAIL PROTECTED]>
Subject: Re: [jira] Commented: (TUSCANY-2268) Exceptions errors on binding
toexternal web services
Hi,
Thanks for your quick answer and corrections. With regards to the error
in the composite file I have made it by inattention (I did not make that
mistake in my previous tries :=) ). Concerning the @Remotable annotation
I began to indicate it as I thought it was mandatory; but as I had still
an error and that it was not indicated in the "translate" code you write
for me (why is it not necessary in that case ?), I made a try without
that annotation.
However, after the corrections, it still does not work:
1) if I use
<binding.ws uri="http://tempuri.org/#wsdl.port(HelloWorld/
HelloWorldSoap)"/>
I get the following exception:
<!--
...
WS helloworld appele
Exception in thread "main"
java.lang.reflect.UndeclaredThrowableException
at $Proxy7.sayHello(Unknown Source)
at helloworld.HelloworldImpl.sayHello(HelloworldImpl.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.tuscany.sca.implementation.java.invocation.JavaImplementation
Invoker.invoke(JavaImplementationInvoker.java:105)
at
org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invo
ke(PassByValueInterceptor.java:88)
at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke
(JDKInvocationHandler.java:249)
at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke
(JDKInvocationHandler.java:146)
at $Proxy7.sayHello(Unknown Source)
at helloworld.HelloworldClient.main(HelloworldClient.java:23)
Caused by: org.apache.axis2.AxisFault: Transport error: 405
Error: Method Not Allowed
....
-->
1) if I use
<binding.ws wsdlElement="http://tempuri.org/#wsdl.port
(HelloWorld/HelloWorldSoap)"/>
I get the following exception:
<!--
WS helloworld appele
Exception in thread "main"
org.apache.tuscany.sca.databinding.TransformationException:
java.lang.NullPointerException
at
org.apache.tuscany.sca.core.databinding.transformers.Output2OutputTransf
ormer.transform(Output2OutputTransformer.java:199)
at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate
(MediatorImpl.java:73)
at
org.apache.tuscany.sca.core.databinding.wire.DataTransformationIntercept
or.transform(DataTransformationInterceptor.java:175)
at
org.apache.tuscany.sca.core.databinding.wire.DataTransformationIntercept
or.invoke(DataTransformationInterceptor.java:158)
at
org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke
(JDKInvocationHandler.java:249)
at
org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke
(JDKInvocationHandler.java:146)
at $Proxy6.sayHello(Unknown Source)
at helloworld.HelloworldImpl.sayHello(HelloworldImpl.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.tuscany.sca.implementation.java.invocation.JavaImplementation
Invoker.invoke(JavaImplementationInvoker.java:105)
at
org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invo
ke(PassByValueInterceptor.java:88)
at
org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke
(JDKInvocationHandler.java:249)
at
org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke
(JDKInvocationHandler.java:146)
at $Proxy6.sayHello(Unknown Source)
at helloworld.HelloworldClient.main(HelloworldClient.java:23)
Caused by: java.lang.NullPointerException
at
org.apache.tuscany.sca.databinding.impl.MediatorImpl.getTransformerChain
(MediatorImpl.java:146)
-->
I get the same If I promote the reference from the composite.
Besides, to answer your demand, I get no service code as I connect to a
non-SCA (external) web service. So, It brings me back to the primary
question in my first e-mail in the mail thread: is it achievable in
Tuscany to use binding.ws to connect from a SCA domain to a non-SCA (so
external) web service ?
Regards,
Marina.
Le 24 avr. 08 à 12:37, ant elder (JIRA) a écrit :
[ https://issues.apache.org/jira/browse/TUSCANY-2268?
page=com.atlassian.jira.plugin.system.issuetabpanels:comment-
tabpanel&focusedCommentId=12591978#action_12591978 ]
ant elder commented on TUSCANY-2268:
------------------------------------
There's two problems I've noticed so far:
- the interface HelloWorld has the @Remotable commented out with the
comment "utile ?", you need this.
Without it when everything else is configured ok you'll get the
following:
[java] Exception in thread "main" java.lang.IllegalArgumentException:
Can't handle mixed payloads betweem OMElements and other types.
- in the .composite files the <binding.ws> has an incorrect port name of
"HelloWorldSoapPort" instead of ""HelloWorldSoap" as defined in the
helloworld.wsdl.
Changing those two things gets the client running for me though i can't
test it fully as I don't have any service running for it. If you still
have trouble invoking the service post the service code so i can help
debug that. Apologies that the error messages given for those two
problems are so unhelpful, more meaningfull messages would have made
that much easier to debug.
Exceptions errors on binding to external web services
-----------------------------------------------------
Key: TUSCANY-2268
URL: https://issues.apache.org/jira/browse/ TUSCANY-2268
Project: Tuscany
Issue Type: Bug
Components: Java SCA Axis Binding Extension
Affects Versions: Java-SCA-1.1
Environment: Windows XP, Eclipse 3.3.0 , tuscany incubating
1.1 , java 6
Reporter: Marina Deslaugiers
Attachments: ws-webhelloworld.zip
Hi,
I am considering 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 attach 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.