You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Marina Deslaugiers <ma...@orange-ftgroup.com> on 2008/04/24 15:37:56 UTC

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.
>


Re: [jira] Commented: (TUSCANY-2268) Exceptions errors on binding toexternal web services

Posted by ant elder <an...@gmail.com>.
>From what you have below only the

         <binding.ws wsdlElement="http://tempuri.org/#wsdl.port
(HelloWorld/HelloWorldSoap)"/>

makes sense as the uri attribute should be the actual endpoint of the web
service, eg something like "
http://159.217.144.79/webservices/HelloWorld.asmx".

The exception thats giving indicates that the request has been sent, a
response has been received and that something has gone wrong while
processing the response. Do you have something like TCPMON available so you
could capture the response XML and post it here so we can see what it looks
like?

You're right, the @Remotable annotation should really have been used on the
translate example, just luck in the Tuscany implementation and using XML
style services meant the example worked in that case anyway without the
annotation,

   ...ant

On Thu, Apr 24, 2008 at 2:37 PM, Marina Deslaugiers <
marina.deslaugiers@orange-ftgroup.com> wrote:

> 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/<http://tempuri.org/#wsdl.port%28HelloWorld/>
> 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.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:105)
>          at
> org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(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.Output2OutputTransformer.transform(Output2OutputTransformer.java:199)
>          at
> org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate(MediatorImpl.java:73)
>          at
> org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.transform(DataTransformationInterceptor.java:175)
>          at
> org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.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.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:105)
>          at
> org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(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.
> >
> >
>