[JBossWS] - org.jboss.ws.WSException: arg0 is not a valid property on cl
by maffeis
I'm getting the following error in deploying a simple document/literal
web service with jbossws-3.0.1-native-2.0.4.GA on jboss 4.2.2.GA.
org.jboss.ws.WSException: arg0 is not a valid property on class ...
Full stack trace:
| 09:22:41,781 ERROR [MainDeployer] Could not start deployment: file:/C:/dev/tools/j2ee/jboss-4.2.2.GA/server/viperats/deploy/mobank-server-core.war
| org.jboss.ws.WSException: arg0 is not a valid property on class com.vipera.ts.server.ws.jaxws.NewOperation
| at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getElementPropertyAccessor(JAXBContextImpl.java:926)
| at org.jboss.ws.metadata.accessor.JAXBAccessorFactory.create(JAXBAccessorFactory.java:51)
| at org.jboss.ws.metadata.umdm.EndpointMetaData.createAccessor(EndpointMetaData.java:713)
| at org.jboss.ws.metadata.umdm.EndpointMetaData.eagerInitializeAccessors(EndpointMetaData.java:694)
| at org.jboss.ws.metadata.umdm.EndpointMetaData.initializeInternal(EndpointMetaData.java:567)
| at org.jboss.ws.metadata.umdm.EndpointMetaData.eagerInitialize(EndpointMetaData.java:553)
| at org.jboss.ws.metadata.umdm.ServiceMetaData.eagerInitialize(ServiceMetaData.java:435)
| at org.jboss.ws.metadata.umdm.UnifiedMetaData.eagerInitialize(UnifiedMetaData.java:196)
| at org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect.create(EagerInitializeDeploymentAspect.java:50)
|
This happens when the WAR holding the web service is deployed.
The WSDL (that's what you get when you create a document/literal WSDL using the Eclipse wizard):
| <?xml version="1.0" encoding="UTF-8" standalone="no"?>
| <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.example.org/MyTest/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="MyTest" targetNamespace="http://www.example.org/MyTest/">
| <wsdl:types>
| <xsd:schema targetNamespace="http://www.example.org/MyTest/">
| <xsd:element name="NewOperation">
| <xsd:complexType>
| <xsd:sequence>
| <xsd:element name="in" type="xsd:string"/>
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
| <xsd:element name="NewOperationResponse">
| <xsd:complexType>
| <xsd:sequence>
| <xsd:element name="out" type="xsd:string"/>
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
| </xsd:schema>
| </wsdl:types>
| <wsdl:message name="NewOperationRequest">
| <wsdl:part element="tns:NewOperation" name="parameters"/>
| </wsdl:message>
| <wsdl:message name="NewOperationResponse">
| <wsdl:part element="tns:NewOperationResponse" name="parameters"/>
| </wsdl:message>
| <wsdl:portType name="MyTest">
| <wsdl:operation name="NewOperation">
| <wsdl:input message="tns:NewOperationRequest"/>
| <wsdl:output message="tns:NewOperationResponse"/>
| </wsdl:operation>
| </wsdl:portType>
| <wsdl:binding name="MyTestSOAP" type="tns:MyTest">
| <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
| <wsdl:operation name="NewOperation">
| <soap:operation soapAction="http://www.example.org/MyTest/NewOperation"/>
| <wsdl:input>
| <soap:body use="literal"/>
| </wsdl:input>
| <wsdl:output>
| <soap:body use="literal"/>
| </wsdl:output>
| </wsdl:operation>
| </wsdl:binding>
| <wsdl:service name="MyTest">
| <wsdl:port binding="tns:MyTestSOAP" name="MyTestSOAP">
| <soap:address location="http://www.example.org/"/>
| </wsdl:port>
| </wsdl:service>
| </wsdl:definitions>
|
The WebService implementation:
| @WebService(name = "MyTest", targetNamespace = "http://www.example.org/MyTest/")
| public class MyTestWebService implements MyTest {
| public String newOperation(String in) {
| return null;
| }
| }
|
web.xml configuration:
| <servlet>
| <servlet-name>MyTest</servlet-name>
| <servlet-class>com.vipera.ts.server.ws.MyTestWebService</servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>MyTest</servlet-name>
| <url-pattern>/mt</url-pattern>
| </servlet-mapping>
|
Workaround: In the WSDL, rename "in" to "arg0" and "out" to "return", but I'd rather like to avoid that.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142264#4142264
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142264
18 years
[JBossWS] - How do I override the ServiceEndpointAddress?
by eric@attask.com
Trying to upgrade from JBoss 4.0.5 to JBoss 4.2.2
All of the EJB's and WebServices are created using xdoclet. I'm not using EJB3 or even annotations to create the EJBs or web services.
I copied over jbossws-1.2.0.SP1 and removed the new jbossws folder to ensure everything will work fine.
All testcase pass; however, in jboss 4.2.2 the web service API has changed.
Inside the jboss.xml I can define the port-component-uri but it doesn't seem to honor it in jboss 4.2.2 it seems to pull it from the ear/jar context path. Any Ideas?
| <session>
| <ejb-name>API</ejb-name>
| <jndi-name>API</jndi-name>
| <local-jndi-name>local/API</local-jndi-name>
|
| <clustered>false</clustered>
| <port-component>
| <port-component-name>soapAPI</port-component-name>
| <port-component-uri>/attaskWS/API</port-component-uri>
| </port-component>
|
| <method-attributes>
| </method-attributes>
| </session>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142213#4142213
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142213
18 years
[JBossWS] - Use Map as return type/parameter in a web method..
by raags
I tried to use Map as a return type in one of my web service methods but I got a JAXB error stating that it does not support Map because it's an interface.
So I added an adapter for the Map but it gets ignored. Is it because JBossWS 1.2.1 GA does not support JAXB annotations on its classes? Do you know?
| @Stateless
| @WebService()
| @Local(IHelloWorldService.class)
| @Remote(IHelloWorldService.class)
| @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
| @XmlRootElement(name="HelloWorldBean")
| public class HelloWorldBean
| {
|
| @XmlJavaTypeAdapter(MapAdapter.class)
| @XmlJavaTypeAdapter(CourseListAdapter.class)
| public void getMap(Map<String,Course> map)
| {
|
|
| }
| }
| class CourseListAdapter extends XmlAdapter<Course[],Map<String,Course>> {
| public Map<String,Course> unmarshal( Course[] value ) {
| Map<String,Course> r = new HashMap<String,Course>();
| for( Course c : value )
| r.put(c.id,c);
| return r;
| }
|
| public Course[] marshal( Map<String,Course> value ) {
| return value.values().toArray(new Course[value.size()]);
| }
|
| }
|
|
Am I doing something wrong here?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142196#4142196
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142196
18 years
[JBossWS] - Request Message not mapping to Request Object Properly
by regget
Hi,
I have generated my wsdl beans with my wsdl file and deployed the jbossws web service onto my application server. When I try to call my web service with my soap message, the request message doesn't translate to the request object correctly.
For instance, say the request message is accountInfo, and my request object is accountinfo. The accountinfo pojo is created but its variables are all null. This shouldn't be the case as my request message has all the required values filled in.
Playing around, I got it to populate the pojo properly but the solution is not acceptable.
This is what i'm expecting: <cli:Name>Henry</cli:Name>
however, the above won't populate the pojo properly, but the following will:
Henry
I realized that 'name' is the variable name of in AccountInfo, and as long as I use the variable names, it will populate the pojo properly. But the webservice client will be generating their request message based on the wsdl and xsd files because that's what they are expecting to work.
Is this expected behaviour of jbossws or have I strayed away? Or perhaps there is some flag I have to turn on?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142181#4142181
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142181
18 years