2 Replies Latest reply on Oct 24, 2007 4:25 PM by aloubyansky

    QName unmarshalling

    starksm64

      I'm looking at http://jira.jboss.com/jira/browse/JBAS-4891 with regard to how to handle unmarshalling qnames from legacy descriptors that don't support namespaces. If a document like this is unmarshalled:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC
       "-//JBoss//DTD JBOSS 4.2//EN"
       "http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd">
      <!-- Id -->
      <jboss>
      ...
       <service-ref>
       <service-ref-name>SecureService</service-ref-name>
      <service-impl-class>org.jboss.tests.ws.jaxws.webserviceref.SecureEndpointService</service-impl-class>
       <service-qname>{http://org.jboss.ws/wsref}SecureEndpointService</service-qname>
       <port-component-ref>
       <service-endpoint-interface>org.jboss.tests.ws.jaxws.webserviceref.SecureEndpoint</service-endpoint-interface>
       <port-qname>{http://org.jboss.ws/wsref}SecureEndpointPort</port-qname>
       <stub-property>
       <prop-name>javax.xml.ws.security.auth.username</prop-name>
       <prop-value>kermit</prop-value>
       </stub-property>
       <stub-property>
       <prop-name>javax.xml.ws.security.auth.password</prop-name>
       <prop-value>thefrog</prop-value>
       </stub-property>
       </port-component-ref>
       </service-ref>
      


      the following exception happens because of the invalid qname encoding:
      Caused by: java.lang.IllegalStateException: No namespace URI registered for prefix: {http
       at org.jboss.xb.binding.SimpleTypeBindings.unmarshalQName(SimpleTypeBindings.java:1993)
       at org.jboss.xb.binding.SimpleTypeBindings.unmarshal(SimpleTypeBindings.java:739)
       at org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler.unmarshal(CharactersHandler.java:114)
       ... 41 more
      


      How should this be handled?