This post is older than a year. Consider some information might not be accurate anymore.
Used: jboss eap v7.1
A quick example of JAX-WS with JBoss EAP 7.1.
Deployment
Log message in the console.
10:28:53,229 INFO [org.jboss.ws.cxf.metadata] (MSC service thread 1-3) JBWS024061: Adding service endpoint metadata: id=org.jboss.as.quickstarts.wshelloworld.HelloWorldServiceImpl
address=http://localhost:8080/helloworld-ws/HelloWorldService
implementor=org.jboss.as.quickstarts.wshelloworld.HelloWorldServiceImpl
serviceName={http://www.jboss.org/eap/quickstarts/wshelloworld/HelloWorld}HelloWorldService
portName={http://www.jboss.org/eap/quickstarts/wshelloworld/HelloWorld}HelloWorld
annotationWsdlLocation=null
wsdlLocationOverride=null
mtomEnabled=false
Web Services Description Language
Get the WSDL
curl http://localhost:8080/helloworld-ws/HelloWorldService?wsdl
Use curl for SOAP request
- Save your soap request in
request.xml
.
URL="http://localhost:8080/helloworld-ws/HelloWorldService"
curl -H "Content-Type: text/xml; charset=utf-8" -d@request.xml $URL > output.xml
SOAPUi
sayHello
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hel="http://www.jboss.org/eap/quickstarts/wshelloworld/HelloWorld">
<soapenv:Header/>
<soapenv:Body>
<hel:sayHello/>
</soapenv:Body>
</soapenv:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:sayHelloResponse xmlns:ns2="http://www.jboss.org/eap/quickstarts/wshelloworld/HelloWorld">
<return>Hello World!</return>
</ns2:sayHelloResponse>
</soap:Body>
</soap:Envelope>
sayHelloToName
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hel="http://www.jboss.org/eap/quickstarts/wshelloworld/HelloWorld">
<soapenv:Header/>
<soapenv:Body>
<hel:sayHelloToName>
<!--Optional:-->
<arg0>Vinh</arg0>
</hel:sayHelloToName>
</soapenv:Body>
</soapenv:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:sayHelloToNameResponse xmlns:ns2="http://www.jboss.org/eap/quickstarts/wshelloworld/HelloWorld">
<return>Hello Vinh!</return>
</ns2:sayHelloToNameResponse>
</soap:Body>
</soap:Envelope>
sayHelloToNames
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hel="http://www.jboss.org/eap/quickstarts/wshelloworld/HelloWorld">
<soapenv:Header/>
<soapenv:Body>
<hel:sayHelloToNames>
<!--Zero or more repetitions:-->
<arg0>Le Mapper</arg0>
<arg0>Vinh</arg0>
</hel:sayHelloToNames>
</soapenv:Body>
</soapenv:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:sayHelloToNamesResponse xmlns:ns2="http://www.jboss.org/eap/quickstarts/wshelloworld/HelloWorld">
<return>Hello Le Mapper & Vinh!</return>
</ns2:sayHelloToNamesResponse>
</soap:Body>
</soap:Envelope>