2 Replies Latest reply on Jun 19, 2007 5:44 PM by Meghana Joglekar

    UnmarshallException for xsd type any

    Meghana Joglekar Novice

      Hello,

      I am publishing BPEL processes on JBoss 4.0.5GA, JBossWS 1.2.1 and JBPM 3.2

      My xsd defines a certain type as shown below -

      <xs:complexType name="CredentialsType">
       <xs:sequence>
       <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
       </xs:sequence>
       <xs:anyAttribute/>
       </xs:complexType>



      The request message contains wsse:security element as child of 'CredentialsType'. However when the SOAP message is received, I get following exception -

      org.jboss.ws.WSException: org.jboss.ws.core.jaxrpc.binding.BindingException: org.jboss.ws.core.jaxrpc.binding.jbossxb.Un
      marshalException: Failed to parse source: Failed to find read method or field for property 'security' in class com.seren
      a.bpel.CredentialsType
       at org.jboss.ws.core.soap.XMLContent.unmarshallObjectContents(XMLContent.java:248)
       at org.jboss.ws.core.soap.XMLContent.transitionTo(XMLContent.java:95)
       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:243)
       at org.jboss.ws.core.EndpointInvocation.getRequestParamValue(EndpointInvocation.java:111)
       at org.jboss.ws.core.EndpointInvocation.getRequestPayload(EndpointInvocation.java:126)
       at org.jboss.ws.core.server.ServiceEndpointInvokerJSE.invokeServiceEndpointInstance(ServiceEndpointInvokerJSE.ja
      va:103)
       at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.invoke(AbstractServiceEndpointInvoker.java:207)
       at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:212)
       at org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
       at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)


      Caused by: org.jboss.ws.core.jaxrpc.binding.BindingException: org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalExceptio
      n: Failed to parse source: Failed to find read method or field for property 'security' in class com.serena.bpel.Credenti
      alsType
       at org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializer.deserialize(JBossXBDeserializer.java:108)
       at org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializer.deserialize(JBossXBDeserializer.java:59)
       at org.jboss.ws.core.jaxrpc.binding.DeserializerSupport.deserialize(DeserializerSupport.java:59)
       at org.jboss.ws.core.soap.XMLContent.unmarshallObjectContents(XMLContent.java:178)
       ... 34 more


      The auto-generated CredentialsType class is as follows -
      public class CredentialsType
      {
      
      protected javax.xml.soap.SOAPElement[] _any;
      public CredentialsType(){}
      
      public CredentialsType(javax.xml.soap.SOAPElement[] _any){
      this._any=_any;
      }
      public javax.xml.soap.SOAPElement[] get_any() { return _any ;}
      
      public void set_any(javax.xml.soap.SOAPElement[] _any){ this._any=_any; }
      
      }


      Can someone tell me how I can get this working? Let me know if I should provide more information.

      Thank you,
      Meghana

        • 1. Re: UnmarshallException for xsd type any
          Meghana Joglekar Novice

          I guess it just needed wrapper element 'any' around wsse security element. It is accepting the SOAP request fine now.

          Thanks,
          Meghana

          • 2. Re: UnmarshallException for xsd type any
            Meghana Joglekar Novice

            Hello,

            I am still getting this exception. It was my mistake when I thought I am not getting this exception anymore.

            Can someone tell me how can I get rid off this exception? Even after the exception, the request is received correctly by my BPEL process and it is executed as expected.

            Here is my SOAP request for that particular element -

            <ns:User>
             <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
             <saml:Assertion AssertionID="urn:uuid:48a63322-ea93-4474-a4fe-6a73fcb3bdb4" IssueInstant="2007-02-16T17:00:19Z" Issuer="https://wag.bandit-project.org/TrustService/services/SecurityTokenService" MajorVersion="1" MinorVersion="1" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion">
            .........
             </saml:Assertion>
            </wsse:Security>
             </ns:User>
            


            Thank you,
            Meghana