Hi,
Please tell us what's the SMX version you're using?
And did you see any exception in $SMX_HOME/data/log/servicemix.log?
You can use netstat tool to see if there's really a port listening on
8092.
Also we have cxf-wsdl-first(for JBI package) and cxf-wsdl-first-osgi-
package(for OSGi package) examples shipped with kit, it's should be
good start for you if you're new with SMX.
Freeman
On 2012-2-23, at 下午6:53, baleado wrote:
Hi,
I'm new with ServiceMix and I'm having some problems on create a
simple web
service soap.
I create a the project teste-bundle that is my bundle. In resources
folder I
copied my wsdl and created the beans.xml with the cxfbc:consumer and
cxfse:endpoint.
<?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:cxfse="http://servicemix.apache.org/cxfse/1.0"
xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
xmlns:calculator="http://www.example.org/teste/"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://servicemix.apache.org/cxfse/1.0
http://servicemix.apache.org/cxfse/1.0/servicemix-cxf-se.xsd">
<cxfbc:consumer
wsdl="classpath:teste.wsdl"
targetService="calculator:CalculatorService"
targetInterface="calculator:Calculator"/>
<cxfse:endpoint>
<cxfse:pojo>
<bean class="servicemix.calculator.CalculatorImpl" />
</cxfse:pojo>
</cxfse:endpoint>
<bean class="org.apache.servicemix.common.osgi.EndpointExporter" />
</beans>
My implementation class I put some anotations:
@WebService(
serviceName = "CalculatorService",
endpointInterface = "org.example.teste.Calculator",
targetNamespace = "http://www.example.org/teste/")
public class CalculatorImpl implements Calculator{
@Override
public SumResponse sum(SumRequest arg0) {
SumResponse response = new SumResponse();
response.setOut("" + (arg0.getNum1() + arg0.getNum2()));
return response;
}
}
And in my wsdl I define the soap address:
<wsdl:service name="CalculatorService">
<wsdl:port binding="tns:CalculatorSoapBinding"
name="CalculatorPort">
<soap:address location="http://localhost:8092/Calculator/"/>
</wsdl:port>
</wsdl:service>
In my servicemix console I can see the bundle Active. But I can't
reach the
wsdl from my browser, what I'm doing wrong?
--
View this message in context:
http://servicemix.396122.n5.nabble.com/web-service-SOAP-bundle-tp5507663p5507663.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
---------------------------------------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com