7 Replies Latest reply on Nov 3, 2006 10:14 AM by Ales Justin

    Binding exception - prefix

    Ales Justin Master

      I'm using JBossWS 1.0.3 with JBossAS 4.0.4.GA.

      This is my JSR-181 webservice pojo:

      @Stateless
      @WebService(endpointInterface = "com.generalynx.gema.business.forecast.GBForecastSubmit")
      public class TestForecast implements GBForecastSubmit {
      
       public int submit(ForecastDocument forecastDocument) {
       System.out.println("forecastDocument = " + forecastDocument);
       return 0;
       }
      
      }
      
      --------------------
      
      @WebService
      @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
      public interface GBForecastSubmit extends Remote {
      
       @WebMethod
       int submit(ForecastDocument forecastDocument);
      
      }
      


      I'm using GLUE on the client side.

      This is the exception that I get when invoking WS from client:

      14:37:52,892 DEBUG [SOAPMessage] Incomming SOAPMessage
      <soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:n3='http://forecast.business.gema.generalynx.com/jaws' xmlns:n4='http://forecast.domain.gema.generalynx.com/jaws' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
      <soap:Header/>
      <soap:Body>
      <n3:submit xmlns:n3='http://forecast.business.gema.generalynx.com/jaws' xsi:type='n3:ForecastDocument'><n3:code xsi:nil='1'/><n3:customer xsi:nil='1'/><n3:forecasts xsi:type='n4:BasicForecast'><n4:creationDate xsi:nil='1'/><n4:expectedValue xsi:type='xsd:double'>1.0</n4:expectedValue><n4:forecastDate xsi:nil='1'/><n4:variance xsi:type='xsd:double'>2.0</n4:variance></n3:forecasts><n3:receiveDate xsi:nil='1'/><n3:submitDate xsi:nil='1'/><n3:user xsi:nil='1'/></n3:submit>
      </soap:Body></soap:Envelope>
      14:37:53,767 DEBUG [SOAPFaultException] new SOAPFaultException [code={http://schemas.xmlsoap.org/soap/envelope/}Client,string=org.jboss.ws.binding.BindingException: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: The prefix "xsi" for attribute "xsi:type" associated with an element type "n3:submit" is not bound. @ *unknown*[1,104],actor=null,detail=null]
      14:37:53,767 ERROR [SOAPFaultExceptionHelper] SOAP request exception
      javax.xml.rpc.JAXRPCException: org.jboss.ws.binding.BindingException: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: The prefix "xsi" for attribute "xsi:type" associated with an element type "n3:submit" is not bound. @ *unknown*[1,104]
       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.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: The prefix "xsi" for attribute "xsi:type" associated with an element type "n3:submit" is not bound. @ *unknown*[1,104]
       at org.jboss.ws.jaxrpc.encoding.JAXBDeserializer.deserialize(JAXBDeserializer.java:100)
       at org.jboss.ws.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:235)
       ... 29 more
      Caused by: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: The prefix "xsi" for attribute "xsi:type" associated with an element type "n3:submit" is not bound. @ *unknown*[1,104]
       at org.jboss.ws.jaxb.JBossXBUnmarshallerImpl.unmarshal(JBossXBUnmarshallerImpl.java:67)
       at org.jboss.ws.jaxrpc.encoding.JAXBDeserializer.deserialize(JAXBDeserializer.java:92)
       ... 30 more
      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: The prefix "xsi" for attribute "xsi:type" associated with an element type "n3:submit" is not bound. @ *unknown*[1,104]
       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)
       ... 31 more
      Caused by: org.xml.sax.SAXException: The prefix "xsi" for attribute "xsi:type" associated with an element type "n3:submit" is not bound. @ *unknown*[1,104]
       at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.fatalError(SaxJBossXBParser.java:332)
       at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
       at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
       at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
       at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
       at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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)
       ... 33 more
      14:37:53,798 DEBUG [SOAPMessage] Outgoing SOAPMessage
      <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
      <env:Header/>
      <env:Body>
      <env:Fault>
       <faultcode>env:Client</faultcode>
       <faultstring>org.jboss.ws.binding.BindingException: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: The prefix "xsi" for attribute "xsi:type" associated with an element type "n3:submit" is not bound. @ *unknown*[1,104]</faultstring>
      </env:Fault></env:Body></env:Envelope>
      


      This is generated wsdl
      <definitions name='GBForecastSubmitService' targetNamespace='http://forecast.business.gema.generalynx.com/jaws' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://forecast.domain.gema.generalynx.com/jaws' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://forecast.business.gema.generalynx.com/jaws' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
       <types>
       <schema elementFormDefault='qualified' targetNamespace='http://forecast.domain.gema.generalynx.com/jaws' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:ns1='http://forecast.business.gema.generalynx.com/jaws' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://forecast.domain.gema.generalynx.com/jaws' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
       <import namespace='http://forecast.business.gema.generalynx.com/jaws'/>
       <complexType name='BasicForecast'>
       <sequence>
       <element name='creationDate' nillable='true' type='dateTime'/>
       <element name='expectedValue' type='double'/>
       <element name='forecastDate' nillable='true' type='dateTime'/>
      
       <element name='variance' type='double'/>
       </sequence>
       </complexType>
       </schema>
       <schema elementFormDefault='qualified' targetNamespace='http://forecast.business.gema.generalynx.com/jaws' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:ns2='http://forecast.domain.gema.generalynx.com/jaws' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://forecast.business.gema.generalynx.com/jaws' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
       <import namespace='http://forecast.domain.gema.generalynx.com/jaws'/>
       <complexType name='ForecastDocument'>
       <sequence>
       <element name='code' nillable='true' type='string'/>
      
       <element name='customer' nillable='true' type='string'/>
       <element maxOccurs='unbounded' minOccurs='0' name='forecasts' nillable='true' type='ns2:BasicForecast'/>
       <element name='receiveDate' nillable='true' type='dateTime'/>
       <element name='submitDate' nillable='true' type='dateTime'/>
       <element name='user' nillable='true' type='string'/>
       </sequence>
       </complexType>
       </schema>
       </types>
      
       <message name='GBForecastSubmit_submitResponse'>
       <part name='result' type='xsd:int'/>
       </message>
       <message name='GBForecastSubmit_submit'>
       <part name='ForecastDocument_1' type='tns:ForecastDocument'/>
       </message>
       <portType name='GBForecastSubmit'>
       <operation name='submit' parameterOrder='ForecastDocument_1'>
       <input message='tns:GBForecastSubmit_submit'/>
      
       <output message='tns:GBForecastSubmit_submitResponse'/>
       </operation>
       </portType>
       <binding name='GBForecastSubmitBinding' type='tns:GBForecastSubmit'>
       <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
       <operation name='submit'>
       <soap:operation soapAction=''/>
       <input>
       <soap:body namespace='http://forecast.business.gema.generalynx.com/jaws' use='literal'/>
      
       </input>
       <output>
       <soap:body namespace='http://forecast.business.gema.generalynx.com/jaws' use='literal'/>
       </output>
       </operation>
       </binding>
       <service name='GBForecastSubmitService'>
       <port binding='tns:GBForecastSubmitBinding' name='GBForecastSubmitPort'>
       <soap:address location='http://Morozevic:8080/BusinessImplementationEJB/TestForecast'/>
      
       </port>
       </service>
      </definitions>
      


      Is this a problem of GLUE being to old?

      This is the mapping file that I get generated from wsdl by GLUE:
      <?xml version='1.0' encoding='UTF-8'?>
      <!--generated by GLUE Standard 4.1.2 (wsdl2java) on Mon Oct 23 14:36:56 CEST 2006-->
      <map:mappings xmlns:map='http://www.themindelectric.com/schema/' xmlns:n1='http://forecast.domain.gema.generalynx.com/jaws'>
       <xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema' elementFormDefault='qualified' targetNamespace='http://forecast.business.gema.generalynx.com/jaws'>
       <xsd:import namespace='http://forecast.domain.gema.generalynx.com/jaws'/>
       <xsd:complexType name='ForecastDocument' map:class='com.generalynx.gema.domain.forecast.ForecastDocument'>
       <xsd:sequence>
       <xsd:element name='code' nillable='true' map:field='code' type='xsd:string'/>
       <xsd:element name='customer' nillable='true' map:field='customer' type='xsd:string'/>
       <xsd:element name='forecasts' minOccurs='0' maxOccurs='unbounded' nillable='true' map:field='forecasts' type='n1:BasicForecast'/>
       <xsd:element name='receiveDate' nillable='true' map:field='receiveDate' type='xsd:dateTime'/>
       <xsd:element name='submitDate' nillable='true' map:field='submitDate' type='xsd:dateTime'/>
       <xsd:element name='user' nillable='true' map:field='user' type='xsd:string'/>
       </xsd:sequence>
       </xsd:complexType>
       </xsd:schema>
       <xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema' elementFormDefault='qualified' targetNamespace='http://forecast.domain.gema.generalynx.com/jaws'>
       <xsd:complexType name='BasicForecast' map:class='com.generalynx.gema.domain.forecast.BasicForecast'>
       <xsd:sequence>
       <xsd:element name='creationDate' nillable='true' map:field='creationDate' type='xsd:dateTime'/>
       <xsd:element name='expectedValue' map:field='expectedValue' type='xsd:double'/>
       <xsd:element name='forecastDate' nillable='true' map:field='forecastDate' type='xsd:dateTime'/>
       <xsd:element name='variance' map:field='variance' type='xsd:double'/>
       </xsd:sequence>
       </xsd:complexType>
       </xsd:schema>
      </map:mappings>


      Rgds, Ales

        • 1. Re: Binding exception - prefix
          Jason Greene Master

          This is a bug we just fixed recently. The fix will be included in 1.0.4.

          http://jira.jboss.com/jira/browse/JBWS-1303

          • 2. Re: Binding exception - prefix
            Ales Justin Master

            Is there a way to get this build?

            Where in the SVN is now JBossWS?
            Under jbossas/projects?

            • 4. Re: Binding exception - prefix
              Ales Justin Master

              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


              • 5. Re: Binding exception - prefix
                Jason Greene Master

                This looks like a bug in glue. xsi:type is supposed to refer to a schema type definition, not an element definition.

                -Jason

                • 6. Re: Binding exception - prefix
                  Ales Justin Master

                  Could I somehow change this Glue type mapping to make it work?

                  >> Type binding not found for type dateTime specified with xsi:type for element {http://business.forecast.gema.generalynx.com/jaws}date

                  How to actually bind this dateTime type - since this seems to be the cause of exception?

                  So dateTime isn't generic type for Date in WS usage?

                  • 7. Re: Binding exception - prefix
                    Ales Justin Master

                    This is my wsdl

                    <wsdl:definitions name="SimpleServiceImpl" targetNamespace="http://www.themindelectric.com/wsdl/SimpleServiceImpl/">
                    
                     <wsdl:types>
                    
                     <xsd:schema targetNamespace="http://www.themindelectric.com/package/com.generalynx.common.interfaces/">
                    
                     <xsd:complexType name="SimpleOutData">
                    
                     <xsd:all>
                     <xsd:element name="response" nillable="true" type="xsd:string"/>
                     </xsd:all>
                     </xsd:complexType>
                    
                     <xsd:complexType name="SimpleInData">
                    
                     <xsd:all>
                     <xsd:element name="date" type="xsd:dateTime"/>
                     </xsd:all>
                     </xsd:complexType>
                     </xsd:schema>
                    
                     <xsd:schema elementFormDefault="qualified" targetNamespace="http://www.themindelectric.com/wsdl/SimpleServiceImpl/">
                     <xsd:import namespace="http://www.themindelectric.com/package/com.generalynx.common.interfaces/"/>
                    
                     <xsd:element name="getHelloWorld">
                    
                     <xsd:complexType>
                    
                     <xsd:sequence>
                     <xsd:element name="inData" type="n11:SimpleInData"/>
                     </xsd:sequence>
                     </xsd:complexType>
                     </xsd:element>
                    
                     <xsd:element name="getHelloWorldResponse">
                    
                     <xsd:complexType>
                    
                     <xsd:sequence>
                     <xsd:element name="Result" type="n11:SimpleOutData"/>
                     </xsd:sequence>
                     </xsd:complexType>
                     </xsd:element>
                     </xsd:schema>
                     </wsdl:types>
                    
                     <wsdl:message name="getHelloWorld0In">
                     <wsdl:part name="parameters" element="tns:getHelloWorld"/>
                     </wsdl:message>
                    
                     <wsdl:message name="getHelloWorld0Out">
                     <wsdl:part name="parameters" element="tns:getHelloWorldResponse"/>
                     </wsdl:message>
                    
                     <wsdl:portType name="SimpleService">
                    
                     <wsdl:operation name="getHelloWorld" parameterOrder="inData">
                     <wsdl:input name="getHelloWorld0In" message="tns:getHelloWorld0In"/>
                     <wsdl:output name="getHelloWorld0Out" message="tns:getHelloWorld0Out"/>
                     </wsdl:operation>
                     </wsdl:portType>
                    
                     <wsdl:binding name="SimpleService" type="tns:SimpleService">
                     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
                    
                     <wsdl:operation name="getHelloWorld">
                     <soap:operation soapAction="getHelloWorld" style="document"/>
                    
                     <wsdl:input name="getHelloWorld0In">
                     <soap:body use="literal"/>
                     </wsdl:input>
                    
                     <wsdl:output name="getHelloWorld0Out">
                     <soap:body use="literal"/>
                     </wsdl:output>
                     </wsdl:operation>
                     </wsdl:binding>
                    
                     <wsdl:service name="SimpleServiceImpl">
                    
                     <wsdl:documentation>
                     instance of class com.generalynx.gema.services.impl.SimpleServiceImpl
                     </wsdl:documentation>
                    
                     <wsdl:port name="SimpleService" binding="tns:SimpleService">
                     <soap:address location="http://sokolov:8081/gema/services/SimpleService"/>
                     </wsdl:port>
                     </wsdl:service>
                    </wsdl:definitions>
                    


                    And my ws client definition looks like this:

                    @WebServiceClient(
                     name = "SimpleServiceImpl",
                     targetNamespace = "http://www.themindelectric.com/wsdl/SimpleServiceImpl/",
                     wsdlLocation = "http://sokolov:8081/gema/services/SimpleService.wsdl"
                    )
                    public class SimpleServiceImpl extends javax.xml.ws.Service {
                    
                     public SimpleServiceImpl() throws MalformedURLException {
                     this(
                     new URL("http://sokolov:8081/gema/services/SimpleService.wsdl"),
                     new QName("http://www.themindelectric.com/wsdl/SimpleServiceImpl/", "SimpleServiceImpl")
                     );
                     }
                    
                     public SimpleServiceImpl(URL url, QName qName) {
                     super(url, qName);
                     }
                    
                     @WebEndpoint(name = "SimplePort")
                     public SimpleService getSimplePort() {
                     return (SimpleService) super.getPort(
                     new QName("http://www.themindelectric.com/wsdl/SimpleServiceImpl/", "SimpleService"),
                     SimpleService.class);
                     }
                    
                    }
                    
                    
                    @WebService
                    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
                    public interface SimpleService {
                    
                     @WebMethod
                     @WebResult(name = "getHelloWorldResponse", targetNamespace = "http://www.themindelectric.com/wsdl/SimpleServiceImpl/")
                     SimpleOutData getHelloWorld(
                     @WebParam(name = "getHelloWorld", targetNamespace = "http://www.themindelectric.com/wsdl/SimpleServiceImpl/")
                     SimpleInData data
                     );
                    
                    }
                    


                    Is this a valid client invocation / request?

                    Outgoing SOAPMessage
                    <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
                     <env:Header/>
                     <env:Body>
                     <ns1:getHelloWorld xmlns:ns1='http://www.themindelectric.com/wsdl/SimpleServiceImpl/'>
                     <date>2006-11-03T16:04:00.015+01:00</date>
                     </ns1:getHelloWorld>
                     </env:Body>
                    </env:Envelope>
                    


                    I get this response, but I get a null result object.

                    @SuppressWarnings({"EJB_ERROR"})
                    public class ClientTesterJob implements Job {
                    
                     @WebServiceRef(SimpleServiceImpl.class)
                     private SimpleService simpleService;
                    
                     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
                     System.out.println(simpleService != null);
                     SimpleInData data = new SimpleInData();
                     data.setDate(new Date());
                     System.out.println(simpleService.getHelloWorld(data));
                     }
                    
                    }
                    
                    
                    Incoming Response SOAPMessage
                    <soap:Envelope xmlns:n3='http://www.themindelectric.com/package/com.generalynx.common.interfaces/' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
                     <soap:Header/>
                     <soap:Body>
                     <n:getHelloWorldResponse xmlns:n='http://www.themindelectric.com/wsdl/SimpleServiceImpl/'>
                     <n:Result xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='n3:SimpleOutData'>
                     <response xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='xsd:string'>Hello world null</response>
                     </n:Result>
                     </n:getHelloWorldResponse>
                     </soap:Body>
                    </soap:Envelope>


                    I also get a null parameter object on the service side.