Hi,

I'm not sure what your question is? Do you mean your wsdl has
<wsdl:import
location="http://localhost:8181/cxf/JavaFirstGreeting?wsdl=CXFGreeting.wsdl "
namespace="http://javafirst.ws.cxf.mindrefactoring.com/";></wsdl:import>
which isn't what you expected?

If so, try put SEI and ServiceImpl class into same package.

Freeman
On 2012-5-12, at 上午8:43, vs.souza wrote:

Hello friends,

I deployed the cxf-osgi example with success and after that I started to try to reproduce the example on my own. I compared my project with the example one and everything looks okay but I see problems when I invoke my Webservice
wsdl. The response I get from my Service WSDL is this:
*

<wsdl:definitions xmlns:ns1="http://javafirst.ws.cxf.mindrefactoring.com/ "
xmlns:ns2="http://schemas.xmlsoap.org/soap/http";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:tns="http://impl.javafirst.ws.cxf.mindrefactoring.com/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
name="CXFGreetingImplementationService"
targetNamespace="http://impl.javafirst.ws.cxf.mindrefactoring.com/";>
<wsdl:import
location="http://localhost:8181/cxf/JavaFirstGreeting?wsdl=CXFGreeting.wsdl " namespace="http://javafirst.ws.cxf.mindrefactoring.com/";></ wsdl:import>
<wsdl:binding name="CXFGreetingImplementationServiceSoapBinding"
type="ns1:CXFGreeting">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="sendGreetings">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="sendGreetings">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="sendGreetingsResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CXFGreetingImplementationService">
<wsdl:port binding="tns:CXFGreetingImplementationServiceSoapBinding"
name="CXFGreetingImplementationPort">
<soap:address location="http://localhost:8181/cxf/JavaFirstGreeting"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
*

My class and interface are very similar to the cxf-osgi example. This is the
class:

*
package com.mindrefactoring.cxf.ws.javafirst.impl;

import javax.jws.WebService;

package com.mindrefactoring.cxf.ws.javafirst;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

@WebService
public interface CXFGreeting {
        @WebMethod
        @WebResult(name="response")
public String sendGreetings(@WebParam(name="greetingName") String name);
        
}
*
and this is the interface:

*
import com.mindrefactoring.cxf.ws.javafirst.CXFGreeting;

@WebService(endpointInterface =
"com.mindrefactoring.cxf.ws.javafirst.CXFGreeting")
public class CXFGreetingImplementation implements CXFGreeting{

        public String sendGreetings(String name) {
                return "Greetings from CXF First Java: Cap'n " + name;
        }

}
*
This is my beans.xml:
*
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xmlns:jaxws="http://cxf.apache.org/jaxws";
 xsi:schemaLocation="
   http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/ jaxws.xsd">

  <jaxws:endpoint id="cxfGreeting"
implementor ="com.mindrefactoring.cxf.ws.javafirst.impl.CXFGreetingImplementation"
address="/JavaFirstGreeting"/>

</beans>*

Not sure if I am missing some dependencies to build the project (couldn't
find out what is missing inspecting cfx-osgi pom.xml files):
*
<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
   <modelVersion>4.0.0</modelVersion>

   <groupId>com.mindrefactoring.cxf</groupId>
   <artifactId>cxf-javafirst-ws</artifactId>
   <version>0.0.1</version>
   <packaging>bundle</packaging>

   <name>MindRefactoring :: Examples :: JavaFirst CXF OSGi </name>
   <description>JavaFirst CXF example using OSGi instead of
JBI</description>

   <properties>
<project.build.sourceEncoding>UTF-8</ project.build.sourceEncoding>
   </properties>

   <dependencies>
       <dependency>
           <groupId>org.apache.felix</groupId>
           <artifactId>org.osgi.core</artifactId>
           <version>1.4.0</version>
           <scope>provided</scope>
       </dependency>
       <dependency>
         <groupId>org.apache.cxf</groupId>
         <artifactId>cxf-rt-frontend-jaxws</artifactId>
         <version>2.6.0</version>
       </dependency>
       <dependency>
         <groupId>org.apache.cxf</groupId>
         <artifactId>cxf-rt-transports-http</artifactId>
         <version>2.6.0</version>
       </dependency>
       <dependency>
           <groupId>org.apache.servicemix</groupId>
           <artifactId>servicemix-utils</artifactId>
           <version>1.5.0</version>
       </dependency>
   </dependencies>

   <build>
       <plugins>
           <plugin>
               <groupId>org.apache.felix</groupId>
               <artifactId>maven-bundle-plugin</artifactId>
               <version>2.2.0</version>
               <extensions>true</extensions>
               <configuration>
                   <instructions>

<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>

<Bundle-Description>${project.description}</Bundle-Description>

<_include>src/main/resources/META-INF/spring/beans.xml</_include>
                       <Import-Package>
                           javax.jws;version="2.0",
                           javax.wsdl,
                           javax.xml.namespace,
                           org.apache.servicemix.util;version="1.5",
                           org.springframework.beans.factory.config
                       </Import-Package>

<Private- Package > com .mindrefactoring .cxf.ws.javafirst,com.mindrefactoring.cxf.ws.javafirst.impl</Private- Package>
                   </instructions>
               </configuration>
           </plugin>
       </plugins>
   </build>

   <profiles>
       <profile>
           <id>build-for-felix</id>
           <dependencies>
               <dependency>
                   <groupId>org.apache.felix</groupId>
                   <artifactId>org.apache.felix.main</artifactId>
                   <version>3.0.7</version>
                   <scope>provided</scope>
               </dependency>
           </dependencies>
           <build>
               <plugins>
                   <plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-antrun-plugin</artifactId>
                       <version>1.6</version>
                       <executions>
                           <execution>
                               <id>compile</id>
                               <phase>package</phase>
                               <goals>
                                   <goal>run</goal>
                               </goals>
                               <configuration>
                                   <target>
<pathconvert property="plugins.jars"
pathsep="${path.separator}">
                                           <path
refid="maven.runtime.classpath"/>
                                           <map
from="${project.build.directory}${file.separator}classes" to=""/>
                                       </pathconvert>
                                       <pathconvert pathsep=" "
property="bundles">
<path path="$ {plugins.jars}"/>
                                           <mapper>
                                               <chainedmapper>
                                                   <flattenmapper/>
<globmapper from="*"
to="file:modules/*" casesensitive="no"/>
                                               </chainedmapper>
                                           </mapper>
                                       </pathconvert>
                                       <propertyfile
file="${project.build.directory}/config.properties">
<entry key="felix.auto.start"
value="${bundles} file:modules/${project.build.finalName}.jar"/>
                                           <entry
key="org.osgi.framework.bootdelegation" value="*"/>
                                       </propertyfile>
                                       <copy
file="$ {maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}"
tofile="${project.build.directory}/felix.jar"/>
                                   </target>
                               </configuration>
                           </execution>
                       </executions>
                   </plugin>
                   <plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-assembly-plugin</artifactId>
                       <version>2.2</version>
                       <executions>
                           <execution>
                               <id>create-executable-jar</id>
                               <phase>package</phase>
                               <goals>
                                   <goal>single</goal>
                               </goals>
                               <configuration>
                                   <descriptors>

<descriptor>${basedir}/src/main/assembly/felix.xml</descriptor>
                                   </descriptors>

<finalName>${project.build.finalName}</finalName>
                               </configuration>
                           </execution>
                       </executions>
                   </plugin>
               </plugins>
           </build>
       </profile>
       <profile>
           <id>run-on-felix</id>
           <dependencies>
               <dependency>
                   <groupId>org.apache.felix</groupId>
                   <artifactId>org.apache.felix.main</artifactId>
                   <version>3.0.7</version>
                   <scope>provided</scope>
               </dependency>

           </dependencies>
           <build>
               <plugins>
                   <plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-antrun-plugin</artifactId>
                       <version>1.6</version>
                       <configuration>
                           <target>
                               <property name="vm.args" value=""/>
                               <pathconvert property="plugins.jars"
pathsep="${path.separator}">
<path refid="maven.runtime.classpath"/>
                                   <map
from="${project.build.directory}${file.separator}classes" to=""/>
                               </pathconvert>
                               <makeurl property="urls" separator=" ">
                                   <path path="${plugins.jars}"/>
                                   <path
location="${project.build.directory}/${project.build.finalName}.jar"/>
                               </makeurl>
                               <propertyfile
file="${project.build.directory}/run.properties">
                                   <entry key="felix.auto.start"
value="${urls}"/>
<entry key="felix.auto.deploy.action"
value="uninstall,install,update,start"/>
<entry key="org.osgi.framework.storage"
value="${project.build.directory}${file.separator}felix-cache"/>
                                   <entry
key="org.osgi.framework.bootdelegation" value="*"/>
                               </propertyfile>
                               <makeurl property="run.properties.url"
file="${project.build.directory}/run.properties"/>
                               <java fork="true"
jar="$ {maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}">
                                   <sysproperty
key="felix.config.properties" value="${run.properties.url}"/>
                                   <jvmarg line="${vm.args}"/>
                               </java>
                           </target>
                       </configuration>
                   </plugin>
               </plugins>
           </build>
       </profile>
   </profiles>
</project>
*

I tried to find a tutorial or guide in google, CXF and ServiceMix page
without success. Do you guys have any ideas about what am I missing?

Thanks and my best regards.

Vinícius.

--
View this message in context: 
http://servicemix.396122.n5.nabble.com/ServiceMix-CXF-SOAP-Webservice-problem-copy-of-cfx-osgi-tp5706032.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ff...@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042










Reply via email to