On the server I'm using Java 5.0, JBoss AS 4.2.2.GA, and jBPM BPEL 1.1.1.
The client is using Java 6.x
I have a simple BPEL script that receives a request with a complex type schema and replies
with a string. I generated stub WS classes using Java 6.0 for the test client and when I
leave the date fields blank the webservice call works and returns the expected result.
However, when I place date objects in the message the service fails with:
| 17:36:15,296 ERROR [SOAPFaultHelperJAXRPC] SOAP request exception
| org.jboss.ws.WSException: org.jboss.ws.core.binding.BindingException:
org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: Failed to pars
| e source: Failed to set value
'java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.Zo
|
neInfo[id="GMT-05:00",offset=-18000000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=
|
?,YEAR=2009,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=4,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=1
| 7,MINUTE=36,SECOND=13,MILLISECOND=187,ZONE_OFFSET=?,DST_OFFSET=?]' for property
'opened' defined in org.tempuri.AcctOpeningBPEL.CaseFolderRef on
| instance org.tempuri.AcctOpeningBPEL.CaseFolderRef@eaea8e
| at
org.jboss.ws.core.soap.XMLContent.unmarshallObjectContents(XMLContent.java:250)
| at org.jboss.ws.core.soap.XMLContent.transitionTo(XMLContent.java:97)
| at org.jboss.ws.core.soap.DOMContent.transitionTo(DOMContent.java:77)
| at
org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:140)
| at
org.jboss.ws.core.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:171)
| at
org.jboss.ws.core.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:263)
| at
org.jboss.ws.core.EndpointInvocation.getRequestParamValue(EndpointInvocation.java:115)
| at
org.jboss.ws.core.EndpointInvocation.getRequestPayload(EndpointInvocation.java:135)
| at
org.jboss.ws.core.server.DelegatingInvocation.getArgs(DelegatingInvocation.java:82)
| at
org.jboss.wsf.container.jboss42.DefaultInvocationHandler.invoke(DefaultInvocationHandler.java:102)
| at
org.jboss.wsf.container.jboss42.DefaultInvocationHandlerJAXRPC.invoke(DefaultInvocationHandlerJAXRPC.java:57)
| at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:220)
| at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:408)
| at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:272)
| at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:189)
| at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:122)
| at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jboss.ws.core.binding.BindingException:
org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: Failed to parse source:
Faile
| d to set value
'java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT-
|
05:00",offset=-18000000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=2009,MON
|
TH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=4,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=17,MINUTE=36,SEC
| OND=13,MILLISECOND=187,ZONE_OFFSET=?,DST_OFFSET=?]' for property 'opened'
defined in org.tempuri.AcctOpeningBPEL.CaseFolderRef on instance org.te
| mpuri.AcctOpeningBPEL.CaseFolderRef@eaea8e
| at
org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializer.deserialize(JBossXBDeserializer.java:111)
| at
org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializer.deserialize(JBossXBDeserializer.java:62)
| at
org.jboss.ws.core.binding.DeserializerSupport.deserialize(DeserializerSupport.java:60)
| at
org.jboss.ws.core.soap.XMLContent.unmarshallObjectContents(XMLContent.java:180)
| ... 35 more
| Caused by: org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: Failed to
parse source: Failed to set value 'java.util.GregorianCalendar[
|
time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT-05:00",offset=-18000000,dstSavings=0,useDayl
|
ight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=2009,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_M
|
ONTH=4,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=17,MINUTE=36,SECOND=13,MILLISECOND=187,ZONE_OFFSET=?,DST_OFF
| SET=?]' for property 'opened' defined in
org.tempuri.AcctOpeningBPEL.CaseFolderRef on instance
org.tempuri.AcctOpeningBPEL.CaseFolderRef@eaea8e
| at
org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBUnmarshallerImpl.unmarshal(JBossXBUnmarshallerImpl.java:65)
| at
org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializer.deserialize(JBossXBDeserializer.java:103)
| ... 38 more
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Failed to
set value 'java.util.GregorianCalendar[time=?,areFieldsSet=fa
|
lse,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT-05:00",offset=-18000000,dstSavings=0,useDaylight=false,transitions
|
=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=2009,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=4,DAY_OF_YEAR=?,D
|
AY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=17,MINUTE=36,SECOND=13,MILLISECOND=187,ZONE_OFFSET=?,DST_OFFSET=?]'
for property '
| opened' defined in org.tempuri.AcctOpeningBPEL.CaseFolderRef on instance
org.tempuri.AcctOpeningBPEL.CaseFolderRef@eaea8e
| at
org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:179)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:126)
| at
org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBUnmarshallerImpl.unmarshal(JBossXBUnmarshallerImpl.java:61)
| ... 39 more
| Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Failed to set value
'java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsS
|
et=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT-05:00",offset=-18000000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
|
,firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=2009,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=4,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_
|
OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=17,MINUTE=36,SECOND=13,MILLISECOND=187,ZONE_OFFSET=?,DST_OFFSET=?]'
for property 'opened' defined i
| n org.tempuri.AcctOpeningBPEL.CaseFolderRef on instance
org.tempuri.AcctOpeningBPEL.CaseFolderRef@eaea8e
| at org.jboss.xb.binding.introspection.FieldInfo.setValue(FieldInfo.java:251)
| at
org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtUtil.set(RtUtil.java:248)
| at
org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler.setParent(RtElementHandler.java:320)
| at
org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.setParent(SundayContentHandler.java:1189)
| at
org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.endElement(SundayContentHandler.java:1115)
| at
org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.endElement(SundayContentHandler.java:246)
| at
org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.endElement(SaxJBossXBParser.java:296)
| at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
| at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)
| at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(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:175)
| ... 41 more
| Caused by: java.lang.IllegalArgumentException: Wrong arguments. setOpened for target
org.tempuri.AcctOpeningBPEL.CaseFolderRef@eaea8e expected=[j
| ava.lang.String] actual=[java.util.GregorianCalendar]
| at
org.jboss.xb.binding.introspection.FieldInfo$SetValueAccessFactory$2.set(FieldInfo.java:121)
| at org.jboss.xb.binding.introspection.FieldInfo.setValue(FieldInfo.java:247)
| ... 58 more
|
The Schema definition for the field that's failing is:
<xs:element minOccurs='0' name='Opened'
| type='xs:anySimpleType' />
|
The jaxb annotations for this field in the client are:
| /**
| * Gets the value of the opened property.
| *
| * @return
| * possible object is
| * {@link Object }
| *
| */
| @XmlElement(name = "Opened")
| @XmlSchemaType(name = "anySimpleType")
| public Object getOpened() {
| return opened;
| }
|
This was originally generated code, and has not significantly changed from the generated
version.
The SOAP Message going out is:
| <S:Envelope
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
| <S:Body>
| <ns1:processCase xmlns:ns1="http://bpel.ccf.org"
| xmlns:ns3="http://legion.ccf.org">
| <info ns1:version="1.0">
| <ns1:UserId>1234/teller</ns1:UserId>
| <Folder>
| <CaseFolderId>23</CaseFolderId>
| <FinInstKey>1234</FinInstKey>
| <Cuid>000d0d9</Cuid>
| <ProcessName>AccountOpen</ProcessName>
| <Title>Some Title</Title>
| <Creator>1234/teller</Creator>
| <Disposition>OPENED</Disposition>
| <Opened
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:dateTime">
| 2009-02-04T17:36:13.187-05:00</Opened>
| <Owner>1234/teller</Owner>
| <Content>
| <ContentId>1</ContentId>
| <VarName>PaitentProfile</VarName>
| <Namespace>PatientProfile.xsd</Namespace>
| <Version>0</Version>
| <Provider>local</Provider>
| </Content>
| </Folder>
| </info>
| </ns1:processCase>
| </S:Body>
| </S:Envelope>
|
The fault message being returned is:
| <env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
| <env:Header />
| <env:Body>
| <env:Fault>
| <faultcode>env:Server</faultcode>
| <faultstring>org.jboss.ws.core.binding.BindingException:
| org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: Failed
| to parse source: Failed to set value
|
'java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT-05:00",offset=-18000000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=2009,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=4,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=17,MINUTE=36,SECOND=13,MILLISECOND=187,ZONE_OFFSET=?,DST_OFFSET=?]'
| for property 'opened' defined in
| org.tempuri.AcctOpeningBPEL.CaseFolderRef on instance
| org.tempuri.AcctOpeningBPEL.CaseFolderRef@eaea8e</faultstring>
| </env:Fault>
| </env:Body>
| </env:Envelope>
|
Is there something else I should be doing here? Should I try to replace the generated code
with XmlGregorianCalendar code? Do I have to resort to using a simple string rather than
dealing with a date value?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4207164#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...