[JBossWS] - @WebServiceProvider not being deployed
by viniciuscarvalho
Hello there! I'm using JBoss 4.2.0 GA, and after deploying my service it deploys the EJB SLSB but not the endpoint.
Here's my code:
| @Local
| @Stateless
| @WebServiceProvider(wsdlLocation="META-INF/wsdl/CommandProcessor.wsdl",
| targetNamespace="http://www.xxx/xxx/definitions",
| serviceName="CommandProcessorService",
| portName="CommandProcessorPort")
| @ServiceMode(value=Service.Mode.PAYLOAD)
| public class CommandProcessor implements Provider<Source> {
|
| public Source invoke(Source source) {
| return null;
| }
|
| }
|
| WSDL:
|
| <?xml version="1.0" encoding="UTF-8" standalone="no"?>
| <wsdl:definitions
| xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
| xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
| xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
| xmlns:xxx="http://www.xxx/schemas/xxx"
| targetNamespace="http://www.xxx/xxx/definitions"
| xmlns:tns="http://www.xxx/xxx/definitions">
| <wsdl:types>
| <xsd:schema>
| <xsd:import namespace="http://www.xxx/schemas/xxx" schemaLocation="Command.xsd"/>
| </xsd:schema>
|
| </wsdl:types>
|
| <wsdl:message name="CommandRequest">
| <wsdl:part name="CommandRequest" element="xxx:anyCommand"></wsdl:part>
| </wsdl:message>
| <wsdl:message name="CommandResponse">
| <wsdl:part name="CommandResponse" element="xxx:CommandResponse"></wsdl:part>
| </wsdl:message>
|
| <wsdl:portType name="CommandProcessor">
| <wsdl:operation name="process">
| <wsdl:input message="tns:CommandRequest" name="CommandRequest"></wsdl:input>
| <wsdl:output message="tns:CommandResponse" name="CommandResponse"></wsdl:output>
| </wsdl:operation>
| </wsdl:portType>
|
| <wsdl:binding name="CommandProcessorBinding" type="tns:CommandProcessor">
| <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
| <wsdl:operation name="process">
| <soap:operation soapAction="http://www.xxx/xxx/CommandRequest"/>
| <wsdl:input name="CommandRequest">
| <soap:body use="literal"/>
| </wsdl:input>
| </wsdl:operation>
| </wsdl:binding>
|
| <wsdl:service name="CommandProcessorService">
| <wsdl:port name="CommandProcessorPort" binding="tns:CommandProcessorBinding">
| <soap:address location="http://localhost:8080/CommandProcessorService"/>
| </wsdl:port>
| </wsdl:service>
| </wsdl:definitions>
|
|
| XSD:
|
| <?xml version="1.0" encoding="UTF-8"?>
| <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| targetNamespace="http://xxx/schemas/xxx"
| xmlns:xxx="http://xxx/schemas/xxx"
| elementFormDefault="qualified">
|
| <xsd:element name="CommandRequest">
| <xsd:complexType>
| <xsd:sequence>
| <xsd:element name="command" type="xxx:CommandType" minOccurs="1" maxOccurs="1"></xsd:element>
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
|
| <xsd:element name="anyCommand">
| <xsd:complexType>
| <xsd:sequence>
| <xsd:element name="command" type="xsd:anySimpleType"></xsd:element>
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
|
| <xsd:element name="CommandResponse">
| <xsd:complexType>
| <xsd:sequence>
| <xsd:element name="return" type="xxx:ResponseCommandType"></xsd:element>
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
|
| <xsd:complexType name="CommandType">
| <xsd:sequence>
| <xsd:element name="id" type="xsd:long"></xsd:element>
| </xsd:sequence>
| </xsd:complexType>
|
| <xsd:complexType name="DHCPCommandType">
| <xsd:complexContent>
| <xsd:extension base="xxx:CommandType">
| <xsd:sequence>
| <xsd:element name="ip" type="xsd:string"></xsd:element>
| <xsd:element name="server" type="xsd:string"></xsd:element>
| </xsd:sequence>
| </xsd:extension>
| </xsd:complexContent>
| </xsd:complexType>
|
|
| <xsd:complexType name="CMTSCommandType">
| <xsd:complexContent>
| <xsd:extension base="xxx:CommandType">
| <xsd:sequence>
| <xsd:element name="MAC" type="xsd:string"></xsd:element>
| </xsd:sequence>
| </xsd:extension>
| </xsd:complexContent>
| </xsd:complexType>
|
| <xsd:complexType name="ResponseCommandType">
| <xsd:sequence>
| <xsd:element name="id" type="xsd:long"></xsd:element>
| <xsd:element name="message" type="xsd:string"></xsd:element>
| </xsd:sequence>
| </xsd:complexType>
| </xsd:schema>
|
|
When I access: http://localhost:8080/jbossws/services, it says there's no service deployed.
What else am I missing?
Regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089438#4089438
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089438
17 years, 2 months
[JBossWS] - Ant doesn 't Recognize WSConsumeTask
by ebonnett
I apologize in advance if the answer to this question is obvious and I've just missed it. Seems like it should simple. I've installed JBossWS 2.0.0.GA on JBoss 4.2.1.GA by running the deploy-jboss42 task. I've created a simple web service and have successfully deployed it. Also, I've used the wsconsume.bat file to generate client side code to access the web service. However, I'd like to use the WSConsumeTask Ant task from my project's build script to do this and this is where I'm stuck. What do I need to do to get Ant to recognize this task? I'm running Ant 1.7.0. I haven't found any documentation on this topic. However, I looked in some of the JBossWS jar files and found the WSConsumeTask class in jbossws-spi.jar. So, I copied this file to the %ANT_HOME%/lib directory. But, this didn't help. The error I'm seeing when I run my project's build script is:
generateClientFiles:
C:\XCAFE\CommonModules\WebServicesTest\build.xml:132: Problem: failed to create task or type WSConsumeTask
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any / declarations have taken place.
BUILD FAILED (total time: 0 seconds)
So, what do I need to do to get Ant to recognize the WSConsumeTask? Thanks in advance for any help!
Eric
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089435#4089435
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089435
17 years, 2 months
[JBossWS] - Help with WSDL and extensions
by viniciuscarvalho
Hello there! I'm trying to figure out how one can achieve an way to use inheritance with WSDL. On a previous post url][http://www.jboss.org/index.html?module=bb&op=viewtopic&t=119507[/url]
(Still not answered :( ) I've explained that I need to find a way to use the same contract and have different implementations of the messages to be accept. I'm pretty aware that webservices are not RPC (and I really miss CORBA when I get stuck in things like this).
But I really would like to find a way to have an extensible WSDL operation:
Command : interface
DHCPCommand, AsteriskCommand, CMTSCommand are all implementations
Any time, a new command may arrive, as long as it implements the command, the
endpoint should be able to accept it. So far it has been very disappointing.
When the user sends any command, it converts into a Command, missing all extra properties on the subclasses :(
So I had the idea to receive an Element, so anything sent should be accept. Did not work since Element is an interface and JAXB can't bind it :(
Now I'd like to use the anyElement type, but as it gets converted to Object, I'm gonna miss everything.
Summing up : In JBoss WS can I create an endpoint that does not marshall the received xml? Is it possible to have an endpoint that simply forward the xml requests to the SEI?
Any help, would be most appreciated
Best Regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089327#4089327
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089327
17 years, 3 months
[JBossWS] - JBossWS and Axis2
by BCH
Hello,
First of all, i would apologize for my bad english.
I'm trying to generate a JBossWS client from the sample "Version" service of Axis2 but I have errors.
I'm using :
- JBoss AS 4.2.1 with jbossws-native-2.0.1.GA
- Axis2 1.3
I'm running this command line :
| <JBOSS421_DIR>\bin> wsconsume http://localhost:8085/axis2/services/Version?wsdl
|
And I obtains this error :
| parsing WSDL...
|
| [ERROR] A class/interface with the same name "sample.axisversion.Exception" is a
| lready in use. Use a class customization to resolve this conflict.
| line 11 of http://localhost:8085/axis2/services/Version?wsdl
|
| [ERROR] (Relevant to above error) another "Exception" is generated from here.
| line 6 of http://localhost:8085/axis2/services/Version?wsdl
|
| [ERROR] Two declarations cause a collision in the ObjectFactory class.
| line 11 of http://localhost:8085/axis2/services/Version?wsdl
|
| [ERROR] (Related to above error) This is the other declaration.
| line 6 of http://localhost:8085/axis2/services/Version?wsdl
|
| [ERROR] Two declarations cause a collision in the ObjectFactory class.
| line 14 of http://localhost:8085/axis2/services/Version?wsdl
|
| [ERROR] (Related to above error) This is the other declaration.
| line 8 of http://localhost:8085/axis2/services/Version?wsdl
|
This is the Version.wsdl :
| <?xml version="1.0" encoding="UTF-8"?>
| <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
| xmlns:ns0="http://axisversion.sample"
| xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
| xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
| xmlns:ns1="http://org.apache.axis2/xsd"
| xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
| xmlns:xs="http://www.w3.org/2001/XMLSchema"
| xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
| targetNamespace="http://axisversion.sample">
| <wsdl:documentation>Version</wsdl:documentation>
| <wsdl:types>
| <xs:schema xmlns:ns="http://axisversion.sample" attributeFormDefault="qualified"
| elementFormDefault="qualified" targetNamespace="http://axisversion.sample">
| <xs:complexType name="Exception">
| <xs:sequence>
| <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
| </xs:sequence>
| </xs:complexType>
| <xs:element name="Exception">
| <xs:complexType>
| <xs:sequence>
| <xs:element minOccurs="0" name="Exception" nillable="true" type="ns:Exception"/>
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| <xs:element name="getVersionResponse">
| <xs:complexType>
| <xs:sequence>
| <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| </xs:schema>
| </wsdl:types>
| <wsdl:message name="getVersionRequest"/>
| <wsdl:message name="getVersionResponse">
| <wsdl:part name="parameters" element="ns0:getVersionResponse"/>
| </wsdl:message>
| <wsdl:message name="Exception">
| <wsdl:part name="parameters" element="ns0:Exception"/>
| </wsdl:message>
| <wsdl:portType name="VersionPortType">
| <wsdl:operation name="getVersion">
| <wsdl:input message="ns0:getVersionRequest" wsaw:Action="urn:getVersion"/>
| <wsdl:output message="ns0:getVersionResponse" wsaw:Action="urn:getVersionResponse"/>
| <wsdl:fault message="ns0:Exception" name="Exception" wsaw:Action="urn:getVersionException"/>
| </wsdl:operation>
| </wsdl:portType>
| <wsdl:binding name="VersionSOAP11Binding" type="ns0:VersionPortType">
| <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
| <wsdl:operation name="getVersion">
| <soap:operation soapAction="urn:getVersion" style="document"/>
| <wsdl:input>
| <soap:body use="literal"/>
| </wsdl:input>
| <wsdl:output>
| <soap:body use="literal"/>
| </wsdl:output>
| <wsdl:fault name="Exception">
| <soap:fault use="literal" name="Exception"/>
| </wsdl:fault>
| </wsdl:operation>
| </wsdl:binding>
| <wsdl:binding name="VersionSOAP12Binding" type="ns0:VersionPortType">
| <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
| <wsdl:operation name="getVersion">
| <soap12:operation soapAction="urn:getVersion" style="document"/>
| <wsdl:input>
| <soap12:body use="literal"/>
| </wsdl:input>
| <wsdl:output>
| <soap12:body use="literal"/>
| </wsdl:output>
| <wsdl:fault name="Exception">
| <soap12:fault use="literal" name="Exception"/>
| </wsdl:fault>
| </wsdl:operation>
| </wsdl:binding>
| <wsdl:binding name="VersionHttpBinding" type="ns0:VersionPortType">
| <http:binding verb="POST"/>
| <wsdl:operation name="getVersion">
| <http:operation location="Version/getVersion"/>
| <wsdl:input>
| <mime:content type="text/xml" part="getVersion"/>
| </wsdl:input>
| <wsdl:output>
| <mime:content type="text/xml" part="getVersion"/>
| </wsdl:output>
| </wsdl:operation>
| </wsdl:binding>
| <wsdl:service name="Version">
| <wsdl:port name="VersionSOAP11port_http" binding="ns0:VersionSOAP11Binding">
| <soap:address location="http://localhost:8085/axis2/services/Version"/>
| </wsdl:port>
| <wsdl:port name="VersionSOAP12port_http" binding="ns0:VersionSOAP12Binding">
| <soap12:address location="http://localhost:8085/axis2/services/Version"/>
| </wsdl:port>
| <wsdl:port name="VersionHttpport" binding="ns0:VersionHttpBinding">
| <http:address location="http://localhost:8085/axis2/services/Version"/>
| </wsdl:port>
| </wsdl:service>
| </wsdl:definitions>
|
Is it possible to use JBossWS to invoke an Axis2 WebService ?
If yes, is it possible to use @WebServiceRef to point on a Axis2 WebService ?
Example :
| @Stateless
| @WebService
| public class MyService implements IMyService
| {
| @WebServiceRef(name="Version", wsdlLocation="http://localhost:8085/axis2/services/Version?wsdl")
| private Service axisService;
|
| @WebMethod
| public String myMethod()
| {
| ...
| }
| ...
| }
|
Any help will be appreciate
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089206#4089206
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089206
17 years, 3 months