1 Reply Latest reply on Jul 26, 2006 5:26 AM by Chris Knowles

    JBossWS 1.0.1: client bug in consuming JavaBeans

    Juergen Zimmermann Master

      My Web Service delivers a JavaBean. The server log file shows these entries as expected:

      org.jboss.ws.soap.SOAPContentElement - setObjectValue: {id=1, nachname=Alpha, vorname=Adrian, art=privat, rabatt=0}
      org.jboss.ws.soap.SOAPContentElement - setObjectValue: {id=1, nachname=Alpha, vorname=Adrian, art=privat, rabatt=0}
      org.jboss.ws.soap.SOAPContentElement - getXMLFragment from Object [xmlType={http://de.hska.ws}KundeData,javaType=class de.hska.ws.KundeData]
      org.jboss.ws.soap.SOAPContentElement - xmlFragment: <result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ns_art:art xmlns:ns_art="http://de.hska.ws">privat</ns_art:art><ns_id:id xmlns:ns_id="http://de.hska.ws">1</ns_id:id><ns_nachname:nachname xmlns:ns_nachname="http://de.hska.ws">Alpha</ns_nachname:nachname><ns_rabatt:rabatt xmlns:ns_rabatt="http://de.hska.ws">0</ns_rabatt:rabatt><ns_vorname:vorname xmlns:ns_vorname="http://de.hska.ws">Adrian</ns_vorname:vorname></result>
      


      However, the web services client throws this exception:
      Call invocation failed: org.jboss.ws.binding.BindingException: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: Requested element {http://de.hska.ws}art is not allowed in this position in the sequence. The next element should be art;
      
      nested exception is: javax.xml.rpc.JAXRPCException: org.jboss.ws.binding.BindingException: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: Requested element {http://de.hska.ws}art is not allowed in this position in the sequence. The next element should be art
      


      This is the contents of jaxrpc-mapping.xml:
      <?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
       <package-mapping>
       <package-type>de.hska.ws</package-type>
       <namespaceURI>http://de.hska.ws</namespaceURI>
       </package-mapping>
       <java-xml-type-mapping>
       <java-type>de.hska.ws.KundeData</java-type>
       <root-type-qname xmlns:typeNS='http://de.hska.ws'>typeNS:KundeData</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>art</java-variable-name>
       <xml-element-name>art</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>id</java-variable-name>
       <xml-element-name>id</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>nachname</java-variable-name>
       <xml-element-name>nachname</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>rabatt</java-variable-name>
       <xml-element-name>rabatt</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>vorname</java-variable-name>
       <xml-element-name>vorname</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <service-interface-mapping>
       <service-interface>de.hska.ws.KundenverwaltungService</service-interface>
       <wsdl-service-name xmlns:serviceNS='http://de.hska.ws'>serviceNS:KundenverwaltungService</wsdl-service-name>
       <port-mapping>
       <port-name>KundenverwaltungEndpointInterfacePort</port-name>
       <java-port-name>KundenverwaltungEndpointInterfacePort</java-port-name>
       </port-mapping>
       </service-interface-mapping>
       <service-endpoint-interface-mapping>
       <service-endpoint-interface>de.hska.ws.KundenverwaltungEndpointInterface</service-endpoint-interface>
       <wsdl-port-type xmlns:portTypeNS='http://de.hska.ws'>portTypeNS:KundenverwaltungEndpointInterface</wsdl-port-type>
       <wsdl-binding xmlns:bindingNS='http://de.hska.ws'>bindingNS:KundenverwaltungEndpointInterfaceBinding</wsdl-binding>
       <service-endpoint-method-mapping>
       <java-method-name>findNachname</java-method-name>
       <wsdl-operation>findNachname</wsdl-operation>
       <method-param-parts-mapping>
       <param-position>0</param-position>
       <param-type>long</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS='http://de.hska.ws'>wsdlMsgNS:KundenverwaltungEndpointInterface_findNachname</wsdl-message>
       <wsdl-message-part-name>long_1</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <wsdl-return-value-mapping>
       <method-return-value>java.lang.String</method-return-value>
       <wsdl-message xmlns:wsdlMsgNS='http://de.hska.ws'>wsdlMsgNS:KundenverwaltungEndpointInterface_findNachnameResponse</wsdl-message>
       <wsdl-message-part-name>result</wsdl-message-part-name>
       </wsdl-return-value-mapping>
       </service-endpoint-method-mapping>
       <service-endpoint-method-mapping>
       <java-method-name>deleteKunde</java-method-name>
       <wsdl-operation>deleteKunde</wsdl-operation>
       <method-param-parts-mapping>
       <param-position>0</param-position>
       <param-type>long</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS='http://de.hska.ws'>wsdlMsgNS:KundenverwaltungEndpointInterface_deleteKunde</wsdl-message>
       <wsdl-message-part-name>long_1</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       </service-endpoint-method-mapping>
       <service-endpoint-method-mapping>
       <java-method-name>findKunde</java-method-name>
       <wsdl-operation>findKunde</wsdl-operation>
       <method-param-parts-mapping>
       <param-position>0</param-position>
       <param-type>long</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS='http://de.hska.ws'>wsdlMsgNS:KundenverwaltungEndpointInterface_findKunde</wsdl-message>
       <wsdl-message-part-name>long_1</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <wsdl-return-value-mapping>
       <method-return-value>de.hska.ws.KundeData</method-return-value>
       <wsdl-message xmlns:wsdlMsgNS='http://de.hska.ws'>wsdlMsgNS:KundenverwaltungEndpointInterface_findKundeResponse</wsdl-message>
       <wsdl-message-part-name>result</wsdl-message-part-name>
       </wsdl-return-value-mapping>
       </service-endpoint-method-mapping>
       <service-endpoint-method-mapping>
       <java-method-name>updateKunde</java-method-name>
       <wsdl-operation>updateKunde</wsdl-operation>
       <method-param-parts-mapping>
       <param-position>0</param-position>
       <param-type>de.hska.ws.KundeData</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS='http://de.hska.ws'>wsdlMsgNS:KundenverwaltungEndpointInterface_updateKunde</wsdl-message>
       <wsdl-message-part-name>KundeData_1</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       </service-endpoint-method-mapping>
       <service-endpoint-method-mapping>
       <java-method-name>findKundenByNachname</java-method-name>
       <wsdl-operation>findKundenByNachname</wsdl-operation>
       <method-param-parts-mapping>
       <param-position>0</param-position>
       <param-type>java.lang.String</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS='http://de.hska.ws'>wsdlMsgNS:KundenverwaltungEndpointInterface_findKundenByNachname</wsdl-message>
       <wsdl-message-part-name>String_1</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <wsdl-return-value-mapping>
       <method-return-value>de.hska.ws.KundeData[]</method-return-value>
       <wsdl-message xmlns:wsdlMsgNS='http://de.hska.ws'>wsdlMsgNS:KundenverwaltungEndpointInterface_findKundenByNachnameResponse</wsdl-message>
       <wsdl-message-part-name>result</wsdl-message-part-name>
       </wsdl-return-value-mapping>
       </service-endpoint-method-mapping>
       </service-endpoint-interface-mapping>
      </java-wsdl-mapping>
      


        • 1. Re: JBossWS 1.0.1: client bug in consuming JavaBeans
          Chris Knowles Newbie

          Did anything ever come of this?

          I an trying to do a test of a web service before full implementation. I' m using a simple "company" bean with id, name and address. The client has the correct ordering according to the WSDL, but I get a similar error:


          10:06:28,416 ERROR [SOAPFaultExceptionHelper] SOAP request exception
          javax.xml.rpc.JAXRPCException: org.jboss.ws.binding.BindingException: javax.xml.bind.JAXBException: Failed to parse source: Requested elemen
          t {urn:HelloWorldService/wsdl}address is not allowed in this position in the sequence. The next element should be address