Re: URGENT - CONTINUED Need help again on binding to external web service with login authentication within Tuscany
On Fri, May 30, 2008 at 11:25 AM, Marina Deslaugiers [EMAIL PROTECTED] wrote: 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. Le 29 mai 08 à 18:30, Marina Deslaugiers a écrit : Hi, Thanks for the answer. Hi Marina ... We need to collect a bit more information before deciding what to do. ... So firstly do you know what the response SOAP message looks like on the wire. Well, at the moment, I do not know anything about that. So I have managed to directly test - tomorrow morning - with the person responsible of web service support to users (who uses sniffers). I hope we would be able to get and provide you with the information on the response SOAP message. In the meantime, below are the policy definitions.xml file and the ClientPWCBHandler.java file. Also can you show me what you security policy looks like (obviously be careful not to disclose any confidential information such as real usernames or passwords on the mail list)? == definitions.xml file ?xml version=1.0 encoding=ASCII? !-- * Licensed to the Apache Software Foundation (ASF) under one * * under the License. -- sca:definitions xmlns=http://www.osoa.org/xmlns/sca/1.0; targetNamespace=http://www.osoa.org/xmlns/sca/1.0 xmlns:sca=http://www.osoa.org/xmlns/sca/1.0; xmlns:tuscany= http://tuscany.apache.org/xmlns/sca/1.0; xmlns:sms=http://sample; !-- WS Security POLICY SETS -- sca:policySet name=sms:wsClientAuthenticationPolicy provides=sca:authentication appliesTo=sca:reference/sca:binding.ws tuscany:wsConfigParam parameter name=OutflowSecurity action itemsUsernameToken/items usermyUsername/user passwordCallbackClasstranslatewithsms.ClientPWCBHandler/passwordCallbackClass + passwordTypePasswordText/passwordType /action /parameter /tuscany:wsConfigParam /sca:policySet /sca:definitions == == ClientPWCBHandler.java file /* * Licensed to the Apache Software Foundation (ASF) under one * ... * under the License. */ package translatewithsms; import java.io.IOException; import javax.security.auth.callback.Callback; import javax.security.auth.callback.CallbackHandler; import javax.security.auth.callback.UnsupportedCallbackException; import org.apache.ws.security.WSPasswordCallback; /** * Sample userid passwd generation class */ public class ClientPWCBHandler implements CallbackHandler { public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { System.out.println(*** PASSAGE DANS HANDLE de ClientPWCBHandler); for (int i = 0; i callbacks.length; i++) {
Re: URGENT - CONTINUED Need help again on binding to external web service with login authentication within Tuscany
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. Le 29 mai 08 à 18:30, Marina Deslaugiers a écrit : Hi, Thanks for the answer. Hi Marina ... We need to collect a bit more information before deciding what to do. ... So firstly do you know what the response SOAP message looks like on the wire. Well, at the moment, I do not know anything about that. So I have managed to directly test - tomorrow morning - with the person responsible of web service support to users (who uses sniffers). I hope we would be able to get and provide you with the information on the response SOAP message. In the meantime, below are the policy definitions.xml file and the ClientPWCBHandler.java file. Also can you show me what you security policy looks like (obviously be careful not to disclose any confidential information such as real usernames or passwords on the mail list)? == definitions.xml file ?xml version=1.0 encoding=ASCII? !-- * Licensed to the Apache Software Foundation (ASF) under one * * under the License. -- sca:definitions xmlns=http://www.osoa.org/xmlns/sca/1.0; targetNamespace=http://www.osoa.org/xmlns/sca/1.0; xmlns:sca=http://www.osoa.org/xmlns/sca/1.0; xmlns:tuscany=http://tuscany.apache.org/xmlns/sca/1.0; xmlns:sms=http://sample; !-- WS Security POLICY SETS -- sca:policySet name=sms:wsClientAuthenticationPolicy provides=sca:authentication appliesTo=sca:reference/sca:binding.ws tuscany:wsConfigParam parameter name=OutflowSecurity action itemsUsernameToken/items usermyUsername/user passwordCallbackClasstranslatewithsms.ClientPWCBHandler/ passwordCallbackClass + passwordTypePasswordText/passwordType /action /parameter /tuscany:wsConfigParam /sca:policySet /sca:definitions == == ClientPWCBHandler.java file /* * Licensed to the Apache Software Foundation (ASF) under one * ... * under the License. */ package translatewithsms; import java.io.IOException; import javax.security.auth.callback.Callback; import javax.security.auth.callback.CallbackHandler; import javax.security.auth.callback.UnsupportedCallbackException; import org.apache.ws.security.WSPasswordCallback; /** * Sample userid passwd generation class */ public class ClientPWCBHandler implements CallbackHandler { public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { System.out.println(*** PASSAGE DANS HANDLE de ClientPWCBHandler); for (int i = 0; i callbacks.length; i++) { System.out.println(*** Calling Client UserId/Password Handler ); WSPasswordCallback
Re: SDO in Eclipse Plug-in
Tomasz, Sorry for the delay in my reply, I've been extremely busy with work recently. I'd like to suggest that you import your plug-ins into your Eclipse workspace as plug-in projects and run them from there for testing. Then you won't have to copy them to your Eclipse directory every time you make a change and you can take advantage of all the Eclipse PDE Tools. Anyway, on to your problem. You said you saw two new plug-ins, org.apache.tuscany.sdo.lib and org.apache.tuscany.sdo.spec. Are you also seeing impl and tools as available plug-ins? If not, that will be a problem. Also, for the buddy policy to work correctly, the SDO plug-ins need to depend on each other. Here's how my SDO dependencies are set up in my manifests: org.apache.tuscany.sdo.impl depends on org.apache.tuscany.sdo.spec org.apache.tuscany.sdo.lib depends on org.apache.tuscany.sdo.spec org.apache.tuscany.sdo.impl org.apache.tuscany.spec and org.apache.tuscany.tools don't need to depend on the other SDO plug-ins One final note. What version of EMF are you running with? Tuscany officially requires EMF 2.2.3, but it may also work with 2.3 (which comes with Eclipse 3.3). It will NOT work with EMF 2.4, but you probably wouldn't have that unless you're using Eclipse 3.4. I hope some of that helps. Write me back with any more questions and I'll try to be a little more responsive in the future. :-) Regards, Eric Tomasz Klukowski [EMAIL PROTECTED] wrote on 05/20/2008 04:47:51 PM: [image removed] Re: SDO in Eclipse Plug-in Tomasz Klukowski to: tuscany-user 05/20/2008 04:58 PM Please respond to tuscany-user. Eric, As you wrote, I had Tuscany in four .jar (api, impl, lib, tools) files added to my build-path. I appended the line: Eclipse-BuddyPolicy: dependent to the each MANIFEST.MF file, but it did not help very much - earlier my plug-in crashed with java.lang.NoClassDefFoundError: org/apache/tuscany/sdo/api/SDOUtil (...) Caused by: java.lang.ClassNotFoundException: org.apache.tuscany.sdo.api.SDOUtil at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass (BundleLoader.java:402) and now it crashes with java.lang.ExceptionInInitializerError (...) Caused by: java.lang.NullPointerException at org.apache.tuscany.sdo.api.SDOUtil.clinit(SDOUtil.java:48) Then I copied these .jar files to /usr/lib/eclipse/plugins/ and ran eclipse -clean Two new plug-ins were found: org.apache.tuscany.sdo.lib and org.apache.tuscany.sdo.spec. I added them to the required plug-ins, but it did not change anything. What am I doing wrong? below is the fragment of code and the error log: try { scope = SDOUtil.createHelperContext(); } catch (Throwable e) { e.printStackTrace(); } my error log: java.lang.ExceptionInInitializerError at omegaomegavisio.Activator.init(Activator.java:47) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator (AbstractBundle.java:136) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start (BundleContextImpl.java:962) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker (BundleHost.java:317) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start (AbstractBundle.java:256) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:342) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.preFindLocalClass (EclipseLazyStarter.java:88) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass (ClasspathManager.java:412) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass (DefaultClassLoader.java:189) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass (BundleLoader.java:334) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass (BundleLoader.java:386) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass (BundleLoader.java:347) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass (DefaultClassLoader.java:83) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass (BundleLoader.java:278) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass (BundleHost.java:227) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass (AbstractBundle.java:1245) at
BundleException - unresolved package org.osgi.framework
hy! i would like to use Tuscany to expose services from my OSGi-Bundles, but i get a BundleException, because Felix can't resolve org.osgi.framework. I thougth a OSGi-Container would provide this package - isn't it so? I tested my OSGi-Bundle with Eclipse/Equinox and it worked fine. My project consists of following files, osgi-service.composite: ?xml version=1.0 encoding=UTF-8? composite xmlns=http://www.osoa.org/xmlns/sca/1.0; xmlns:t=http://tuscany.apache.org/xmlns/sca/1.0; name=SomeComposite component name=SomeComponent t:implementation.osgi bundleSymbolicName=com.sample.myBundle / /component /composite com.sample.myBundle.componentType: ?xml version=1.0 encoding=UTF-8? componentType xmlns=http://www.osoa.org/xmlns/sca/1.0; xmlns:t=http://tuscany.apache.org/xmlns/sca/1.0; service name=com.sample.SomeService interface.java interface=com.sample.SomeServiceInterface / /service /componentType and a Main-Class with the following main-method: public static void main(String[] args) { SCADomain domain = SCADomain.newInstance(osgi-service.composite); MotdService service = domain.getService(MotdService.class, SomeComponent/com.sample.SomeService); /* do something with the service */ } Does anybody knows whats my problem? do i have to provide a bundle, which exports the org.osgi.framework package myself? Thx for your answers, Eugene