You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Angel E Tomala Reyes <ae...@us.ibm.com> on 2009/03/13 10:56:17 UTC

Unable to reference an external webservice


All:
      I am trying to access a webservice that is being deployed in the same
box, except these was done using standard webservices.  I created a
composite that makes reference to this service.  My WAR project has access
to the WSDL's client proxy and appropriate interface for the service;
However I am getting exceptions getting the service I created started.  You
wil find the exception bellow.  I am using IBM WAS 7.0.0.3 with sca FP.  I
have deployed my war making sure I correct the classloading settings.

Here is my composite:

<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" name="CloudServices"
targetNamespace="http://www.ibm.com/cloud/services"
xmlns:cloud="http://www.ibm.com/cloud/services">
  <component name="SOAP">
    <implementation.java
class="com.ibm.cloud.services.api.impl.CloudAPIWebServiceImpl"/>
      <reference name="accountManager">
            <interface.java
interface="com.ibm.cloud.account.AccountManagement"/>
                  <binding.ws
wsdlElement="http://www.ibm.com/cloud/Account/#wsdl.port
(AccountManagement/AccountManagementSOAP)"/>
            </reference>
    <service name="CloudAPIWebService">:
      <interface.java
interface="com.ibm.cloud.services.api.CloudAPIWebService"/>
      <binding.ws/>
    </service>.
  </component>.
</composite>

Here is a portion of my implementation class

 */
public class CloudAPIWebServiceImpl implements CloudAPIWebService {
      @Reference
      protected AccountManagement accountManager;
      /*

Here is the exception:

/09 5:43:26:544 EDT] 0000002a webapp        I
com.ibm.ws.webcontainer.webapp.WebGroupImpl WebGroup SRVE0169I: Loading Web
Module: services.war.
[3/13/09 5:43:26:563 EDT] 0000002a WASSessionCor I SessionContextRegistry
getSessionContext SESN0176I: Will create a new session context for
application key default_hostservices
[3/13/09 5:43:26:573 EDT] 0000002a WebAppServlet I   ContextPath: /services
[3/13/09 5:43:26:597 EDT] 0000002a NodeImpl      I   Creating node: null
[3/13/09 5:43:26:921 EDT] 0000002a NodeImpl      I   Loading contribution:
file:/opt/IBM/SDP/runtimes/base_v7/profiles/AppSrv02/installedApps/linux-u529Node01Cell/EAR.ear/services.war/
[3/13/09 5:43:27:101 EDT] 0000002a ExtensibleStA W   Element
{http://www.osoa.org/xmlns/sca/1.0}binding.ws cannot be processed.
([row,col {unknown-source}]: [6,10])
[3/13/09 5:43:27:103 EDT] 0000002a ExtensibleStA W
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
  Element {http://www.osoa.org/xmlns/sca/1.0}binding.ws cannot be
processed. ([row,col {unknown-source}]: [6,10])
[3/13/09 5:43:27:118 EDT] 0000002a ExtensibleStA W   Element
{http://www.osoa.org/xmlns/sca/1.0}binding.ws cannot be processed.
([row,col {unknown-source}]: [10,7])
[3/13/09 5:43:27:119 EDT] 0000002a ExtensibleStA W
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
  Element {http://www.osoa.org/xmlns/sca/1.0}binding.ws cannot be
processed. ([row,col {unknown-source}]: [10,7])
[3/13/09 5:43:27:563 EDT] 0000002a ComponentRefe W
org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl
  No targets for reference: Composite =
{http://www.ibm.com/cloud/services}CloudServices Reference = accountManager
[3/13/09 5:43:27:565 EDT] 0000002a NodeImpl      I   Starting node: null
[3/13/09 5:43:27:588 EDT] 0000002a webapp        W
com.ibm.ws.webcontainer.webapp.WebApp initializeStaticFileHandler
SRVE0278E: Error while adding servlet mapping --> /*.
[3/13/09 5:43:27:592 EDT] 0000002a webcontainer  I
com.ibm.ws.wswebcontainer.VirtualHost addWebApplication SRVE0250I: Web
Module null has been bound to default_host
[*:9080,*:80,*:9443,*:5060,*:5061,*:443].
[3/13/09 5:43:27:631 EDT] 0000002a ApplicationMg A   WSVR0221I: Application
started: EAR


here is a list of all of the jars included in my path:
activation-1.1.jar
annogen-0.1.0.jar
asm-all-3.1.jar
axiom-api-1.2.7.jar
axiom-dom-1.2.7.jar
axiom-impl-1.2.7.jar
axis2-adb-1.4.1.jar
axis2-codegen-1.4.1.jar
axis2-java2wsdl-1.4.1.jar
axis2-kernel-1.4.1.jar
axis2-mtompolicy-1.4.1.jar
axis-ant-1.4.jar
backport-util-concurrent-3.1.jar
bcprov-jdk15-132.jar
cglib-nodep-2.2.jar
commons-codec-1.3.jar
commons-collections-3.1.jar
commons-discovery-0.2.jar
commons-fileupload-1.2.jar
commons-httpclient-3.1.jar
commons-io-1.4.jar
commons-logging-1.1.1.jar
dom4j-1.6.1.jar
geronimo-activation_1.1_spec-1.0.1.jar
geronimo-javamail_1.4_spec-1.2.jar.
geronimo-jms_1.1_spec-1.1.jar
geronimo-stax-api_1.0_spec-1.0.1.jar
httpcore-4.0-beta1.jar
httpcore-nio-4.0-beta1.jar
jaxb-api-2.1.jar
jaxb-impl-2.1.7.jar
jaxen-1.1.1.jar.
jaxws-api-2.1.jar
jdom-1.0.jar
jsr181-api-1.0-MR1.jar.
junit-3.8.1.jar
log4j-1.2.15.jar
mail-1.4.jar.
mex-1.41-impl.jar
neethi-2.0.4.jar
opensaml-1.1.jar
rampart-core-1.4.jar
rampart-policy-1.4.jar.
rampart-trust-1.4.jar
stax-api-1.0-2.jar
tuscany-assembly-1.5-SNAPSHOT.jar
tuscany-assembly-xml-1.5-SNAPSHOT.jar
tuscany-assembly-xsd-1.5-SNAPSHOT.jar
tuscany-binding-sca-1.5-SNAPSHOT.jar
tuscany-binding-sca-xml-1.5-SNAPSHOT.jar
tuscany-binding-ws-1.5-20090213.002806-3.jar
tuscany-binding-ws-axis2-1.5-20090213.002806-3.jar
tuscany-binding-ws-axis2-policy-1.5-20090213.002806-3.jar
tuscany-binding-ws-wsdlgen-1.5-20090213.002806-3.jar
tuscany-binding-ws-xml-1.5-20090213.002806-3.jar.
tuscany-contribution-1.5-SNAPSHOT.jar
tuscany-contribution-impl-1.5-SNAPSHOT.jar
tuscany-contribution-java-1.5-SNAPSHOT.jar
tuscany-contribution-namespace-1.5-SNAPSHOT.jar
tuscany-contribution-xml-1.5-SNAPSHOT.jar
tuscany-core-1.5-SNAPSHOT.jar
tuscany-core-databinding-1.5-20090213.002806-3.jar
tuscany-core-spi-1.5-SNAPSHOT.jar
tuscany-databinding-1.5-SNAPSHOT.jar
tuscany-databinding-axiom-1.5-20090213.002806-3.jar
tuscany-databinding-jaxb-1.5-SNAPSHOT.jar
tuscany-databinding-jaxb-axiom-1.5-20090213.002806-3.jar
tuscany-definitions-1.5-SNAPSHOT.jar
tuscany-definitions-xml-1.5-SNAPSHOT.jar
tuscany-endpoint-1.5-20090213.002806-3.jar
tuscany-extensibility-1.5-SNAPSHOT.jar.
tuscany-host-embedded-1.5-20090213.002806-3.jar
tuscany-host-http-1.5-20090213.002806-3.jar.
tuscany-host-webapp-1.5-20090213.002806-3.jar
tuscany-implementation-java-1.5-20090213.002806-3.jar
tuscany-implementation-java-runtime-1.5-20090213.002806-3.jar
tuscany-implementation-java-xml-1.5-20090213.002806-3.jar.
tuscany-implementation-node-1.5-SNAPSHOT.jar.
tuscany-interface-1.5-SNAPSHOT.jar
tuscany-interface-java-1.5-SNAPSHOT.jar
tuscany-interface-java-jaxws-1.5-20090213.002806-3.jar
tuscany-interface-java-xml-1.5-SNAPSHOT.jar
tuscany-interface-wsdl-1.5-20090213.002806-3.jar
tuscany-interface-wsdl-xml-1.5-20090213.002806-3.jar
tuscany-monitor-1.5-SNAPSHOT.jar
tuscany-node-api-1.5-SNAPSHOT.jar
tuscany-node-impl-1.5-20090213.002806-3.jar
tuscany-policy-1.5-SNAPSHOT.jar
tuscany-policy-security-1.5-20090213.002806-3.jar
tuscany-policy-xml-1.5-SNAPSHOT.jar
tuscany-policy-xml-ws-1.5-SNAPSHOT.jar
tuscany-sca-api-1.5-SNAPSHOT.jar
tuscany-sca-api-extension-1.5-SNAPSHOT.jar
tuscany-xsd-1.5-SNAPSHOT.jar
tuscany-xsd-xml-1.5-20090213.002806-3.jar
woden-api-1.0M8.jar
woden-impl-dom-1.0M8.jar
wsdl4j-1.6.2.jar.
wss4j-1.5.4.jar
wstx-asl-3.2.4.jar
xalan-2.7.0.jar
xercesImpl-2.8.1.jar.
xml-apis-1.3.03.jar
xmlParserAPIs-2.6.0.jar
XmlSchema-1.4.2.jar.
xmlsec-1.4.2.jar


Angel E. Tomala-Reyes
IBM Corporation, Enterprise Initiatives
Cloud Computing Enablement
Software Engineer

Re: Unable to reference an external webservice

Posted by Luciano Resende <lu...@gmail.com>.
On Fri, Mar 13, 2009 at 6:43 AM, Angel E Tomala Reyes
<ae...@us.ibm.com> wrote:
> Simon:
> The short answer is no. Because of some issue deploying such as large
> runtime in WAS 7.0.0.1 (Was takes for ever to deploy 17 mb worth of jars), I
> have been creating a shared library in was and associating the library with
> my ear, and war modules. Because the EAR classloader has been set up as
> Parent_Last and application mode, this should ensure that the classes in the
> shared lib are looked at first and are first in line in the classloader for
> the App. BTW the only thing I have in my META-INF is the
> sca-contribution.xml and the MANIFEST.MF, should I have something else?
>

Although I'm not referencing a external ws, I was able to deploy a
Tuscany web application with all dependencies in WEB-INF\lib in a
WebSphere 7.0.0.1 with SCA Fep environment. I had couple issues, and
solutions/workarounds are described in [1].

[1] http://lresende.blogspot.com/2009/03/how-to-use-apache-tuscany-with.html



-- 
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: Unable to reference an external webservice

Posted by Angel E Tomala Reyes <ae...@us.ibm.com>.
Simon:
      The short answer is no.  Because of some issue deploying such as
large runtime in WAS 7.0.0.1 (Was takes for ever to deploy 17 mb worth of
jars), I have been creating a shared library in was and associating the
library with my ear, and war modules.  Because the EAR classloader has been
set up as Parent_Last and application mode, this should ensure that the
classes in the shared lib are looked at first and are first in line in the
classloader for the App.  BTW the only thing I have in my META-INF is the
sca-contribution.xml and the MANIFEST.MF, should I have something else?



Angel E. Tomala-Reyes
IBM Corporation, Enterprise Initiatives
Cloud Computing Enablement
Software Engineer



                                                                           
             Simon Laws                                                    
             <simonslaws@googl                                             
             email.com>                                                 To 
                                       user@tuscany.apache.org             
             03/13/2009 08:08                                           cc 
             AM                                                            
                                                                   Subject 
                                       Re: Unable to reference an external 
             Please respond to         webservice                          
             user@tuscany.apac                                             
                  he.org                                                   
                                                                           
                                                                           
                                                                           
                                                                           




Hi Angel

It's complaining that it can't find the stax processor for binding.ws
which is in this jar

tuscany-binding-ws-xml.jar

You've got this on your list but the processor is loaded because there
is an entry for it in the META-INF/services directory in that jar.
Hence that jar needs to be on the classpath that is provided to the
Tuscany runtime.

Are all the Tuscany 1.5 jars packaged inside the WAR that you're deploying?

Simon

Re: Unable to reference an external webservice

Posted by Simon Laws <si...@googlemail.com>.
Hi Angel

It's complaining that it can't find the stax processor for binding.ws
which is in this jar

tuscany-binding-ws-xml.jar

You've got this on your list but the processor is loaded because there
is an entry for it in the META-INF/services directory in that jar.
Hence that jar needs to be on the classpath that is provided to the
Tuscany runtime.

Are all the Tuscany 1.5 jars packaged inside the WAR that you're deploying?

Simon