Ok, I made a build from these instructions
-
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBWSFAQBuildAndInstallJBoss40xEJB3
(the fix is applied to branch jbossws-1.0, right? ... or should I take other branch,
trunk)
But now I get this exception for a simple complex bean as parameter invocation:
My WS code:
| public class ForecastDocument implements Serializable {
|
| private String user;
| private Date date;
|
| public String getUser() {
| return user;
| }
|
| public void setUser(String user) {
| this.user = user;
| }
|
| public Date getDate() {
| return date;
| }
|
| public void setDate(Date date) {
| this.date = date;
| }
|
| @Stateless
| @WebService(endpointInterface =
"com.generalynx.gema.forecast.business.ForecastSubmit")
| public class GBForecastSubmitEJB implements ForecastSubmit {
| @WebMethod
| public int submit(ForecastDocument forecastDocument) {
| System.out.println("forecastDocument = " + forecastDocument);
| return 0;
| }
| }
|
| @WebService
| @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
| public interface ForecastSubmit {
| @WebMethod
| int submit(ForecastDocument forecastDocument);
| }
|
|
Exception:
| 12:00:03,906 ERROR [SOAPFaultExceptionHelper] SOAP request exception
| javax.xml.rpc.JAXRPCException: org.jboss.ws.binding.BindingException:
org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: Type binding not found for
type dateTime specified with xsi:type for element
{http://business.forecast.gema.generalynx.com/jaws}date
| at org.jboss.ws.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:303)
| at
org.jboss.ws.binding.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:233)
| at
org.jboss.ws.binding.EndpointInvocation.getRequestParamValue(EndpointInvocation.java:103)
| at
org.jboss.ws.binding.EndpointInvocation.getRequestPayload(EndpointInvocation.java:117)
| at
org.jboss.ws.integration.jboss.ServiceEndpointInvokerEJB3.invokeServiceEndpoint(ServiceEndpointInvokerEJB3.java:115)
| at
org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:115)
| at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
| at
org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
| at
org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at
org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jboss.ws.binding.BindingException:
org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: Type binding not found for
type dateTime specified with xsi:type for element
{http://business.forecast.gema.generalynx.com/jaws}date
| at
org.jboss.ws.jaxrpc.encoding.JAXBDeserializer.deserialize(JAXBDeserializer.java:100)
| at org.jboss.ws.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:235)
| ... 30 more
| Caused by: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: Type binding
not found for type dateTime specified with xsi:type for element
{http://business.forecast.gema.generalynx.com/jaws}date
| at
org.jboss.ws.jaxb.JBossXBUnmarshallerImpl.unmarshal(JBossXBUnmarshallerImpl.java:67)
| at
org.jboss.ws.jaxrpc.encoding.JAXBDeserializer.deserialize(JAXBDeserializer.java:92)
| ... 31 more
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Type binding
not found for type dateTime specified with xsi:type for element
{http://business.forecast.gema.generalynx.com/jaws}date
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:156)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:126)
| at
org.jboss.ws.jaxb.JBossXBUnmarshallerImpl.unmarshal(JBossXBUnmarshallerImpl.java:63)
| ... 32 more
| Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Type binding not found for
type dateTime specified with xsi:type for element
{http://business.forecast.gema.generalynx.com/jaws}date
| at
org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:381)
| at
org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:301)
| at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
| at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
| at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
| at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
| at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
| at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:152)
| ... 34 more
My type mapping made from GLUE client:
| <?xml version='1.0' encoding='UTF-8'?>
| <!--generated by GLUE Standard 4.1.2 (wsdl2java) on Tue Oct 31 11:58:56 CET
2006-->
| <map:mappings
xmlns:map='http://www.themindelectric.com/schema/'>
| <xsd:schema
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
elementFormDefault='qualified'
targetNamespace='http://business.forecast.gema.generalynx.com/jaws...
| <xsd:complexType name='ForecastDocument'
map:class='com.generalynx.gema.domain.forecast.ForecastDocument'>
| <xsd:sequence>
| <xsd:element name='date' nillable='true'
map:field='date' type='xsd:dateTime'/>
| <xsd:element name='user' nillable='true'
map:field='user' type='xsd:string'/>
| </xsd:sequence>
| </xsd:complexType>
| </xsd:schema>
| </map:mappings>
Client code:
| ForecastDocument forecastDocument = new ForecastDocument();
| forecastDocument.user = "AlesJ";
| forecastDocument.date = new Date();
|
| ProxyContext proxyContext = new ProxyContext();
| proxyContext.setDocumentStyle();
|
| ForecastSubmit gbForecastSubmit = (ForecastSubmit) Registry.bind(
"http://Morozevic:8080/ejb/GBForecastSubmitEJB?wsdl", ForecastSubmit.class );
| gbForecastSubmit.submit(forecastDocument);
|
Rgds, Ales
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982017#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...